fix ss server port on change v2ray

This commit is contained in:
mercury
2023-02-14 15:26:01 +04:00
parent b34cd8c78d
commit b8f86fafcb
2 changed files with 2 additions and 8 deletions
-1
View File
@@ -318,7 +318,6 @@ class Bot
$c['plugin_opts'] = 'server;loglevel=none';
$l['server'] = 'ng';
$l['server_port'] = 443;
$c['server_port'] = 443;
$l['plugin'] = 'v2ray-plugin';
$l['plugin_opts'] = "tls;fast-open;path=/v2ray;host=$domain";
}
+2 -7
View File
@@ -1,11 +1,6 @@
cat /ssh/key.pub > /root/.ssh/authorized_keys
service ssh start
sed -n "s/\"server_port\": \([0-9]\+\),/\1/p" /config.json > current_port
CURRENT_PORT=$(cat current_port | tr -d " ")
if [ "$CURRENT_PORT" -ne "443" ]
then
sed "s/\"server_port\": [0-9]\+/\"server_port\": $SSPORT/" /config.json > change_port
cat change_port > /config.json
fi
sed "s/\"server_port\": [0-9]\+/\"server_port\": $SSPORT/" /config.json > change_port
cat change_port > /config.json
/ssserver -v -d -c /config.json
tail -f /dev/null