Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Toggle a proxy server on and off via scripts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Toggle a proxy server on and off via scripts
Authored by: hj45lp on May 30, '10 03:56:15AM

The other days I stayed at a hotel with wireless, and I wanted to use a SOCKS proxy (ssh) for accessing machines inside my company network and also for security: the hotel does not need to know what I am looking at. I have two locations set up with and without proxy. I needed a no-proxy location to enter the password for the wireless access, but when thereafter switching to the proxy location, Airport disconnected and reconnected, and the hotel's system required me to enter my password again, but for doing that I needed the no-proxy location. Argh! So the only way was going into System Preferences and toggle the proxy on/off.

This hint enables me to automise the process, always toggling the proxy on before starting ssh to create the socks proxy.

While I am not using the applescript solution this pointed me to the networksetup utility. Big thank you for that! And I confirm that that utility also works in Snow Leopard.

Thanks!



[ Reply to This | # ]