From 9e6bbad168fc83d917e3193e7988736aa7124f99 Mon Sep 17 00:00:00 2001 From: eooce <142894633+eooce@users.noreply.github.com> Date: Sat, 17 Aug 2024 14:55:12 +0800 Subject: [PATCH] =?UTF-8?q?VPS=E4=B8=80=E9=94=AE=E5=9B=9B=E5=90=88?= =?UTF-8?q?=E4=B8=80=E8=84=9A=E6=9C=AC(reality+vmess-tls(argo)+hysteria2+t?= =?UTF-8?q?uic5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sing-box.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sing-box.sh b/sing-box.sh index 96c1cea..5a4cbef 100644 --- a/sing-box.sh +++ b/sing-box.sh @@ -1131,19 +1131,28 @@ ingress: - service: http_status:404 EOF - sed -i '/^ExecStart=/c ExecStart=/bin/sh -c "/etc/sing-box/argo tunnel --edge-ip-version auto --config /etc/sing-box/tunnel.yml run 2>&1"' /etc/systemd/system/argo.service + if [ -f /etc/alpine-release ]; then + sed -i '/^command_args=/c\command_args="-c '\''/etc/sing-box/argo tunnel --edge-ip-version auto --config /etc/sing-box/tunnel.yml run 2>&1'\''"' /etc/init.d/argo + else + sed -i '/^ExecStart=/c ExecStart=/bin/sh -c "/etc/sing-box/argo tunnel --edge-ip-version auto --config /etc/sing-box/tunnel.yml run 2>&1"' /etc/systemd/system/argo.service + fi restart_argo sleep 1 change_argo_domain elif [[ $argo_auth =~ ^[A-Z0-9a-z=]{120,250}$ ]]; then - sed -i '/^ExecStart=/c ExecStart=/bin/sh -c "/etc/sing-box/argo tunnel --edge-ip-version auto --no-autoupdate --protocol http2 run --token '$argo_auth' 2>&1"' /etc/systemd/system/argo.service + if [ -f /etc/alpine-release ]; then + sed -i "/^command_args=/c\command_args=\"-c '/etc/sing-box/argo tunnel --edge-ip-version auto --no-autoupdate --protocol http2 run --token $argo_auth 2>&1'\"" /etc/init.d/argo + else + + sed -i '/^ExecStart=/c ExecStart=/bin/sh -c "/etc/sing-box/argo tunnel --edge-ip-version auto --no-autoupdate --protocol http2 run --token '$argo_auth' 2>&1"' /etc/systemd/system/argo.service + fi restart_argo sleep 1 change_argo_domain else yellow "你输入的argo域名或token不匹配,请重新输入" - manage_argo + manage_argo fi ;; 5)