Created
October 16, 2019 02:58
-
-
Save HaskellZhangSong/d8b6210a283410685fb7834944977b6c to your computer and use it in GitHub Desktop.
ss server config to ss url and qrcode
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 | |
method=`cat $1 | jq '.method'` | |
method1=`sed -e 's/^"//' -e 's/"$//' <<<"$method"` | |
password=`cat $1 | jq '.password'` | |
password1=`sed -e 's/^"//' -e 's/"$//' <<<"$password"` | |
server_port=`cat $1 | jq '.server_port'` | |
server_ip=`curl -s ip.sb` | |
url=$(echo -n "${method1}:${password1}@${server_ip}:${server_port}" | base64) | |
echo ss://$url | |
echo ss://$url | qrencode -t UTF8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment