Solutions Through IT

May 31, 2009

Part One: Setup automatic publishing of HTTP Proxy via DHCP Options

Filed under: Uncategorized — solutionsthroughit @ 16:45

I’ve been wanting to setup an automatic “push” of a proxy server for a while now, so where SBS 2003 Premium (or sites with ISA or other web proxys configured) I can now have proxied HTTP access, for all computers, including mine and other “guests”, without having to configure them.  This is a three part article on how to do this.

Part One: wpad.dat

The wpad.dat file is a simple (or complex) javascript file, that will configure one or more proxy servers, and configure direct access for sites depending on your requirements.  The following is a fairly simple configuration – google wpad.dat for more examples.

function FindProxyForURL(url, host)
{
if (isPlainHostName(host)) { return “DIRECT”; }
if (isInNet(host, “192.168.0.0?, “255.255.255.0?)) { return “DIRECT”; }
if (shExpMatch(url, “http://mydomain.com.au*”)) { return “DIRECT”; }
return “PROXY 192.168.0.1:8080; DIRECT”;
}

This configuration will return direct results (not use the proxy) for sites in the 192.168.0.x subnet, or for those on the http://mydomain.com.au website.  Otherwise, the browser will attempt to use the proxy at 192.168.0.1 on port 8080, and if this does not work, will attempt to return results direct from the internet.

Once you’ve created your wpad.dat file, you’re ready for the next part – preparing your web server for publishing wpad.dat

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: