+ Post New Thread
Results 1 to 6 of 6
Enterprise Software Thread, .pac problem in Technical; Hi, This is a copy of our pac file. We host it on an IIS 7.5 server and the path ...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454

    .pac problem

    Hi,

    This is a copy of our pac file. We host it on an IIS 7.5 server and the path name is http://autocfg/autocfg.pac - autocfg in DNS points to the server it lives.

    It works fine for most but a few glitches.

    The style sheet (i think) doesnt load properly on the BBC site. Screenshot attached.

    When you go to AQA website and click More Courses and Events in the bottom left you get page cannot be displayed.

    All works ok when going to the proxy direct.

    Any thoughts please?

    Thanks

    Code:
    function FindProxyForURL(url, host)
    {
    //Variable strings to return
    	var proxy_no = "DIRECT";
    //If specific URL needs to bypass proxy, send traffic direct
    
    	if (shExpMatch(url, "*172.*")) { return proxy_no; }
    	if (shExpMatch(url, "*10.*")) { return proxy_no; }
    	if (shExpMatch(url, "*192.*")) { return proxy_no; }
    	if (shExpMatch(url, "*127.0.0.1*")) { return proxy_no; }
    
    	if (shExpMatch(url, "https://mail.school.com*")) { return proxy_no; }	
    	if (shExpMatch(url, "https://vle.school.com*")) { return proxy_no; }
    	if (shExpMatch(url, "https://gateway.school.com*")) { return proxy_no; }
    	if (shExpMatch(url, "https://*authorityweb*")) { return proxy_no; }
    	if (shExpMatch(url, "http://vle.school.com*")) { return proxy_no; }
    	if (shExpMatch(url, "http://www.school.com*")) { return proxy_no; }
    	if (shExpMatch(url, "http://library.fphs.intra*")) { return proxy_no; }
    	if (shExpMatch(url, "http://helpdesk.fphs.intra*")) { return proxy_no; }
    	if (shExpMatch(url, "http://fp-oliver*")) { return proxy_no; }
    	if (shExpMatch(url, "http://clipbank*")) { return proxy_no; }
    	if (shExpMatch(url, "http://*snrmbc-rsi/*")) { return proxy_no; }
    	if (shExpMatch(url, "http://*.falinge.int*")) { return proxy_no; }
    	if (shExpMatch(url, "http://*.fphs.intra*")) { return proxy_no; }
    	if (shExpMatch(url, "http://*fp-print*")) { return proxy_no; }
     
    // If at school, use proxy
    	if (isInNet(myIpAddress(), "172.16.4.0", "255.255.252.0")) { return "PROXY 10.112.5.193:80"; }
    	if (isInNet(myIpAddress(), "172.16.128.0", "255.255.252.0")) { return "PROXY 10.112.5.193:80"; }
    	if (isInNet(myIpAddress(), "172.16.132.0", "255.255.252.0")) { return "PROXY 10.112.5.193:80"; }
    	if (isInNet(myIpAddress(), "172.16.140.0", "255.255.252.0")) { return "PROXY 10.112.5.193:80"; }
    	if (isInNet(myIpAddress(), "172.16.141.0", "255.255.252.0")) { return "PROXY 10.112.5.193:80"; }
    	else
    		return "DIRECT";
    }
    Attached Images Attached Images

  2. #2


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    I don't see why this is a problem with the pac file - since the pac file just sends the request to the proxy server.
    IMO the issue is with the proxies, not the pac file.

  3. #3

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454
    It works fine without the .pac file...

  4. #4
    IrritableTech's Avatar
    Join Date
    Nov 2007
    Location
    West Yorkshire
    Posts
    813
    Thank Post
    88
    Thanked 179 Times in 147 Posts
    Rep Power
    66
    Your private ranges are wrong. 192.32.*.* is a valid public IP range for example.

    I'd be changing these bits...

    if (shExpMatch(url, "*172.*")) { return proxy_no; }
    if (shExpMatch(url, "*10.*")) { return proxy_no; }
    if (shExpMatch(url, "*192.*")) { return proxy_no; }
    if (shExpMatch(url, "*127.0.0.1*")) { return proxy_no; }

    To something like this...

    if (isInNet(host, "10.0.0.0", "255.0.0.0")) { return proxy_no; }
    if (isInNet(host, "172.16.0.0", "255.240.0.0")) { return proxy_no; }
    if (isInNet(host, "192.168.0.0", "255.255.0.0")) { return proxy_no; }
    Last edited by IrritableTech; 15th October 2012 at 09:03 AM.

  5. #5
    IrritableTech's Avatar
    Join Date
    Nov 2007
    Location
    West Yorkshire
    Posts
    813
    Thank Post
    88
    Thanked 179 Times in 147 Posts
    Rep Power
    66
    Any luck @FN-GM ?

    I did guess at that code a bit.

  6. #6

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454
    I thought it worked then it broke again. Just looking into something else, will try soon.

SHARE:
+ Post New Thread

Similar Threads

  1. .pac file problem
    By FN-GM in forum Windows
    Replies: 22
    Last Post: 8th February 2012, 09:07 PM
  2. Ruckus problems with WPAD and PAC files
    By cookie_monster in forum Wireless Networks
    Replies: 2
    Last Post: 18th February 2011, 11:32 AM
  3. Proxy.Pac Config File Problems
    By FN-GM in forum Coding
    Replies: 3
    Last Post: 9th December 2010, 10:12 AM
  4. .pac file problem
    By mrbios in forum Scripts
    Replies: 3
    Last Post: 16th October 2009, 11:28 AM

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
  •