From 46e7b6cc7d1e4d7a86bbd36475de2f4fc1dd5f49 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Wed, 30 Mar 2022 15:53:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8D=B8=E8=BD=BD=E6=97=B6=E6=AE=8B=E7=95=99Xray-core=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E5=8F=8A=E8=BF=9B=E7=A8=8B=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 108 ++++++++++++++++++++++++++++------------------------- 1 file changed, 58 insertions(+), 50 deletions(-) diff --git a/install.sh b/install.sh index ae7f155..42368ff 100644 --- a/install.sh +++ b/install.sh @@ -1626,7 +1626,7 @@ handleXray() { if [[ -n $(pgrep -f "xray/xray") ]]; then echoContent green " ---> Xray启动成功" else - echoContent red "xray启动失败" + echoContent red "Xray启动失败" echoContent red "请手动执行【/etc/v2ray-agent/xray/xray -confdir /etc/v2ray-agent/xray/conf】,查看错误日志" exit 0 fi @@ -1814,28 +1814,28 @@ EOF { "inbounds":[ { - "port": 31297, - "listen": "127.0.0.1", - "protocol": "vless", - "tag":"VLESSWS", - "settings": { - "clients": [ - { - "id": "${uuid}", - "email": "${domain}_VLESS_WS" - } - ], - "decryption": "none" - }, - "streamSettings": { - "network": "ws", - "security": "none", - "wsSettings": { - "acceptProxyProtocol": true, - "path": "/${customPath}ws" - } - } -} + "port": 31297, + "listen": "127.0.0.1", + "protocol": "vless", + "tag":"VLESSWS", + "settings": { + "clients": [ + { + "id": "${uuid}", + "email": "${domain}_VLESS_WS" + } + ], + "decryption": "none" + }, + "streamSettings": { + "network": "ws", + "security": "none", + "wsSettings": { + "acceptProxyProtocol": true, + "path": "/${customPath}ws" + } + } + } ] } EOF @@ -2222,28 +2222,28 @@ EOF { "inbounds":[ { - "port": 31297, - "listen": "127.0.0.1", - "protocol": "vless", - "tag":"VLESSWS", - "settings": { - "clients": [ - { - "id": "${uuid}", - "email": "${domain}_VLESS_WS" - } - ], - "decryption": "none" - }, - "streamSettings": { - "network": "ws", - "security": "none", - "wsSettings": { - "acceptProxyProtocol": true, - "path": "/${customPath}ws" - } - } -} + "port": 31297, + "listen": "127.0.0.1", + "protocol": "vless", + "tag":"VLESSWS", + "settings": { + "clients": [ + { + "id": "${uuid}", + "email": "${domain}_VLESS_WS" + } + ], + "decryption": "none" + }, + "streamSettings": { + "network": "ws", + "security": "none", + "wsSettings": { + "acceptProxyProtocol": true, + "path": "/${customPath}ws" + } + } + } ] } EOF @@ -2856,16 +2856,24 @@ unInstall() { echoContent green " ---> 停止Nginx成功" fi - handleV2Ray stop - # handleTrojanGo stop + if [[ "${coreInstallType}" == "1" ]]; then + handleXray stop + rm -rf /etc/systemd/system/xray.service + echoContent green " ---> 删除Xray开机自启完成" + + elif [[ "${coreInstallType}" == "2" ]]; then + + handleV2Ray stop + rm -rf /etc/systemd/system/v2ray.service + echoContent green " ---> 删除V2Ray开机自启完成" + + fi if [[ -f "/root/.acme.sh/acme.sh.env" ]] && grep -q 'acme.sh.env' 删除acme.sh完成" - rm -rf /etc/systemd/system/v2ray.service - echoContent green " ---> 删除V2Ray开机自启完成" rm -rf /tmp/v2ray-agent-tls/* if [[ -d "/etc/v2ray-agent/tls" ]] && [[ -n $(find /etc/v2ray-agent/tls/ -name "*.key") ]] && [[ -n $(find /etc/v2ray-agent/tls/ -name "*.crt") ]]; then @@ -4421,7 +4429,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.5.56" + echoContent green "当前版本:v2.5.57" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus