Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 1 down vote accepted

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 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 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.

share|improve this answer

You must log in to answer this question.

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