WPAD (web proxy auto detect).

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

WPAD (web proxy auto detect).

Postby sawi » Oct 03 12 4:40 pm

Hi all...

may I request manual for create / setting / configure WPAD in Wingate running on Windows 7 32bit

Thanks :)
sawi
Senior Member
 
Posts: 129
Joined: Mar 26 09 4:49 pm

Re: WPAD (web proxy auto detect).

Postby adrien » Oct 11 12 2:31 pm

Hi

there are some pretty good instructions at http://findproxyforurl.com/

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: WPAD (web proxy auto detect).

Postby sawi » Oct 11 12 3:25 pm

by default WPAD 252 option in DHCP will point to http://wingate/wpad.dat
so, what is correct setting to set?
is it 192.168.0.1/wpad.dat (my wingate server ip 192.168.0.1)
or need point to 192.168.0.1/Program Files/Wingate/???

---
is it need to manually create wpad.dat?
or wingate will auto generate wpad.dat when dhcp client request
(cause I didn't find any wpad.dat in my wingate/resources folder)

thanks :)
sawi
Senior Member
 
Posts: 129
Joined: Mar 26 09 4:49 pm

Re: WPAD (web proxy auto detect).

Postby adrien » Oct 11 12 4:56 pm

Hi

it needs to be a full URL.

To be compatible with the DNS method of WPAD discovery (used by FF and some others), the URL should not contain sub-paths, e.g. http://server/wpad.dat rather than http://server/something/wpad.dat

The server name needs to be resolvable by clients, since they will resolve the IP, then connect to it. So you can include an IP in the URL (this is easy option if you only have 1 internal subnet). E.g.http://192.168.0.1/wpad.dat

As for the file itself, a template file is created by WinGate when first requested if it doesn't exist already. This is in resources\WPAD.template

This file you can edit, since you may have requirements for different proxies for different sites or whatever. By default, the content will be

Code: Select all
function FindProxyForURL(url, host)
{
  if ((url.substring(0, 5) == "http:") ||
      (url.substring(0, 4) == "ftp:")  ||
      (url.substring(0, 6) == "https:"))
  {
    return "PROXY %PROXY%;DIRECT";
  }
  else
  {
    return "SOCKS %SOCKS%;DIRECT";
  }
}


There are 3 supported replaceable parameters which you can use.

the values for %PROXY% and %IP% are replaced by IP:port of the interface that the request was received on (e.g. the WWW proxy used). This is useful in multi-homed situations, since a client on one subnet may not see a proxy on a different interface.
the value for %SOCKS% is replaced by the IP:port of a running SOCKS server on the same interface.

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: WPAD (web proxy auto detect).

Postby sawi » Oct 11 12 5:06 pm

thanks a lot...
now my WPAD work!

:D
sawi
Senior Member
 
Posts: 129
Joined: Mar 26 09 4:49 pm

Re: WPAD (web proxy auto detect).

Postby sawi » Oct 17 12 5:14 pm

after study about WPAD.
from what I understand, there is two type of WPAD
1) DHCP WPAD - option 252 (just like what i did)
2) DNS WPAD

so i tried to find the way to create DNS WPAD, google for manual, but on the net only show how to enable DNS WPAD on ISA server.

any manual or info about DNS WPAD on wingate? (maybe there is the option inside wingate, but myself dont understand how to... :D )

thanks :)
sawi
Senior Member
 
Posts: 129
Joined: Mar 26 09 4:49 pm

Re: WPAD (web proxy auto detect).

Postby adrien » Oct 17 12 9:32 pm

Hi

DNS WPAD is actually built in already. If WinGate DNS server gets a request for "WPAD" it responds with its own IP.

If it's another name to look up, you can get WinGate to respond with its own IP using the hosts file. If you add an entry to the hosts file where the IP is 0.0.0.0, then WinGate responds with the IP of the interface the request was received on, so no matter the interface (e.g. multiple internal interfaces) WinGate will respond with the corresponding IP for the client on that interface.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: WPAD (web proxy auto detect).

Postby sawi » Feb 16 13 4:37 pm

related to WPAD.
I saw MAC OS can't detect wpad correctly.
MAC's user that connect and get IP Address automatically from DHCP can't get wpad for automatic proxy setting.

no problem for all windows user.

any solutions?

from my short search at internet, there lot of discussion in apple forum related to this problem, and I can't find any short solution. :D
sawi
Senior Member
 
Posts: 129
Joined: Mar 26 09 4:49 pm

Re: WPAD (web proxy auto detect).

Postby adrien » Feb 16 13 5:15 pm

Hi
can you maybe do a packet capture to see what the Mac is send when it tries WPAD?

Some clients use DNS, they look for a name. the name can sometimes be wpad, but some clients need a domain suffix. You may need to assign one in DHCP.

I normally set Domain Name (option 15) in global options, which is where I normally put WPAD URL as well (option 252). Then clients using DHCP_INFORM message will also get it.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: WPAD (web proxy auto detect).

Postby sawi » Feb 18 13 6:59 pm

thanks Adrien.
i will do a packet capture if the person who own MAC book come back to office.

other question...
any option to make android device get wpad configuration?
from what I read, android OS can't use wpad, need manually enter proxy.
sawi
Senior Member
 
Posts: 129
Joined: Mar 26 09 4:49 pm


Return to WinGate

Who is online

Users browsing this forum: No registered users and 21 guests