DHCP
DHCP server can send DHCPINFORM message and then client can get javascript URL. DHCP server should be supported using DHCPINFORM. Windows 2000 Server/Windows .NET Server support it.
Open DHCP Window
1 Right click the host name and select "Set Predefined Options..."
2 Click "Add" button at "Predefined Option and Values" window. And then type as below. You can give any name, but data type and Code should be "String" and "252"
3 Add "AUTO-PROXY-CONFIG" to each scope options and the value should point your proxy.pac file (make link to proxy.dat or copy same file to proxy.pac)
4 Make a "proxy.pac" (text file) file and copy it into root directory of the local web server. Example "proxy.pac" file
function FindProxyForURL(url,host)
{
if (isPlainHostName(host) || isInNet(host, "10.8.0.0", "255.255.255.0"))
return "DIRECT";
else
return "PROXY 10.8.0.21:3128; DIRECT";
}
Syntax of the script file can be found in http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
Web Proxy Auto Discovery (WPAD)
Support: IE5.0 and above, Netscape
Does not support: Other than above browser
1 Prepare the wpad script file
Make a "wpad.dat" (text file) file and copy it into the root directory of the local web server. Example "wpad.dat" file
function FindProxyForURL(url,host)
{
if (isPlainHostName(host) || isInNet(host, "10.8.0.0", "255.255.255.0"))
return "DIRECT";
else
return "PROXY 10.8.0.21:3128; DIRECT";
}
Syntax of the script file can be found in http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
Make sure the file is accessible by entering the following into your browser
http://%7bip%20address%20of%20the%20internal%20web%20server%7d/wpad.dat
2 Configuring IE
Option 1: Automatically detect settings
i Goto your local DNS server (user workstation should point to this DNS and their workstation domain suffix should exist in this DNS server), under the domain suffix used by user, add a new hostname(or alias) named "wpad" and enter http://%7bip%20address%20of%20the%20internal%20web%20server%7d/wpad.dat as data
ii For every workstation, in IE, goto "Tools -> Internet Options -> Connections -> LAN Settings", check "Automatically detect settings".
Option 2: Use Automatic configuration script
i For every workstation, in IE, goto "Tools -> Internet Options -> Connections -> LAN Settings", check "Use Automatic configuration script". Enter http://%7bip%20address%20of%20the%20internal%20web%20server%7d/wpad.dat in "Address".
ii Or, you can use the following in the loginscript to configure the same setting
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\AutoConfigURL","http://%7bip%20address%20of%20the%20internal%20web%20server%7d/wpad.dat","REG_SZ"