Saturday, July 7, 2012

Zero Configuration Proxy Setup (WPAD)


Zero configuration proxy is advanced version of Auto PAC. It uses some additional techniques. As you know in proxy auto config system, you have to enter the pac url (the url directed to proxy autoconfig file) in the browser settings. So its a bit lengthy to configure all the clients PC (Although you can instruct the users with a splash/proxy welcome page).


So the next technology comes in is WPAD (Web Proxy Auto Discovery Protocol), this makes you free from the above task, this WPAD will publish the pac file which will be automatically configured at the browser.


How To Configure

WPAD can be configured in two ways, it can be published on DHCP server or the DNS server, All the DHCP server has priority this is not used because firefox and non-window chrome does not support WPAD -DHCP.

ok if u want to use the DHCP then just install a web server on the same machine where DHCP server is running, if you are using windows ICS (Internet connection Sharing) then its a DHCP server also so you can host the pac file in that pc. But you should use the DNS for better support.

ok if you choosed the DNS then you have to place the pac file on a server adress on any of its parent level adresses.

For example the address of the DNS is
\
pc.dept.physics.com
then you can use a location wpad.dept.physics.com
wpad.physics.com


MIME Type Settings on the webserver
Even though most clients will process the script regardless of the MIME type returned in the HTTP request, for the sake of completeness and to maximize compatibility, the web server should be configured to declare the MIME type of this file to be either application/x-ns-proxy-autoconfig or application/x-javascript-config.MIME type configuration is necessary.

open the Apache configuration file, search for
any of these lines

 AddType application/x-compress .Z
 AddType application/x-gzip .gz .tgz
 AddType application/x-tar .tgz
 AddType image/x-icon .ico
 AddType application/vnd.wap.wmlc .wmlc
 AddType application/x-httpd-php .phtml .pwml .php5 .php4 .php3 .php2 .php .inc
 AddType text/vnd.wap.wml .wml
 AddType text/vnd.wap.wmlscript .wmls
 AddType text/vnd.wap.wmlscriptc .wmlsc
 AddType image/vnd.wap.wbmp .wbmp

add this line


        AddType application/x-ns-proxy-autoconfig .pac
or

           AddType  application/x-javascript-config  .pac


There is little evidence to favor the use of one MIME type over the other. It would be, however, reasonable to assume that application/x-ns-proxy-autoconfig will be supported in more clients than application/x-javascript-config as it was defined in the original Netscape specification, the latter type coming into use more recently.

No comments:

Post a Comment