在我的Linux机器上,我需要使用需要身份validation才能访问Internet的ISA代理。 因此,我安装了CNTLM并将其configuration为指向代理地址,并在端口4321上侦听。
然后我configuration我的GNOME发行版,使用localhost:4321作为HTTP和HTTPS的全局代理。
结果:我可以连接到互联网。 我可以ping内联网IP,我接收内网网站的名称parsing,但我不能ping通它们,或者在浏览器(configuration为使用发行版代理)中打开任何内联网站点,除非我使用该站点的IP地址。
我试图阻止在CNTLMconfiguration文件的Intranet IP范围,没有运气。
这听起来像ISA代理不正确parsingIntranet主机名。 一种解决scheme是编写一个代理自动configuration文件,告诉客户端何时使用哪个代理。 这不适用于使用http_proxy CLI程序,但至less可以在浏览器中使用。
将其保存到像~/proxy.pac这样的文件,并根据您的环境进行更改。 在GNOME代理configuration中,select“自动代理configuration”选项,并将该文件的位置input为file:// URL,例如file:///home/htorque/proxy.pac 。
function FindProxyForURL(url, host) { // Strip port number host = host.replace(/:\d*/, ""); // Local destinations if ( isPlainHostName(host) || dnsDomainIs(host, ".local") || dnsDomainIs(host, ".mycompany") || shExpMatch(host, "127.*.*.*") || shExpMatch(host, "10.*.*.*") || shExpMatch(host, "192.168.*.*") ) return "DIRECT"; // External destinations return "PROXY localhost:3128"; }