Socket写的http 代码 参考这里:
https://blog.itnmg.net/socket-http/
我下面代码,是想通过 socket代理 123.196.214.91:1080 访问页面
byte[] send = GetSendHeaders(uri, referer, postData);
IPEndPoint proxyEndPoint = new IPEndPoint(IPAddress.Parse("123.196.214.91"), 1080);
HttpSocket.Connect(proxyEndPoint);
请求头:
GET http://www.ip.cn/ HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Referer: http://www.ip.cn/
Accept-Language: zh-CN
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Accept-Encoding: gzip, deflate
Host: www.ip.cn
Connection: Keep-Alive
Cache-Control: no-cache
但是 返回为空,不知为何~