In OSX Lion I set ssh proxy to connect to work. All I do is

a) in terminal

ssh -D 8080 -f -C -q -N work_host_machine

b) System prefereces, proxy, set socks proxy

Step b) needs to be performed by hand, but can it be set and unset through shell or script?

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

Something like this:

sudo networksetup -setsocksfirewallproxy Ethernet 127.0.0.1 8080 off

...assuming your primary network service is named "Ethernet". If you need to figure out the service name, it gets a bit more complicated; see this code snippet for one way to do it.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.