+ Post New Thread
Results 1 to 1 of 1
Internet Related/Filtering/Firewall Thread, PAC File and IE8 in Technical; Hello! Following is our PAC file: if (/MSIE(\d+\.\d+);.test(navigator.userAgent)) { // test for MSIE x.x; var ieversion=new Number(RegExp.$1) if (ieversion >= ...
  1. #1

    Join Date
    Apr 2010
    Location
    Torquay
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    PAC File and IE8

    Hello!

    Following is our PAC file:

    if (/MSIE(\d+\.\d+);.test(navigator.userAgent))
    {
    // test for MSIE x.x;
    var ieversion=new Number(RegExp.$1)
    if (ieversion >= 8)
    {
    // ie 8 proxy auto config bit
    function FindProxyForURL (url, host)
    {
    if (shExpMatch(url, "[url]))
    {
    return "DIRECT";
    }
    // required for Internet Explorer 8
    if (isInNet(dnsResolve(host), "10.2.0.0", "255.255.0.0"))
    {
    return "PROXY [proxy_server]:8080";
    }
    else // user is outside of the school network
    {
    return "DIRECT";
    }
    }
    }
    if (ieversion <= 7)
    {
    function FindProxyForURL (url, host)
    {
    if (shExpMatch(url, "[url]))
    {
    return "DIRECT";
    }
    if (isInNet(myIpAddress(), "10.2.0.0", "255.255.0.0"))
    {
    return "PROXY ICT0IWF:8080";
    }
    else
    {
    return "DIRECT";
    }
    }
    }
    else
    {
    // so something, perhaps for the future. Not IE
    }
    }

    We are currently upgrading from Internet Explorer 7 to version 8 and as per this [thewaystation] posting, IE8 requires new syntax for the proxy
    files where you must use DNS to resolve a host name to use in the function isInNet hence:

    if (isInNet(dnsResolve(host), "10.2.0.0", "255.255.0.0"))

    ...which is documented [here_url].

    And whilst this is all good, it doesn't work! I have debugged thus far:

    1 Direct connection using IE8
    2 Proxy and direct connection using older versions of IE

    When using IE8 this bit of logic in the code does not work as expected (IE8 attempts a direct connection):

    if (isInNet(dnsResolve(host), "10.2.0.0", "255.255.0.0"))
    {
    return "PROXY [proxy_server]:8080";
    }

    Further help to get this to work would be greatly appreciated!

    Regards, Matt
    Last edited by mpepprell; 7th April 2010 at 11:41 AM.



SHARE:
+ Post New Thread

Similar Threads

  1. Proxy .pac file
    By FN-GM in forum Internet Related/Filtering/Firewall
    Replies: 4
    Last Post: 10th February 2010, 11:33 AM
  2. .pac file problem
    By mrbios in forum Scripts
    Replies: 3
    Last Post: 16th October 2009, 12:28 PM
  3. proxy .pac file
    By sted in forum Windows
    Replies: 12
    Last Post: 24th September 2009, 08:50 PM
  4. Replies: 2
    Last Post: 29th April 2008, 04:17 PM
  5. Creating a PAC file
    By u8dmtm in forum Coding
    Replies: 4
    Last Post: 2nd March 2006, 04:49 PM

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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