Closed Bug 1473678 Opened 7 years ago Closed 7 years ago

PAC seems to affect DNS

Categories

(Core :: Networking: DNS, defect)

62 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox62 --- affected

People

(Reporter: erosman, Unassigned)

Details

(Keywords: qawanted)

When a PAC is not set, Firefox picks up the IPs from Windows HOSTS file. However, when a PAC is set, Firefox ignores Windows HOSTS file completely which seems that it passes the DNS request through the PAC as well. Above should not be the expected behaviour. Notes: - I have only tested it with PAC (not proxy). - "Proxy DNS when using SOCKS v5" is not ticked previous ref: bug 1473658
Component: General → Networking: DNS
Product: Firefox → Core
There are no new information beyond what has been reported (and concluded) in bug 1473658. Content of the PAC would be useful, at least, then the list of modified preferences from about:support may tell us more as well. CC'ing Daniel in case he knows more from the top of his head.
Flags: needinfo?(eros_uk)
bug 1473658 stated that the behaviour is not related to the WebExtension API as the API merely sets the preference value and hence the necessity to re-file the bug. Content of PAC should also not be relevant as PAC should not have any relevance to the DNS request. However, you can consider the following as an example: > function FindProxyForURL() { return 'PROXY 1.2.3.4:8080'; } It is worth mentioning that another oddity was observed and filed (bug 1432388) with the DNS and proxy which may also be relevant to this issue. On checking 'about:config' all DNS related preferences are the default values. N.B. As I came across this issue now and on Firefox 62.0a1 (2018-06-21) (64-bit), I am unaware if the issue is related to a single release or not. To test: Set an IP for a site in HOSTS file in Windows (I am unaware whether the issue is limited to Windows or not) >127.0.0.1 bugzilla.mozilla.org Create/Set a sample PAC (like above) and test going to bugzilla.mozilla.org (for example) If the bug exists, you should get different results for the hosts entered in the HOSTS file when using the PAC or not. I Suspect, it would be the same issue when setting a proxy (which would make it a general Network issue). Please note that when a VPN is set, Firefox behaves as expected and honours the settings in the HOSTS file.
Flags: needinfo?(eros_uk)
Can someone from QA try to reproduce with steps from comment 2 please?
Keywords: qawanted
When a HTTP proxy is used (with or without a PAC), the host name is passed to the proxy and the proxy then resolves that name. This is by design!
Thank you Daniel for the clarification. I suspected that it is by design and I understand the logic behind the design. The model also explains the behaviour in bug 1432388 (although there is still room for further discussion on it). It is worth noting that operating systems do not behave that way in case of hosts file, and they will apply the settings in the hosts files even when a proxy or VPN is used. Does anyone know if this is model is adopted by all browsers?
When a HTTP proxy is used, this is how a client/browser *must* behave. It sends the host name to the proxy, not the IP address. All HTTP clients/browsers do this since this is how HTTP over proxy works.
In that case, we can close this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.