Proxies for MacOS X are to be configured in the network preferences, individually for each network interface. Sometimes, that’s not what you want, and Authoxy or FoxyProxy can be great tools. FoxyProxy in particular lets you switch between different proxies for Firefox, and also lets you turn them on and off easily or even automatically by certain URL patterns. Wouldn’t it be great to do similar things also for other programs, or, say Safari?
Using a little scripting, that’s indeed quite simple. For me, it is
sufficient to turn on and off a proxy located in another country,
allowing me to view certain online TV using Safari. But you could do
more. The magic ingredient is networksetup
, a command line tool to
the network preference pane. Just look at the manpage for a list of
available options.
And here’s my little script to turn on and off the proxy services, especially the streaming proxy is important for me, so that I don’t have to use the mouse to do that: