I'm connecting to some websites through socks proxy server. In my case its very good to implement dns cache, so proxy don't need to resolve website's ip address. So, I performed DNS lookup, but don't know where to supply IP address. mySocket.Connect
uses proxy's ip address so it isn't right place. I tried to place it in http header GET http://11.22.33.44/index.html HTTP/1.1
- this doesn't work (even in browser) since website is on virtual hosting. It seems that Host
header is right place for resolved ip address. Am I right? Will proxy resolve host name (since it's still there in GET header) or not?
views:
29answers:
1
A:
What you need to do is connect to the SOCKS host. You then instruct the SOCKS host to connect to the IP address that you have cached from DNS. When you are connected you send the HTTP headers (GET request and HOST header) that specify the original domain name.
Martin Eve
2010-05-30 11:54:03