Skip to content

Instantly share code, notes, and snippets.

@sqlwwx
Forked from Jeff2Ma/Dorm-network.scpt
Created May 18, 2016 23:07
Show Gist options
  • Save sqlwwx/04f1d67c2716c9f93a7473f9be0e341c to your computer and use it in GitHub Desktop.
Save sqlwwx/04f1d67c2716c9f93a7473f9be0e341c to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment