Chrome更新到72+后,$$无法使用PAC模式浏览的问题解决
Tofloor
poster avatar
wallestar
deepin
2019-04-12 22:32
Author
不知道有没有人跟我一样,更新Chrome到最新版后,在$$的PAC模式下,Chrome怎么都无法访问Google搜索。原以为是深度的锅,只能将就着先用Firefox。查了一段时间,终于找到解决办法。
似乎是72+版本后,Chrome作了一些变更引起的。解决办法是:
地址栏输入:chrome://flags
然后找到Enable network service选项,设置为Disabled即可。

Hope this help you!
Across the great wall we can reach every corner in the world!

Reply Favorite View the author
All Replies
avatar
aida
deepin
2019-04-12 23:31
#1
棒棒哒
Reply View the author
avatar
orangeshine
deepin
2019-06-27 23:12
#2
解决了
万分感谢
Reply View the author
avatar
fengying6_6
deepin
2019-06-28 06:35
#3
本帖最后由 fengying6_6 于 2019-6-27 22:40 编辑

https://bugs.chromium.org/p/chromium/issues/detail?id=839566&q=pac&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified
chromium移除了对pac 的 file协议的支持,但是chromium bug一共给出了几种办法
Let me start by summarizing the issue.

When Chrome is run with NetworkService enabled (which is currently being experimented with on Stable channel), there isn't support for PAC scripts using the file://, so configurations using them will fail to fetch the PAC script and default to DIRECT connections.

Current mitigations include:

(1) Launch with --disable-features=NetworkService

(2) Run a local HTTP server, and then point to the PAC file as http://localhost/... rather than file://...
For instance:
$ python -m SimpleHTTPServer 8000
$ google-chrome --proxy-pac-url="http://localhost:8000/script.js"

(3) Use a Chrome extension to manage your PAC file instead of using a file:// URL.

(4) Convert the file:// URL to a data: URL
For instance:
$ google-chrome --proxy-pac-url='data:application/*-config;base64,'$(base64 -w0 /path/to/pac/script)


The histogram data (Net.ProxyResolutionService.PacUrlScheme) for frequency of file:// URL based PAC scripts on Stable channel:

  * Windows: 0.7%
  * macOS / Linux: 1.5% // 倒霉的多是linux用户????
  * ChromeOS / Android: 0%

最后一种比较简单也没什么副作用,利用了base64 data url来实现。修改一下桌面启动文件,你懂的。
  1. google-chrome --proxy-pac-url='data:application/*-config;base64,'$(base64 -w0 /path/to/pac/script)
Copy the Code
Reply View the author
avatar
wallestar
deepin
2019-06-29 01:43
#4
https://bbs.deepin.org/post/176701
https://bugs.chromium.org/p/chromium/issues/detail?id=839566&q=pac&colspec=ID%20Pri%20M%20Stars%20Re ...

谢谢您的补充说明!
Reply View the author
avatar
nolocus
deepin
2019-06-29 06:30
#5
直接用 switchyomega 从来不考虑 pac 模式..
Reply View the author
avatar
zed7th
deepin
2020-03-27 02:44
#6
https://bbs.deepin.org/post/176701
https://bugs.chromium.org/p/chromium/issues/detail?id=839566&q=pac&colspec=ID%20Pri%20M%20Stars%20Re ...

求教一下这个参数的格式是怎么样的,我添加了--proxy-pac-url='data:application/*-config;base64,'$(base64 -w0 /home/zdqi/Documents/autoproxy.pac)后chrome无法启动了
Reply View the author
avatar
fengying6_6
deepin
2020-04-05 00:44
#7
本帖最后由 fengying6_6 于 2020-4-4 16:46 编辑
https://bbs.deepin.org/post/176701
求教一下这个参数的格式是怎么样的,我添加了--proxy-pac-url='data:application/*-config;ba ...

我的是这样配置的,我这边还ok,一直都能用这个科学上网。
  1. chromium --proxy-pac-url='data:application/*-config;base64,'$(base64 -w0 /home/feng/Documents/open/mypac.pac)
Copy the Code
Reply View the author