+ Post New Thread
Results 1 to 10 of 10
Wireless Networks Thread, wpad.dat in Technical; We have just taken delivery of a new Ruckus Zone Director, and I want to enable auto proxy configuration. Does ...
  1. #1
    sippo's Avatar
    Join Date
    May 2008
    Location
    Swindon, Wiltshire
    Posts
    1,713
    Thank Post
    133
    Thanked 181 Times in 132 Posts
    Rep Power
    108

    wpad.dat

    We have just taken delivery of a new Ruckus Zone Director, and I want to enable auto proxy configuration.

    Does anyone have a copy of a wpad.dat I could possibly edit to use?

    Much Appreciated!!

  2. #2

    Join Date
    Jul 2013
    Posts
    5
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    //Copyright (c) 1997-2006 Microsoft Corporation
    BackupRoute="DIRECT";
    UseDirectForLocal=true;
    function MakeIPs(){
    this[0]="127.0.0.0";
    this[1]="255.0.0.0";
    this[2]="0.0.0.1";
    this[3]="255.255.255.255";
    this[4]="0.0.0.2";
    this[5]="255.255.255.254";
    this[6]="0.0.0.4";
    this[7]="255.255.255.252";
    this[8]="0.0.0.8";
    this[9]="255.255.255.248";
    this[10]="0.0.0.16";
    this[11]="255.255.255.240";
    this[12]="0.0.0.32";
    this[13]="255.255.255.224";
    this[14]="0.0.0.64";
    this[15]="255.255.255.192";
    this[16]="0.0.0.128";
    this[17]="255.255.255.128";
    this[18]="0.0.1.0";
    this[19]="255.255.255.0";
    this[20]="0.0.2.0";
    this[21]="255.255.254.0";
    this[22]="0.0.4.0";
    this[23]="255.255.252.0";
    this[24]="0.0.8.0";
    this[25]="255.255.248.0";
    this[26]="0.0.16.0";
    this[27]="255.255.240.0";
    this[28]="0.0.32.0";
    this[29]="255.255.224.0";
    this[30]="0.0.64.0";
    this[31]="255.255.192.0";
    this[32]="0.0.128.0";
    this[33]="255.255.128.0";
    this[34]="0.1.0.0";
    this[35]="255.255.0.0";
    this[36]="0.2.0.0";
    this[37]="255.254.0.0";
    this[38]="0.4.0.0";
    this[39]="255.252.0.0";
    this[40]="0.8.0.0";
    this[41]="255.248.0.0";
    this[42]="0.16.0.0";
    this[43]="255.240.0.0";
    this[44]="0.32.0.0";
    this[45]="255.224.0.0";
    this[46]="0.64.0.0";
    this[47]="255.192.0.0";
    this[48]="0.128.0.0";
    this[49]="255.128.0.0";
    this[50]="1.0.0.0";
    this[51]="255.0.0.0";
    this[52]="2.0.0.0";
    this[53]="254.0.0.0";
    this[54]="4.0.0.0";
    this[55]="252.0.0.0";
    this[56]="8.0.0.0";
    this[57]="248.0.0.0";
    this[58]="16.0.0.0";
    this[59]="240.0.0.0";
    this[60]="32.0.0.0";
    this[61]="224.0.0.0";
    this[62]="64.0.0.0";
    this[63]="224.0.0.0";
    this[64]="96.0.0.0";
    this[65]="240.0.0.0";
    this[66]="112.0.0.0";
    this[67]="248.0.0.0";
    this[68]="120.0.0.0";
    this[69]="252.0.0.0";
    this[70]="124.0.0.0";
    this[71]="254.0.0.0";
    this[72]="126.0.0.0";
    this[73]="255.0.0.0";
    this[74]="10.72.0.1";
    this[75]="255.255.255.255";
    this[76]="10.72.0.2";
    this[77]="255.255.255.254";
    this[78]="10.72.0.4";
    this[79]="255.255.255.252";
    this[80]="10.72.0.8";
    this[81]="255.255.255.248";
    this[82]="10.72.0.16";
    this[83]="255.255.255.240";
    this[84]="10.72.0.32";
    this[85]="255.255.255.224";
    this[86]="10.72.0.64";
    this[87]="255.255.255.192";
    this[88]="10.72.0.128";
    this[89]="255.255.255.128";
    this[90]="10.72.1.0";
    this[91]="255.255.255.0";
    this[92]="10.72.2.0";
    this[93]="255.255.254.0";
    this[94]="10.72.4.0";
    this[95]="255.255.252.0";
    this[96]="10.72.8.0";
    this[97]="255.255.248.0";
    this[98]="10.72.16.0";
    this[99]="255.255.240.0";
    this[100]="10.72.32.0";
    this[101]="255.255.224.0";
    this[102]="10.72.64.0";
    this[103]="255.255.192.0";
    this[104]="10.72.128.0";
    this[105]="255.255.128.0";
    this[106]="128.0.0.0";
    this[107]="192.0.0.0";
    this[108]="192.0.0.0";
    this[109]="224.0.0.0";
    this[110]="240.0.0.0";
    this[111]="248.0.0.0";
    this[112]="248.0.0.0";
    this[113]="252.0.0.0";
    this[114]="252.0.0.0";
    this[115]="254.0.0.0";
    this[116]="254.0.0.0";
    this[117]="255.0.0.0";
    this[118]="255.0.0.0";
    this[119]="255.128.0.0";
    this[120]="255.128.0.0";
    this[121]="255.192.0.0";
    this[122]="255.192.0.0";
    this[123]="255.224.0.0";
    this[124]="255.224.0.0";
    this[125]="255.240.0.0";
    this[126]="255.240.0.0";
    this[127]="255.248.0.0";
    this[128]="255.248.0.0";
    this[129]="255.252.0.0";
    this[130]="255.252.0.0";
    this[131]="255.254.0.0";
    this[132]="255.254.0.0";
    this[133]="255.255.0.0";
    this[134]="255.255.0.0";
    this[135]="255.255.128.0";
    this[136]="255.255.128.0";
    this[137]="255.255.192.0";
    this[138]="255.255.192.0";
    this[139]="255.255.224.0";
    this[140]="255.255.224.0";
    this[141]="255.255.240.0";
    this[142]="255.255.240.0";
    this[143]="255.255.248.0";
    this[144]="255.255.248.0";
    this[145]="255.255.252.0";
    this[146]="255.255.252.0";
    this[147]="255.255.254.0";
    this[148]="255.255.254.0";
    this[149]="255.255.255.0";
    this[150]="255.255.255.0";
    this[151]="255.255.255.128";
    this[152]="255.255.255.128";
    this[153]="255.255.255.192";
    this[154]="255.255.255.192";
    this[155]="255.255.255.224";
    this[156]="255.255.255.224";
    this[157]="255.255.255.240";
    this[158]="255.255.255.240";
    this[159]="255.255.255.248";
    this[160]="255.255.255.248";
    this[161]="255.255.255.252";
    this[162]="255.255.255.252";
    this[163]="255.255.255.254";
    this[164]="255.255.255.254";
    this[165]="255.255.255.255";
    }
    DirectIPs=new MakeIPs();
    cDirectIPs=166;
    function MakeCARPExceptions(){
    }
    CARPExceptions=new MakeCARPExceptions();
    cCARPExceptions=0;
    function MakeNames(){
    this[0]="*.hesleyinfo.net";
    this[1]="hesleyinfo.net";
    }
    DirectNames=new MakeNames();
    cDirectNames=2;
    HttpPort="8080";
    cNodes=1;
    function MakeProxies(){
    this[0]=new Node("hgws01.hesleyinfo.net",0,1.000000);
    }
    Proxies = new MakeProxies();
    function Node(name, hash, load){
    this.name = name;
    this.hash = hash;
    this.load = load;
    this.score = 0;
    return this;
    }
    function FindProxyForURL(url, host){
    var hash=0, urllower, i, fIp=false, ip, nocarp=false, skiphost=false;
    var list="", pl, j, score, ibest, bestscore;
    urllower = url.toLowerCase();
    if((urllower.substring(0,5)=="rtsp:") ||
    (urllower.substring(0,6)=="rtspt:") ||
    (urllower.substring(0,6)=="rtspu:") ||
    (urllower.substring(0,4)=="mms:") ||
    (urllower.substring(0,5)=="mmst:") ||
    (urllower.substring(0,5)=="mmsu:"))
    return "DIRECT";
    if(UseDirectForLocal){
    if(isPlainHostName(host))
    fIp = true;}
    for(i=0; i<cDirectNames; i++){
    if(shExpMatch(host, DirectNames[i])){
    fIp = true;
    break;}
    if(shExpMatch(url, DirectNames[i]))
    return "DIRECT";
    }
    if(cDirectIPs == 0){
    if(fIp)
    return "DIRECT";}
    else{
    ip = host;
    if(fIp)
    ip = dnsResolve(host);
    var isIpAddr = /^(\d+.){3}\d+$/;
    if(isIpAddr.test(ip)){
    for(i=0; i<cDirectIPs; i += 2){
    if(isInNet(ip, DirectIPs[i], DirectIPs[i+1]))
    return "DIRECT";}}
    else if(isPlainHostName(host))
    return "DIRECT";
    }
    if(cCARPExceptions > 0){
    for(i = 0; i < cCARPExceptions; i++){
    if(shExpMatch(host, CARPExceptions[i])){
    nocarp = true;}
    if(shExpMatch(url, CARPExceptions[i])){
    nocarp = true;
    skiphost = true;
    break;
    }}}
    if(!skiphost)
    hash = HashString(host,hash);
    if(nocarp)
    hash = HashString(myIpAddress(), hash);
    pl = new Array();
    for(i = 0; i<cNodes; i++){
    Proxies[i].score = Proxies[i].load * Scramble(hash ^ Proxies[i].hash);
    pl[i] = i;
    }
    for(j = 0; j < cNodes; j++){
    bestscore = -1;
    for(i = 0; i < cNodes-j; i++){
    score = Proxies[pl[i]].score;
    if(score > bestscore){
    bestscore = score;
    ibest = i;
    }}
    list = list + "PROXY " + Proxies[pl[ibest]].name + ":" + HttpPort + "; ";
    pl[ibest] = pl[cNodes-j-1];
    }
    list = list + BackupRoute;
    return list;
    }
    var h_tbl = new Array(0,0x10D01913,0x21A03226,0x31702B35,0x4340644 C,0x53907D5F,0x62E0566A,0x72304F79,0x8680C898,0x96 50D18B,0xA720FABE,0xB7F0E3AD,0xC5C0ACD4,0xD510B5C7 ,0xE4609EF2,0xF4B087E1);
    function HashString(str, h){
    for(var i=0; i<str.length; i++){
    var c = str.charAt(i);
    if(c ==':' || c == '/') break;
    c = CharToAscii(c.toLowerCase());
    h = (h >>> 4) ^ h_tbl[(h ^ c) & 15];
    h = (h >>> 4) ^ h_tbl[(h ^ (c>>>4)) & 15];
    h = MakeInt(h);
    }
    return h;
    }
    function Scramble(h){
    h += ((h & 0xffff) * 0x1965) + ((((h >> 16) & 0xffff) * 0x1965) << 16) + (((h & 0xffff) * 0x6253) << 16);
    h = MakeInt(h);
    h += (((h & 0x7ff) << 21) | ((h >> 11) & 0x1fffff));
    return MakeInt(h);
    }
    var Chars =" !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€???????????Ž ????????????ž? ­ ";
    function CharToAscii(c){
    return Chars.indexOf(c) + 32;
    }
    function MakeInt(x){
    x %= 4294967296;
    if(x < 0)
    x += 4294967296;
    return x;
    }

  3. #3
    Duke5A's Avatar
    Join Date
    Jul 2010
    Posts
    795
    Thank Post
    81
    Thanked 130 Times in 113 Posts
    Blog Entries
    8
    Rep Power
    31
    @sippo: Here, this one is a bit easier to digest. I use this in my district.

    Code:
    function FindProxyForURL(url, host)
    
    {
    
    //Declare proxy strings as variables
    var studentproxy = "PROXY studentproxy:3128";
    
    // IP not to use proxy
    if (shExpMatch(url, "http://10.*")) { return "DIRECT"; }
    if (shExpMatch(url, "http://192.168.*")) { return "DIRECT"; }
    if (isPlainHostName(host)) { return "DIRECT"; }
    
    // URLS not to use proxy server
    if (shExpMatch(url, "*somesite.edu*")) { return "DIRECT"; }
    if (shExpMatch(url, "*somesite.edu*")) { return "DIRECT"; }
    if (shExpMatch(url, "*somesite.edu*")) { return "DIRECT"; }
    
    // Apply proxy if machine is on internal network
    if (isInNet(myIpAddress(), "10.0.0.0", "255.0.0.0")) { return studentproxy; }
    if (isInNet(myIpAddress(), "10.0.0.0", "/8")) { return studentproxy; }
    
    else
    
    return "DIRECT";
    
    }

  4. Thanks to Duke5A from:

    sippo (30th July 2013)

  5. #4
    sippo's Avatar
    Join Date
    May 2008
    Location
    Swindon, Wiltshire
    Posts
    1,713
    Thank Post
    133
    Thanked 181 Times in 132 Posts
    Rep Power
    108
    Thanks for that.

    Is there a way of redirecting the home page?

  6. #5
    Duke5A's Avatar
    Join Date
    Jul 2010
    Posts
    795
    Thank Post
    81
    Thanked 130 Times in 113 Posts
    Blog Entries
    8
    Rep Power
    31
    Quote Originally Posted by sippo View Post
    Thanks for that.

    Is there a way of redirecting the home page?
    Though WPAD? No, there isn't. That is something you're going to have to do at the proxy. Is this for a guest network setup where you don't admin the devices using it?

  7. #6
    sippo's Avatar
    Join Date
    May 2008
    Location
    Swindon, Wiltshire
    Posts
    1,713
    Thank Post
    133
    Thanked 181 Times in 132 Posts
    Rep Power
    108
    Not the guest network no, just a WLAN.

    Not a biggie, just would be nice.

  8. #7
    phillip_croxford's Avatar
    Join Date
    Feb 2012
    Location
    Doncaster
    Posts
    96
    Thank Post
    23
    Thanked 2 Times in 2 Posts
    Rep Power
    6
    @Duke5A

    can i just ask a question on your WPAD file. i dont write and never dabbled with Java script,

    on line 6 for student proxy, how do i write my proxy address on there. do i replace the word "studentproxy" with my proxy ip x.x.x.x

    thanks

  9. #8

    Join Date
    Jul 2013
    Posts
    5
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by phillip_croxford View Post
    @Duke5A

    can i just ask a question on your WPAD file. i dont write and never dabbled with Java script,

    on line 6 for student proxy, how do i write my proxy address on there. do i replace the word "studentproxy" with my proxy ip x.x.x.x

    thanks
    Either replace 'studentproxy' with the IP address of the proxy or the FQDN of the proxy server, with the appropriate port.

  10. Thanks to hogwam from:

    phillip_croxford (3rd December 2013)

  11. #9
    phillip_croxford's Avatar
    Join Date
    Feb 2012
    Location
    Doncaster
    Posts
    96
    Thank Post
    23
    Thanked 2 Times in 2 Posts
    Rep Power
    6
    Thank you!

  12. #10

    Join Date
    Jul 2013
    Posts
    5
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by sippo View Post
    Thanks for that.

    Is there a way of redirecting the home page?
    You can easily set in Group Policy, or run a VBS like below, replacing the address with your desired homepage

    Code:
    Set objWshShell = CreateObject("WScript.Shell") 
    strHomePage = "http://intranet" 
    objWshShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", strHomePage 
    Set objWshShell = Nothing

SHARE:
+ Post New Thread

Similar Threads

  1. WPAD.DAT with IIS and DNS
    By PatRamsden in forum Wired Networks
    Replies: 24
    Last Post: 3rd December 2013, 11:14 AM
  2. Vlans and wpad.dat
    By victory2012 in forum Wired Networks
    Replies: 3
    Last Post: 8th April 2013, 07:08 PM
  3. wpad.dat file
    By techie211 in forum Windows
    Replies: 5
    Last Post: 5th August 2010, 08:34 AM
  4. WPAD.DAT
    By k-strider in forum Coding
    Replies: 0
    Last Post: 4th July 2007, 03:12 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •