Help debugging proxy autoconfig file.
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Squid > Help debugging proxy autoconfig file.




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Help debugging proxy autoconfig file.  
gibsta@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-18-06 06:15 PM

I am trying to create a proxy autoconfig file to be distributed to my
campus network. I have two sets of IP ranges in use in different
buildings. One set is in use by staff, one set is in use by students. I

also am running two proxies, one for staff and one for students. I am
only trying to send SSL connections to the proxies, as I have
transparent proxying on port 80. The reason for creating this script
instead of manually setting the proxy is so that laptops that will
travel off campus will still be able to access the internet. Here is
the script:

//----Begin proxy.pac----
//----  Alerts are currently commented out, but are
//----  there for debugging purposes
function FindProxyForURL(url, host) {
if (url.substring(0, 6) == "https:") {
if (isInNet(myIpAddress(), "10.0.1.0", "255.0.255.0") ||
isInNet(myIpAddress(), "10.0.2.0", "255.0.255.0") ||
isInNet(myIpAddress(), "10.0.3.0", "255.0.255.0")) {
//alert('Staff\n' + url);
return "PROXY 10.x.x.x:8080";
}
else if (isInNet(myIpAddress(), "10.0.4.0", "255.0.255.0") ||
isInNet(myIpAddress(), "10.0.5.0", "255.0.255.0") ||
isInNet(myIpAddress(), "10.0.6.0", "255.0.255.0") ||
isInNet(myIpAddress(), "10.0.7.0", "255.0.255.0") ||
isInNet(myIpAddress(), "10.0.8.0", "255.0.255.0") ||
isInNet(myIpAddress(), "10.0.9.0", "255.0.255.0")) {
//alert('Student\n' + url);
return "PROXY 10.x.x.x:8081";
}
else {
//alert('Direct\n' + url);
return "DIRECT";
}
}
//alert('No proxy!\n' + url);
}
//----End proxy.pac----

This code is working perfectly as expected in Firefox and Opera, but
yeilds very weird behaviour in Internet Explorer. In many cases, the
page will fail to load in less time than a DNS resolution takes to
complete. Other times, a page will load devoid of all images and most
formatting. I have found and disabled the "EnableAutoproxyResultCache"
value in the registry, but still no luck.

Does anybody have any suggestions? Thanks.

Ben Miller






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:07 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register