Browse Source
Update
Update
- Solve the problem of not being able to enter the container - Execute strip after compilation - Support multi-threaded compilationpull/2913/head
vndroid
2 years ago
committed by
Max Lv
2 changed files with 42 additions and 32 deletions
Split View
Diff Options
@ -1,22 +1,31 @@ |
|||
#!/bin/sh |
|||
# vim:sw=4:ts=4:et |
|||
|
|||
if [[ -f "$PASSWORD_FILE" ]]; then |
|||
PASSWORD=$(cat "$PASSWORD_FILE") |
|||
fi |
|||
set -e |
|||
|
|||
if [[ -f "/var/run/secrets/$PASSWORD_SECRET" ]]; then |
|||
PASSWORD=$(cat "/var/run/secrets/$PASSWORD_SECRET") |
|||
fi |
|||
if [ "$1" = "ss-server" ]; then |
|||
COREVER=$(uname -r | grep -Eo '[0-9].[0-9]+' | sed -n '1,1p') |
|||
CMV=$(echo $COREVER | awk -F '.' '{print $1}') |
|||
CSV=$(echo $COREVER | awk -F '.' '{print $2}') |
|||
|
|||
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 |
|||
|
|||
if [[ ! -z "$DNS_ADDRS" ]]; then |
|||
DNS="-d $DNS_ADDRS" |
|||
fi |
|||
|
|||
if [[ ! -z "$DNS_ADDRS" ]]; then |
|||
ARGS="-d $DNS_ADDRS $ARGS" |
|||
if [ $(echo "$CMV >= 3" | bc) ]; then |
|||
if [ $(echo "$CSV > 7" | bc) ]; then |
|||
TFO='--fast-open' |
|||
fi |
|||
fi |
|||
RT_ARGS="-s $SERVER_ADDR -p $SERVER_PORT -k ${PASSWORD:-$(hostname)} -m $METHOD -a nobody -t $TIMEOUT -u $DNS $TFO $ARGS" |
|||
fi |
|||
|
|||
exec ss-server \ |
|||
-s $SERVER_ADDR \ |
|||
-p $SERVER_PORT \ |
|||
-k ${PASSWORD:-$(hostname)} \ |
|||
-m $METHOD \ |
|||
-t $TIMEOUT \ |
|||
-u \ |
|||
$ARGS |
|||
exec $@ $RT_ARGS |
Write
Preview
Loading…
Cancel
Save