Announcement

Collapse
No announcement yet.

Proxy Autoconfig file

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Proxy Autoconfig file

    I have recently started to try and create a proxy configuration file. I have tested in on a couple of machines with no luck. I am very new to this and would love some assistance to see where I am going wrong.

    My script from the way I currently understand it is:

    1) Checks for network ip address, if in Ip address subnet of 192.168.36.x or 37.x then it goes to one of two proxy servers otherwise all traffic should be direct.


    function FindProxyForURL(url, host)
    {
    if (myIpAddress() == "192.168.37.0") {
    return "PROXY proxyserver:80; PROXY proxyserver:80";
    }
    else if (myIpAddress() == "192.168.36.0") {
    return "PROXY proxyserver; PROXY proxyserver:80";
    }

    {
    return "DIRECT";
    }

  • #2
    Re: Proxy Autoconfig file
    function FindProxyForURL(url, host)
    {
    if (isInNet(myIpAddress(), "192.168.1.0", "255.255.255.0"))
    return "PROXY 192.168.1.1:8080";
    else
    return "DIRECT";
    }

    you probably need a bit more to get your If/Else loops right.

    this came from here:
    http://nscsysop.hypermart.net/proxypac.html


    hopefully it helps a little..
    Please do show your appreciation to those who assist you by leaving Rep Point https://www.petri.com/forums/core/im.../icon_beer.gif

    Comment

    Working...
    X