Skip to content

Commit 875def8

Browse files
chore: sync setup.sh from bucket [skip ci]
1 parent b0a0140 commit 875def8

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

setup.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ esac
5555

5656
if [ -e /etc/xray ]
5757
then
58-
echo 脚本不是第一次运行,请运行 ./setup.sh uninstall或bash <(curl -Ls https://bucket.voidval.com/proxy/setup.sh) uninstall清理文件
58+
echo 脚本不是第一次运行,请运行 ./setup.sh uninstall或bash '<(curl -Ls https://bucket.voidval.com/proxy/setup.sh)' uninstall清理文件
5959
exit 0
6060
fi
6161

@@ -76,7 +76,7 @@ echo "已安装必要包unzip wget curl"
7676
mkdir /etc/xray >> /dev/null 2>&1
7777
cd /etc/xray
7878
echo "下载xray文件"
79-
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip >> /dev/null 2>&1
79+
wget --progress=bar:force -O Xray-linux-64.zip https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip 2>&1
8080
unzip -qq -o Xray-linux-64.zip
8181
rm -rf Xray-linux-64.zip
8282
echo "xray下载完成"
@@ -207,9 +207,17 @@ echo "config.json生成完毕"
207207

208208
/usr/bin/ln -f /etc/xray/config.json /usr/local/etc/xray/config.json
209209
echo "xtls-vless-vision-reality配置完成"
210-
echo '默认配置订阅连接:'
211-
echo "vless://${uuid}@${ip}:443?encryption=none&security=reality&sni=www.microsoft.com&fp=safari&flow=xtls-rprx-vision&pbk=${public_key}&sid=${sid}&type=tcp&headerType=none#server"
212-
echo "若你希望使用mldsa65, 请使用以下订阅链接:"
213-
echo "vless://${uuid}@${ip}:443?encryption=none&security=reality&sni=www.microsoft.com&fp=safari&flow=xtls-rprx-vision&pbk=${public_key}&sid=${sid}&type=tcp&headerType=none&pqv=${mldsa_verify}#server"
210+
211+
# 将订阅链接写入文件
212+
cat << EOF > /etc/xray/sub.txt
213+
默认配置订阅连接:
214+
vless://${uuid}@${ip}:443?encryption=none&security=reality&sni=www.microsoft.com&fp=safari&flow=xtls-rprx-vision&pbk=${public_key}&sid=${sid}&type=tcp&headerType=none#server
215+
216+
若你希望使用mldsa65, 请使用以下订阅链接:
217+
vless://${uuid}@${ip}:443?encryption=none&security=reality&sni=www.microsoft.com&fp=safari&flow=xtls-rprx-vision&pbk=${public_key}&sid=${sid}&type=tcp&headerType=none&pqv=${mldsa_verify}#server
218+
EOF
219+
chmod 600 /etc/xray/sub.txt
220+
echo "订阅链接已保存,请查看文件获取:cat /etc/xray/sub.txt"
221+
214222
systemctl start xray
215223
systemctl enable xray >> /dev/null 2>&1

0 commit comments

Comments
 (0)