mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-22 15:16:58 +00:00
this means we no longer have to hardcode the password in the docker-compose file, and can treat the file as configuration rather than a secret.
20 lines
386 B
Bash
Executable File
20 lines
386 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [[ -f "$PASSWORD_FILE" ]]; then
|
|
PASSWORD=$(cat "$PASSWORD_FILE")
|
|
fi
|
|
|
|
if [[ -f "/var/run/secrets/$PASSWORD_SECRET" ]]; then
|
|
PASSWORD=$(cat "/var/run/secrets/$PASSWORD_SECRET")
|
|
fi
|
|
|
|
exec ss-server \
|
|
-s $SERVER_ADDR \
|
|
-p $SERVER_PORT \
|
|
-k ${PASSWORD:-$(hostname)} \
|
|
-m $METHOD \
|
|
-t $TIMEOUT \
|
|
-d $DNS_ADDRS \
|
|
-u \
|
|
$ARGS
|