[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: configure web proxy via DHCP server



> It would be really "cool"(tm) if I didn't have to reconfigure every
> program on my laptop to use a different proxy server every time I plug
> it into a different network.

The thing is that MS has an extension for DHCP to do this, the code is 252,
it works only with IE in windows, but I've read it also works with konqueror
in kde, I haven't tried this in Debian, though, anybody has tried this?

I think it would be good if we could get this working.

Both dhcp (version 2) and dhcp3-server (version 3) support this extension if
you declare it, here are a couple of examples:

for dhcp3-server:
option auto-proxy-config code 252 = string;

subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.101 192.168.1.199;
  option auto-proxy-config "http://192.168.1.1/wpad.pac";;
  option routers 192.168.1.1;
}

for dhcp (version 2) in a normal subnet declaration you add:
  option option-252 "http://192.168.1.1/wpad.pac";

The pac files are the ones that are used to configure netscape, mozilla,
opera or IE, it is a javascript that could be in its simpler form something
like:

function FindProxyForURL(url, host)
{
   return "PROXY 192.168.1.1:3128" ;
}

Here are some links to doc on the topic where you can read more and find
more examples about all this:

http://www.dit.gov.bt/~takeshi/material/win2000srv/internet-gw/wpad/
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/ie/reskit/ie6/part6/c26ie6rk.asp
http://www.davidpashley.com/tutorials/automatic-proxy.html
http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
http://www.squid-cache.org/Doc/FAQ/FAQ-5.html

Hope this helps.

Regards...
-- 
Manty/BestiaTester -> http://manty.net



Reply to: