/etc/hosts is ignored when http proxy is specified




Networking: HTTP
8 years ago
7 years ago


(Reporter: TT, Unassigned)


Firefox Tracking Flags

(Not tracked)




8 years ago
User-Agent:       Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B405 Safari/531.21.10
Build Identifier: 

I'm behind a corporate firewall/proxy that provides DNS services for Seamonkey.  I'm no expert on this, but it appears that Seamonkey queries the proxy server for DNS lookups.  I suspect this because the 'host' and 'nslookup' commands don't work on external hostnames.

My problem is that for one particular external host, I want Seamonkey to use a different IP address than what the proxy DNS server returns.  So i put that IP address and host in my /etc/hosts file. I want Seamonkey to use that IP address when it resolves the hostnames, but then I want Seamonkey to request that IP address through the proxy.

It appears that this doesn't work.  Seamonkey ignores the entry in /etc/hosts.

Reproducible: Always
Gecko never reads /etc/hosts, it just uses the systems getbyhostname() function for DNS resolutions. The OS reads /etc/hosts and is doing a query to the remote DNS server.
Gecko doesn't do a local DNS resolution if it uses a http proxy. That doesn't make sense in most cases.

In your case you can't do local DNS resolution because it wouldn't work for external hosts.

Your case is very special and I think you should better do that in an extension.
Component: General → Networking: HTTP
Product: SeaMonkey → Core
QA Contact: general → networking.http

Comment 2

8 years ago
What kind of extension would help me out?
I mean that this functionality doesn't exists and that this is a very unusual edge case. Someone have to write an extension to do this because I don't think that this is something that we should implement in Gecko.
I will mark this invalid.
It's by design that the proxy does all the DNS lookups if you configure one.
Last Resolved: 7 years ago
Resolution: --- → INVALID
and I forgot: it should work if you add that hostname on the no proxy list.
You need to log in before you can comment on or make changes to this bug.