Welcome, Guest. Please login or register.
Did you miss your activation email?
Friday 27 December 2024, 11:20:54 pm

Login with username, password and session length

Download the latest community FREE version  HERE
14262 Posts in 4377 Topics by 6517 Members
Latest Member: Sandro
Search:     Advanced search
+  EFW Support
|-+  Support
| |-+  EFW SMTP, HTTP, SIP, FTP Proxy Support
| | |-+  Problem wpad.dat
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Problem wpad.dat  (Read 28487 times)
tuca
Jr. Member
*
Offline Offline

Posts: 2


« on: Tuesday 07 February 2012, 08:33:41 pm »

Hallo
I have a problem with my network set wpad.dat. works.But the automatic proxy configuration from Endian not works. please help me.DNS Wpad ist work

function FindProxyForURL(url, host)
{
        if (isPlainHostName(host) || shExpMatch( url, "*192.168.2.1*" ) ) {
                return "DIRECT";
        }
        else if (host == "127.0.0.1") {
                return "DIRECT";
        }
        else if (isInNet(host, "192.168.2.0", "255.255.255.0")) {
                return "PROXY 192.168.2.1:8080; DIRECT";
        }
        else if (isInNet(host, "192.168.2.0", "255.255.255.0")) {
                return "PROXY 192.168.2.1:8080; DIRECT";
        }
        else {
                return "DIRECT";
        }
}
Logged
diego.pontes
Jr. Member
*
Offline Offline

Posts: 3


« Reply #1 on: Saturday 25 February 2012, 04:39:48 am »

i'm also having the same problem, i did the setup to dhcp.
Logged
mrkroket
Hero Member
*****
Offline Offline

Posts: 495


« Reply #2 on: Saturday 25 February 2012, 06:18:06 am »

I edited mine. It's for 2.4.0, but maybe works for any version.
You must create a backup of the file: /home/httpd/html/proxy.pac
And replace it with the attached pac file (just remove the ending .txt).

You can create custom pac rules on the file: /var/efw/proxy/proxy.custom.pac
For example, for local subnets and internal servers you must set all of them on internal:
Example of a proxy.custom.pac:
Code:
//PROXY PAC CUSTOM START
    if (isPlainHostName(host)) return "DIRECT";
    if ( host == "localhost" || host.substring(0,4) == "127." ) return "DIRECT";
    if ( url.substring(0, 5) == "file:" ) return "DIRECT";

    if (!isResolvable(host)) return "DIRECT";

    //Do not use proxy on loca subnets
    var resolved_ip = dnsResolve(host);
    if ((isInNet(resolved_ip, "192.168.0.0", "255.255.0.0")) ||
        (isInNet(resolved_ip, "10.0.0.0", "255.0.0.0")) ||
        (isInNet(resolved_ip, "172.16.0.0", "255.240.0.0")))
           {
       return "DIRECT";
           }

//  if (dnsDomainIs(host, "liveupdate.symantecliveupdate.com")) return "DIRECT";
//  if (dnsDomainIs(host, "liveupdate.symantec.com")) return "DIRECT";
//  if (dnsDomainIs(host, "update.symantec.com")) return "DIRECT";
//FIN DE PROXY PAC CUSTOM

Logged
diego.pontes
Jr. Member
*
Offline Offline

Posts: 3


« Reply #3 on: Monday 27 February 2012, 11:29:21 pm »

With me didn't work correctly, i made the change, but don't work, i'll post my proxy.pac.
Logged
mrkroket
Hero Member
*****
Offline Offline

Posts: 495


« Reply #4 on: Tuesday 28 February 2012, 05:47:47 am »

Use mine and add all custom proxy.pac configs on /var/efw/proxy/proxy.custom.pac.
Mine is standard, works for any zone and in transparent and non-transparent (at least I hope so).
Logged
turitopa
Full Member
***
Offline Offline

Posts: 30


« Reply #5 on: Wednesday 01 April 2015, 05:18:00 pm »

mrkroket you are the man! Cool

i have looked all thru google for a fix for /home/httpd/html/proxy.pac file for endian 2.3! Solution is right here.
i got it working somehow for auto config, then just lat week it crapped out on me.  read all sorts of info about missing ")" etc. but no fix on how to correct the perl script!
your attached file works perfectly and now auto-config working (with custom rules;-) so that work laptops will auto configure both in and out of the work domain.
Kudos my  i have used a lot of your little remedies in the past also.

i had forgotten my password for this forum, needed it for this commemt ... and of course to DL your attached file!

yeaha!
Logged

Running XenServr 5.5 on a Dell Poweredge 2950 III rackserver.
vm Endian 2.3
vm sbs 2008
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Page created in 0.094 seconds with 18 queries.
Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Design by 7dana.com