Created
January 8, 2026 07:20
-
-
Save vimagick/a59c3ca6cce5fb14363b044a6804e5bb to your computer and use it in GitHub Desktop.
build pre-configured ss-tunnel.pkg for macOS
This file contains hidden or 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
| #!/bin/bash | |
| NAME=ss-tunnel | |
| VERSION=1.24.0 | |
| PKG_ID=org.duckdns.easypi.$NAME | |
| PKG_NAME=${NAME}_${VERSION}.pkg | |
| DOWNLOAD_URL=https://github.com/shadowsocks/shadowsocks-rust/releases/download/v${VERSION}/shadowsocks-v${VERSION}.aarch64-apple-darwin.tar.xz | |
| DOWNLOAD_DIR=./payload/usr/local/bin | |
| mkdir -p $DOWNLOAD_DIR | |
| rm -f $DOWNLOAD_DIR/sslocal | |
| curl -sSL $DOWNLOAD_URL | tar xJ -C $DOWNLOAD_DIR sslocal | |
| sudo pkgbuild --install-location / --identifier $PKG_ID --version $VERSION --root payload --scripts scripts $PKG_NAME | |
| echo "====== CONTENT ======" | |
| lsbom $(pkgutil --bom $PKG_NAME) | |
| echo "++++++ INSTALL ++++++" | |
| echo "sudo xattr -d com.apple.quarantine $PKG_NAME && sudo installer -pkg $PKG_NAME -tgt / -verbose" | |
| echo "------ CLEANUP ------" | |
| echo "sudo launchctl bootout system/$NAME && sudo rm /Library/LaunchDaemons/ss-tunnel.plist /usr/local/bin/sslocal && sudo pkgutil --forget $PKG_ID" |
This file contains hidden or 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>Label</key> | |
| <string>ss-tunnel</string> | |
| <key>KeepAlive</key> | |
| <true/> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/usr/local/bin/sslocal</string> | |
| <string>--protocol</string> | |
| <string>tunnel</string> | |
| <string>-b</string> | |
| <string>127.0.0.1:5999</string> | |
| <string>-f</string> | |
| <string>127.0.0.1:5900</string> | |
| <string>-s</string> | |
| <string>x.x.x.x:8388</string> | |
| <string>-m</string> | |
| <string>rc4-md5</string> | |
| <string>-k</string> | |
| <string>hackme</string> | |
| </array> | |
| <key>StandardErrorPath</key> | |
| <string>/usr/local/var/log/ss-tunnel.log</string> | |
| <key>StandardOutPath</key> | |
| <string>/usr/local/var/log/ss-tunnel.log</string> | |
| <key>RunAtLoad</key> | |
| <true/> | |
| </dict> | |
| </plist> |
This file contains hidden or 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
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>URL</key> | |
| <string>vnc://127.0.0.1:5999</string> | |
| </dict> | |
| </plist> |
This file contains hidden or 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
| #!/bin/bash | |
| launchctl bootstrap system /Library/LaunchDaemons/ss-tunnel.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment