Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

PAC file not working

  • 3 个回答
  • 12 人有此问题
  • 1 次查看
  • 最后回复者为 liuqx

more options

The firefox is really a fabulous browser, and I really appreciate the brilliant guys working on it. But here's the problem: the PAC file does not seem to be working. This PAC file contains a list of domains needed by the browser to decide which domain should be accessed directly, which domain should be accessed through the proxy server. I've been using ShadowsocksR ( https://github.com/shadowsocksr-backup/shadowsocksr-csharp ), who serves as a HTTP proxy server on 127.0.0.1:1080 with a PAC file(pac.txt), and it works quite well with IE and Edge. However, with firefox, I can not use this proxy server. I've tried another PAC file, proxy.pac on GitHub: https://github.com/breakwa11/gfw_whitelist , which turns out to work properly on IE and Edge(with the first line changed to: var wall_proxy = "PROXY 127.0.0.1:1080; HTTPS 127.0.0.1:1080; SOCKS5 127.0.0.1:1080 ;";), but again, no luck with firefox. When I set the proxy server to 127.0.0.1:1080 directly in firefox, everything was working as it should. But once the PAC file is involved, firefox cannot use the proxy server anymore. I think there might be some problem when firefox parses the PAC file. Any help? Thanks!

Updated: I also pressed Ctrl+Shift+J yesterday, and it showed the pac file had been installed. But firefox just couldn't use proxy server configured in the pac file. Restarting firefox wouldn't help. I tried another browser, Chrome, and the pac file also worked fine in Chrome.

The firefox is really a fabulous browser, and I really appreciate the brilliant guys working on it. But here's the problem: the PAC file does not seem to be working. This PAC file contains a list of domains needed by the browser to decide which domain should be accessed directly, which domain should be accessed through the proxy server. I've been using ShadowsocksR ( https://github.com/shadowsocksr-backup/shadowsocksr-csharp ), who serves as a HTTP proxy server on 127.0.0.1:1080 with a PAC file(pac.txt), and it works quite well with IE and Edge. However, with firefox, I can not use this proxy server. I've tried another PAC file, proxy.pac on GitHub: https://github.com/breakwa11/gfw_whitelist , which turns out to work properly on IE and Edge(with the first line changed to: var wall_proxy = "PROXY 127.0.0.1:1080; HTTPS 127.0.0.1:1080; SOCKS5 127.0.0.1:1080 ;";), but again, no luck with firefox. When I set the proxy server to 127.0.0.1:1080 directly in firefox, everything was working as it should. But once the PAC file is involved, firefox cannot use the proxy server anymore. I think there might be some problem when firefox parses the PAC file. Any help? Thanks! Updated: I also pressed Ctrl+Shift+J yesterday, and it showed the pac file had been installed. But firefox just couldn't use proxy server configured in the pac file. Restarting firefox wouldn't help. I tried another browser, Chrome, and the pac file also worked fine in Chrome.

由liuqx于修改

被采纳的解决方案

Solved this problem by setting network.dns.disableIPv6 to true. I don't consider this as a good solution, because pure IPv6 sites can't be accessed.

My ISP provides both IPv4 and IPv6. Obviously firefox has something wrong with the PAC file when IPv6 is enabled. I'm hoping this bug can get fixed as soon as possible! Every browser I've tried works well except for firefox.

定位到答案原位置 👍 2

所有回复 (3)

more options

It should work - I can’t recall not using it, albeit as a locally stored file. If you do, be sure to use the format in the next example however when entering its URL in Firefox on Windows: file:///c://Users/<user>/pac_file_name.pac ...so mind the 3 forward slashes and the required .pac extension.

When entering a http URL for a local file, http:// would be fine but you may need to configure your server for the proper MIME type. See this page for more info.

There are some other caveats though with regard to .pac files, but I don’t think they apply to your issue. For reference:

  1. isInNet() calls can cause hangs in Firefox and should be avoided or replaced (bug 208287).
  2. Microsoft no longer considers file:// URLs to be valid URLs, causing them to not work in IE and other products when used as such, unless a Windows registry change is applied - this is the EnableLegacyAutoProxyFeatures value.

Let us know if this helps.

more options

But today, I restarted my computer and it worked like a charm! I just can't find a plausible explanation to this, how could this have anything to do with my system? I strongly recommend somebody test the pac file. Anyway, thanks! I'm gonna test firefox for another couple of days, in case it has a relapse and restarting my system doesn't work! You know it worries me when some problems get solved by coincidence, haha

由liuqx于修改

more options

选择的解决方案

Solved this problem by setting network.dns.disableIPv6 to true. I don't consider this as a good solution, because pure IPv6 sites can't be accessed.

My ISP provides both IPv4 and IPv6. Obviously firefox has something wrong with the PAC file when IPv6 is enabled. I'm hoping this bug can get fixed as soon as possible! Every browser I've tried works well except for firefox.