Update t.sh

Former-commit-id: 7c43a5871c2bfc0ac3bb4e57b2e86b94e0579c6f
This commit is contained in:
fscarmen
2021-06-08 17:24:54 +08:00
committed by GitHub
parent f4649fe4df
commit 8674db15fa
+8 -4
View File
@@ -1,10 +1,14 @@
##### 为 IPv4 only VPS 添加 WGCF,双栈走 warp #####
##### KVM 属于完整虚拟化的 VPS 主机,网络性能方面:内核模块>wireguard-go。#####
# 判断系统架构是 AMD 还是 ARM
# 判断系统架构是 AMD 还是 ARM,虚拟化是 LXC 还是 KVM,设置应用的依赖与环境
if [[ $(hostnamectl) =~ .*arm.* ]]
then sys=arm64
else sys=amd64
then wgcfpath=https://github.com/ViRb3/wgcf/releases/download/v2.2.3/wgcf_2.2.3_linux_arm64
elif [[ $(hostnamectl) =~ .*lxc.* ]]
then wgcfpath=https://github.com/fscarmen/warp/raw/main/wireguard-go
wget -nc -P /usr/bin https://github.com/fscarmen/warp/raw/main/wireguard-go
chmod +x /usr/bin/wireguard-go
else wgcfpath=https://github.com/ViRb3/wgcf/releases/download/v2.2.3/wgcf_2.2.3_linux_amd64
fi
# 判断系统,安装差异部分
@@ -68,7 +72,7 @@ fi
# 以下为3类系统公共部分
# 安装 wgcf
sudo wget -nc -O /usr/local/bin/wgcf https://github.com/ViRb3/wgcf/releases/download/v2.2.3/wgcf_2.2.3_linux_$sys
sudo wget -nc -O /root/wgcf $wgcfpath
# 添加执行权限
sudo chmod +x /usr/local/bin/wgcf