[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 940
  • Last Modified:

Proxy settings

We have laptop users in the office here that use a proxy server, when they take their laptop home they need it off, anyway to do this automatically without creating batch files or files to modify the registry. Thanks
1 Solution
Hi tollair,

not without a file, the proxy should get bypassed at home anyway if the auto detect button is enabled
You can do this with a proxy.pac file.

Something like this:

proxy_yes is the IP and port of yoru proxy server.  Each of those websites in the if statements say return the proxy_no for websites you want to bypass the proxy.

After the special circumstances, you check if the laptop is on your LAN/WAN at work.  If it is on the yoru network, return the PROXY server IP.  If it is not on your work network, return DIRECT.  It checks to see if it is on the network in this example.  Obviously, you need to make this work with your work's subnet.

Now, save this as a text file called proxy.pac not proxy.txt or anything like that.  Now, you put this on your companies website in a location where it can be downloaded from anywhere.  I.e. http://www.mycompany.com/proxy.pac

Now you setup Internet Explorer or another browser to use this .pac file.

Tools, Internet Options, Connections Tab, LAN Settings, CHECK "Use Automatic Proxy Configureation Script" and put in the URL to the proxy.pac file.

You can also do automatic proxy configureation, but that is more challenging.  Basically you have to setup DHCP or WPAD and DNS to do that.  I suggest you just do the automatic proxy config.

function FindProxyForURL(url, host)
// variable strings to return
var proxy_yes = "PROXY";
var proxy_no = "DIRECT";
if (shExpMatch(url, "http://www.mycompanywebsite.com*")) { return proxy_no; }
if (shExpMatch(url, "http://www.myotherwebsite.com*")) { return proxy_no; }
if (shExpMatch(url, "http://www.my3rdlocalsite.com*")) { return proxy_no; }
if (shExpMatch(url, "*")) { return proxy_no; }
// Proxy if PC is on local LAN
if (isInNet(myIpAddress(), "", ""))
return "PROXY";
return "DIRECT";

YOu can find all of the information you need here.




Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now