7

I was wondering if I can do the DNS resolving locally on my computer instead of doing it at the proxy server. In other words, can I get my web browser to respect my hosts file or something like that? I've tried disabling network.proxy.socks_remote_dns in Firefox without any success.

1 Answer 1

1

Unfortunately it doesn't really work like that.

If you don't have a proxy server, the browser will do the DNS lookup (checking your hosts file first), and then connect directly to the returned IP address.

If you are using a proxy server, the whole URL gets passed to the proxy server instead, so the proxy server extracts the hostname and performs the DNS lookup.

Even if you somehow got your browser to do the DNS lookup, it would then pass a URL like http://1.2.3.4/ to the proxy server, which would be treated differently to using the real hostname - for instance, the wrong Host: header would be set in the HTTP request to the web server, just as if you had visited http://1.2.3.4/ in your browser without using a proxy.

Unfortunately if you want to override a host name and still use a HTTP proxy server, you will have to edit the hosts file on the proxy server itself. You may also be able to get this to work by using a SOCKS5 proxy instead of a HTTP proxy, as SOCKS5 is lower level - but it's also very uncommon to find a SOCKS proxy server these days.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .