简体   繁体   English

pac(proxy-auto-config)文件中的功能FindProxyForURL在IE浏览器中无法使用

[英]The function FindProxyForURL in pac (proxy-auto-config) file can not work in IE browser

we spent three days still could not solve a strange technical problem, so we need your help. 我们花了三天时间仍无法解决一个奇怪的技术问题,因此我们需要您的帮助。

The pac (proxy-auto-config) file we write is working fine in all other browser, except IE(Internet Explorer). 我们编写的pac(代理自动配置)文件在IE(Internet Explorer)以外的所有其他浏览器中都可以正常工作。

the request url is 请求网址是

https://news.google.com.hk/nwshp?hl=zh-CN&tab=wn

if pac file is 如果pac文件是

function FindProxyForURL(url, host) {

    if(/news/i.test(url)) return "PROXY 127.0.0.1:8087";

    return  "DIRECT";
}

it is right, it is using proxy to visit the website. 是的,它正在使用代理访问网站。

however if the pac file change to 但是,如果pac文件更改为

function FindProxyForURL(url, host) {

    if(/CN/i.test(url)) return "PROXY 127.0.0.1:8087";

    return  "DIRECT";

}

CN, is also in the url. CN也在网址中。 but IE do not using proxy to visit the website, like we think. 但是IE并不像我们认为的那样使用代理访问网站。

However we test in other browser like Chrome, Safari, Firefox, they all run well , they all using proxy to visit the website. 但是,我们在其他浏览器(例如Chrome,Safari,Firefox)中进行了测试,它们都运行良好,并且都使用代理访问了网站。

It seems like in the IE, the parameter "url" in the function FindProxyForURL(url, host) , is not full path of url, it just contain the host,but in other browser it is the full url. 好像在IE中,函数FindProxyForURL(url, host)的参数“ url”不是url的完整路径,它仅包含主机,而在其他浏览器中是完整的url。

We have taken 3 days on this problem, Do you have some idea to let the function in IE pac file to get the full url, or have a method to debug the pac file in IE browser. 我们已经花了3天的时间解决这个问题,您是否有想法让IE pac文件中的功能获取完整的网址,或者有一种方法可以在IE浏览器中调试pac文件。

We even cannot alert infomation in browser. 我们甚至无法在浏览器中提醒信息。

Our IE version is 10, Windows 8. 我们的IE版本是10,Windows 8。

See http://support.microsoft.com/kb/271361 请参阅http://support.microsoft.com/kb/271361

You need to set HKEY_CURRENT_USER\\Software\\Policies\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\EnableAutoProxyResultCache to DWORD 0. 您需要将HKEY_CURRENT_USER \\ Software \\ Policies \\ Microsoft \\ Windows \\ CurrentVersion \\ Internet Settings \\ EnableAutoProxyResultCache设置为DWORD 0。

for future research, and anyone who stumbles upon this thread, this Microsoft blog, describes why this did not work, it is because of some recent changes in how IE 11 can use proxies. 为了将来的研究,以及偶然发现此线程的任何人,该Microsoft博客描述了为什么此方法不起作用的原因,这是由于IE 11使用代理的方式最近发生了一些变化。

http://blogs.msdn.com/b/ieinternals/archive/2013/10/11/web-proxy-configuration-and-ie11-changes.aspx http://blogs.msdn.com/b/ieinternals/archive/2013/10/11/web-proxy-configuration-and-ie11-changes.aspx

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

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