大网数据广告活动
服务器运维问答

Automatic Proxy Configuration Script - Lab Setup Process

· 52CE 我爱测

I have a requirement to set a test machine which utilises automatic proxy configuration using a WPAD.DAT file. This is to replicate a customer environment (that we can't use for testing) so we may develop a fix for one of our sof…

问题原文

原帖链接 · Damo · CC BY-SA 3.0

I have a requirement to set a test machine which utilises automatic proxy configuration using a WPAD.DAT file. This is to replicate a customer environment (that we can't use for testing) so we may develop a fix for one of our software packages.

I have no problem with AD / IIS / Proxy's etc, however I know next to nothing about automatic configuration script and how to correctly set it up.

My current setup is a follows:

1 x IIS which is hosting a wpad.dat file

1 x windows 7 unit, in internet options I've selected use automatic configuration script and pointed the address field to the wpad.dat file via the HTTP address. IP settings are static with only a static IP, valid subnet and internal DNS server setup. (No gateway)

My wpad.date file is :

function FindProxyForURL(url, host)
{ if (isPlainHostName(host))
return "DIRECT";
else
return "PROXY 192.168.10.103:808";
}

The proxy server is CCProxy which works fine when I point Internet Explorer 'proxy server' settings to it.

When I browse any page on my lab machine the browse fails. The proxy server does not receive any hits. Wireshark running on the proxy server also does not register any communicate from this IP.

What do I need to do different to setup this test on one machine?

已采纳解答

原帖链接 · mfinni · CC BY-SA 4.0

  1. Test if the client can download the WPAD.DAT file using IE. If not, it can't load the WPAD.DAT file
  2. Use telnet or curl or something to confirm that the proxy at 192.168.10.103 is actually listening on TCP 808
  3. I think your syntax might be off? My PAC files don't have an else statement where you have one. If you're going to use else, you might need to wrap the return statement in another set of curly brackets. When in doubt, use the Google pactester.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-12-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。