SOCKs Proxy

Under the “Advanced…” button of the Network System Preferences pane, under the “Proxies” tag, Configure Proxies “Manually”, there is a SOCKS Proxy check box. Is there any way to check/uncheck this besides GUI scripting into it?

Hi Adam,

maybe /usr/sbin/networksetup ?

Good guess, but I couldn’t master it, or it doesn’t work in all cases.

More poking around reveals that the way proxies and “network services” are handled in OS X is messy. For the most part, these settings are stored in a plist file: /Library/Preferences/SystemConfiguration/preferences.plist. Just to confuse the issue, however, that’s not the only place they end up because there’s also a thing called the “dynamic store” which is what is reached using the “scutil” CLU. Best I can tell, the “networksetup” CLU is trying to read/write the SystemConfiguration.plist file but doesn’t appear to succeed (fails on both reading and writing for some arguments). Presumably it did work in an earlier version of Leopard, but doesn’t now in 10.5.6. Perhaps a security repair broke it. Too bad, because there’s a lot of good stuff in there for a scripter.

I’ll try a Location approach.

I have 10.5.6 and i use this, but it fails:

do shell script "networksetup -setsockswirewallproxystate on"

BTW, why this gives empty “” result:

do shell script "networksetup -getwebproxy AirPort" user name "cirno" password "password" with administrator privileges

For some reason, it duplicates preferences.plist file as preferences.plist.old in SystemConfiguration folder.