I used to use macropolo (now maintained as ControlPlane | Context Sensitive Computing) to switch locations based on the local subnet, we've no longer got a proxy so I've not used it since.