Last active
December 11, 2015 00:28
-
-
Save Jintian/4516418 to your computer and use it in GitHub Desktop.
Create ssh tunnel automatically, useful for crossing GFW.
If network is down, it will automatically reconnect after network is available.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<dict> | |
<key>NetworkState</key> | |
<true/> | |
</dict> | |
<key>Label</key> | |
<string>org.openssh.dynamic-proxy</string> | |
<key>LimitLoadToSessionType</key> | |
<string>Aqua</string> | |
<key>OnDemand</key> | |
<false/> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/bin/ssh</string> | |
<string>-T</string> | |
<string>-D7070</string> | |
<string>-Nn</string> | |
<string>-C</string> | |
<string>-c</string> | |
<string>blowfish</string> | |
<string>-o</string> | |
<string>ServerAliveInterval=2</string> | |
<string>user@ip</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>StandardErrorPath</key> | |
<string>/tmp/sshtunnel.log</string> | |
<key>StandardOutPath</key> | |
<string>/tmp/sshtunnel.log</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation:
Copy and paste the code into Library/LaunchAgents/org.openssh.dynamic-proxy.plist.