the http tunnel technology:
1. pack all data with http header at the send endpoint;
2. unpack the packet, distill the original data(just need to remove the http header info) at the receive endpoint;
implementation(http format):
1. requirement like following format:
GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: 127.0.0.1
Connection: Keep-Alive
2. response like following format:
HTTP/1.1 200 OK
Date: Sat, 14 Jan 2006 15:14:51 GMT
Server: Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7g PHP/4.4.0
Content-Length: 346
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
1. pack all data with http header at the send endpoint;
2. unpack the packet, distill the original data(just need to remove the http header info) at the receive endpoint;
implementation(http format):
1. requirement like following format:
GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: 127.0.0.1
Connection: Keep-Alive
2. response like following format:
HTTP/1.1 200 OK
Date: Sat, 14 Jan 2006 15:14:51 GMT
Server: Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7g PHP/4.4.0
Content-Length: 346
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1