简体   繁体   English

代理 pac 文件在 Chrome 和 Edge 中不再有效

[英]Proxy pac file doesn't work anymore in Chrome and Edge

I have a pac file hosted by my company server and it stopped working.我有一个由公司服务器托管的 pac 文件,但它停止工作了。 We didn't made any change and the content is:我们没有做任何改动,内容是:

function FindProxyForURL(url, host) {
  if (dnsDomainIs(host, ".mydomain.com")) {
    return "DIRECT";
  }

  if (dnsDomainIs(host, "fonts.googleapis.com")) {
    return "DIRECT";
  }
   if (dnsDomainIs(host, "fonts.gstatic.com")) {
    return "DIRECT";
  }

  return "PROXY http://0.0.0.0:8080";
}

I can download the pac file by typing the url in the browser so he is still hosted, it still working in firefox but not chrome or edge.我可以通过在浏览器中输入 url 下载 pac 文件,所以他仍然被托管,它仍然可以在 firefox 中工作,但不能在 chrome 或 edge 中工作。

It should block all other websites except "mydomain", we use it during online tests and to block students going in google or others websites looking for questions answers.它应该阻止除“mydomain”之外的所有其他网站,我们在在线测试期间使用它并阻止学生进入谷歌或其他网站寻找问题答案。

Unfortunately, it seems they removed the file:// protocol for the PAC files... https://bugs.chromium.org/p/chromium/issues/detail?id=839566#c40不幸的是,他们似乎删除了 PAC 文件的file://协议... https://bugs.chromium.org/p/chromium/issues/detail?id=839566#c40

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM