aerolqr
2012-08-29 21:23:49 +08:00
用AppleScript,这是我用来切换GoAgent代理的,更改相应的代理地址和端口,*****相应的填上用户名和密码就可以用了
do shell script "networksetup -setwebproxy Wi-Fi 127.0.0.1 8087" user name "*****" password "*****" with administrator privileges
do shell script "networksetup -setsecurewebproxy Wi-Fi 127.0.0.1 8087" user name "*****" password "*****" with administrator privileges
do shell script "networksetup -setwebproxystate Wi-Fi on" user name "*****" password "*****" with administrator privileges
do shell script "networksetup -setsecurewebproxystate Wi-Fi on" user name "*****" password "*****" with administrator privileges