From e9083f8e9dea3c3481452eedd4db6772414dc664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:39:24 +0800 Subject: [PATCH] Update serv00.sh --- serv00.sh | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/serv00.sh b/serv00.sh index a6440ec..762632b 100644 --- a/serv00.sh +++ b/serv00.sh @@ -332,14 +332,9 @@ private_key=$(echo "${output}" | awk '/PrivateKey:/ {print $2}') public_key=$(echo "${output}" | awk '/PublicKey:/ {print $2}') echo "${private_key}" > private_key.txt echo "${public_key}" > public_key.txt - openssl ecparam -genkey -name prime256v1 -out "private.key" openssl req -new -x509 -days 3650 -key "private.key" -out "cert.pem" -subj "/CN=$USERNAME.serv00.net" - nb=$(hostname | cut -d '.' -f 1 | tr -d 's') -if [[ "$nb" =~ (14|15|16) ]]; then -ytb='"jnn-pa.googleapis.com",' -fi hy1p=$(sed -n '1p' hy2ip.txt) hy2p=$(sed -n '2p' hy2ip.txt) hy3p=$(sed -n '3p' hy2ip.txt) @@ -352,7 +347,7 @@ hy3p=$(sed -n '3p' hy2ip.txt) }, "inbounds": [ { - "tag": "hysteria-in", + "tag": "hysteria-in1", "type": "hysteria2", "listen": "$hy1p", "listen_port": $hy2_port, @@ -373,7 +368,7 @@ hy3p=$(sed -n '3p' hy2ip.txt) } }, { - "tag": "hysteria-in", + "tag": "hysteria-in2", "type": "hysteria2", "listen": "$hy2p", "listen_port": $hy2_port, @@ -394,7 +389,7 @@ hy3p=$(sed -n '3p' hy2ip.txt) } }, { - "tag": "hysteria-in", + "tag": "hysteria-in3", "type": "hysteria2", "listen": "$hy3p", "listen_port": $hy2_port, @@ -458,6 +453,9 @@ hy3p=$(sed -n '3p' hy2ip.txt) } } ], +EOF +if [[ "$nb" =~ (14|15|16) ]]; then +cat >> config.json <> config.json < sb.txt