mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-23 01:39:27 +02:00
update keygen.sh
This commit is contained in:
parent
e28c98f398
commit
7521c49011
@ -5,10 +5,10 @@ set -euo pipefail
|
||||
# pwgen 12 1
|
||||
|
||||
NAME=${1:?name is empty}
|
||||
|
||||
REMARK=${2:-EasyPi}
|
||||
SERVER="127.0.0.1:9443"
|
||||
CIPHER="chacha20-ietf-poly1305"
|
||||
SECRET=$(yq -o json config.yml | jq -e -r --arg name "$NAME" '.keys[]|select(.id==$name).secret')
|
||||
DIGEST=$(echo -n "$CIPHER:$SECRET" | base64 | sed 's/=*$//')
|
||||
|
||||
echo "ss://$DIGEST@$SERVER/?outline=1"
|
||||
echo "ss://$DIGEST@$SERVER/?outline=1#$REMARK"
|
||||
|
Loading…
Reference in New Issue
Block a user