Skip to content

Instantly share code, notes, and snippets.

@sqlwwx
sqlwwx / Dorm-network.scpt
Created May 18, 2016 23:07 — forked from Jeff2Ma/Dorm-network.scpt
Automatic proxy configuration set pac file with applescript & shell script http://devework.com/automatic-proxy-configuration-pac-applescript.html
tell application "System Events"
tell network preferences
do shell script "scselect 'Dorm'"
do shell script "sudo networksetup -setairportpower AirPort on" user name "用户名" password "密码" with administrator privileges
do shell script "open /Applications/Shad**socksX.app" user name “用户名" password "密码" with administrator privileges
end tell
end tell