Skip to content
CELS Virtual Helpdesk

CELS Virtual Helpdesk

  • Systems Group
  • Blog
  • Documentation

CELS Virtual Helpdesk

CELS Shared Services Systems Group

Documentation Search

Search for:

Most Recent Dispatch

  • Network Firewall Migrations, Wednesday April 30th 5PM – 8PM

Site search

Changed the Proxy config

March 29, 2022 by Stacey, Craig

Last night I made a change to the browser proxy autoconfiguration script to make it more user friendly. Now, it will bypass the proxy for FTP links, since we never intended for it to proxy FTP, and will automatically fall back to using no proxy if...

Last night I made a change to the browser proxy autoconfiguration script to make it more user friendly. Now, it will bypass the proxy for FTP links, since we never intended for it to proxy FTP, and will automatically fall back to using no proxy if it finds the proxy is unreachable.For those who like the technical details, read on. For those playing along at home, here’s the deal. If you configure your browser to set its proxy settings by using an autoconfiguration URL (or “configure via a .pac file”), and point it at:http://www.mcs.anl.gov/proxy/proxy.pacYou’ll get the right proxy behavior. A rule exists on the web server, like so:

rewritecond %{remote_addr} ^130.202.96. [OR]rewritecond %{remote_addr} ^130.202.97. [OR]RewriteCond %{remote_addr} ^140.221.18.RewriteRule ^/proxy/proxy.pac /proxy/proxy-vpn.pac

This rule says that if you’re coming from 130.202.96.0, 130.202.97.0 or 140.221.18.0 (wireless, wireless and VPN, respectively), instead of proxy.pac, you’ll be handed proxy-vpn.pac.proxy.pac says this:

function FindProxyForURL(url, host){return "DIRECT";}

i.e. NOOP.proxy-vpn.pac *used* to say this:

function FindProxyForURL(url, host){return "PROXY echo.mcs.anl.gov:3131";}

Which routed all your stuff through echo. Turns out this had two flaws. One being that echo isn’t set up to be an FTP proxy (we never intended to proxy FTP), and the other being that some browsers would not detect the change in networks and just fail to load anything if you left the above-mentioned networks without quitting the browser.The new file takes care of both these cases:

function FindProxyForURL(url, host){if (url.substring(0, 4) == "ftp:") { return "DIRECT"; }else { return "PROXY echo.mcs.anl.gov:3131;DIRECT"; }}

First case tells FTP traffic not to proxy, second case says to try echo, and if that fails, then go about doing things normally.This should lead to a happier experience, methinks.–Craig

Post navigation

Previous Post:

Mail server maintenance

Next Post:

Another tweak to the proxy

Leave a Reply

You must be logged in to post a comment.

Helpful links

  • Service Catalog
  • Request…
    • a domain name
    • a GCE Unix Group
    • an IP Address
    • a Laptop Build
    • a loaner laptop
    • a JIRA project
    • a Mailing List
    • an Overleaf account
    • a port activation
    • a poster print
    • a reactivation for a returning user
    • an upgrade to Slack Business Plus from Free.
    • a WordPress migration
    • a WordPress site
    • an xgitlab or gitlab migration
    • a Zoom license upgrade

Previous Dispatches

Search Documentation

Search for:

Privay & Security Notice

Privacy & Security Notice

Site tools

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2025 CELS Virtual Helpdesk | WordPress Theme by Superbthemes