From 91134794ab9750d3e7075d44ea79e9d36d4317cc Mon Sep 17 00:00:00 2001 From: 233boy <31657650+233boy@users.noreply.github.com> Date: Sat, 8 Jan 2022 14:54:03 +0800 Subject: [PATCH] fix VMessAEAD --- v2ray.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/v2ray.sh b/v2ray.sh index 50a188d..bfaac18 100644 --- a/v2ray.sh +++ b/v2ray.sh @@ -10,7 +10,7 @@ none='\e[0m' # Root [[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 -_version="v3.47" +_version="v3.48" cmd="apt-get" @@ -89,6 +89,14 @@ v2ray_ver="$(/usr/bin/v2ray/v2ray -version | head -n 1 | cut -d " " -f2)" systemd=true # _test=true +# fix VMessAEAD +if [ ! $(grep 'v2ray.vmess.aead.forced=false' /lib/systemd/system/v2ray.service) ]; then + systemctl disable v2ray >/dev/null 2>&1 + sed -i 's|ExecStart=|ExecStart=/usr/bin/env v2ray.vmess.aead.forced=false |' /lib/systemd/system/v2ray.service + systemctl enable v2ray >/dev/null 2>&1 + systemctl restart v2ray >/dev/null 2>&1 +fi + if [[ $v2ray_ver != v* ]]; then v2ray_ver="v$v2ray_ver" fi