Skip to content

Instantly share code, notes, and snippets.

@zQueal
Last active June 6, 2017 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zQueal/eebe993527f6b8884cbc9b7d044cfdad to your computer and use it in GitHub Desktop.
Save zQueal/eebe993527f6b8884cbc9b7d044cfdad to your computer and use it in GitHub Desktop.
A little fish shell function to help build shadowsocks sessions in screen
function sshadowsocks --description 'create shadowsocks instance for user'
set -x USERNAME $argv[1]
set -x PASSWORD (go-shadowsocks2 -keygen 16)
set -x PORT $argv[2]
screen -dmS (echo $USERNAME"_"$PORT) go-shadowsocks2 -s ss://AEAD_AES_128_GCM:(echo $PASSWORD)@:(echo $PORT) -verbose
echo "Password: "$PASSWORD
echo "Cipher: AEAD_AES_128_GCM"
echo "Port: "$PORT
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment