1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-30 09:16:41 +02:00

update outline-ss-server

This commit is contained in:
kevin 2024-02-27 23:12:58 +08:00
parent 6b6d7d76ba
commit fa491f5231
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#!/bin/bash
set -euo pipefail
# pwgen 12 1
NAME=${1:?name is empty}
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"

View File

@ -0,0 +1,16 @@
[Unit]
Description=outline-ss-server
After=network.target
[Service]
User=vpn
Group=vpn
WorkingDirectory=/etc/outline-ss-server
ExecStart=/usr/local/bin/outline-ss-server -config=config.yml -metrics=127.0.0.1:9092 -ip_country_db=ip-country.mmdb -replay_history=10000
ExecReload=/bin/kill -HUP $MAINPID
LimitNOFILE=65536
RestartSec=5
Restart=always
[Install]
WantedBy=multi-user.target