Update menu.sh

dependabot/github_actions/actions/checkout-3.1.0
fscarmen 4 years ago committed by GitHub
parent 41ac77f9c1
commit 557b871051
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      menu.sh

@ -1160,11 +1160,6 @@ install(){
wget --no-check-certificate $CDN -O /usr/bin/wgcf https://github.com/fscarmen/warp/raw/main/wgcf/wgcf_"$latest"_linux_$ARCHITECTURE
chmod +x /usr/bin/wgcf
# 如是 LXC,安装 Wireguard-GO。部分较低内核版本的KVM,即使安装了wireguard-dkms, 仍不能正常工作,兜底使用 wireguard-go
[[ $LXC = 1 ]] || ([[ $WG = 1 ]] && [[ $(systemctl is-active wg-quick@wgcf) != active || $(systemctl is-enabled wg-quick@wgcf) != enabled ]]) &&
wget --no-check-certificate $CDN -N https://github.com/fscarmen/warp/raw/main/wireguard-go/wireguard-go_linux_$ARCHITECTURE.tar.gz &&
tar xzf wireguard-go_linux_$ARCHITECTURE.tar.gz -C /usr/bin/ && rm -f wireguard-go_linux_* && chmod +x /usr/bin/wireguard-go
# 如安装 WireProxy ,尽量下载官方的最新版本,如官方 WireProxy 下载不成功,将使用 jsDelivr 的 CDN,以更好的支持双栈。并添加执行权限
if [[ $OCTEEP = 1 ]]; then
wireproxy_latest=$(wget --no-check-certificate -qO- -T1 -t1 $CDN "https://api.github.com/repos/octeep/wireproxy/releases/latest" | grep "tag_name" | head -n 1 | cut -d : -f2 | sed 's/[ \"v,]//g')
@ -1409,6 +1404,11 @@ EOF
${SYSTEMCTL_ENABLE[int]}>/dev/null 2>&1
type -P dnsmasq >/dev/null 2>&1 && systemctl restart dnsmasq >/dev/null 2>&1
# 如是 LXC,安装 Wireguard-GO。部分较低内核版本的KVM,即使安装了wireguard-dkms, 仍不能正常工作,兜底使用 wireguard-go
[[ $LXC = 1 ]] || ([[ $WG = 1 ]] && [[ $(systemctl is-active wg-quick@wgcf) != active || $(systemctl is-enabled wg-quick@wgcf) != enabled ]]) &&
wget --no-check-certificate $CDN -N https://github.com/fscarmen/warp/raw/main/wireguard-go/wireguard-go_linux_$ARCHITECTURE.tar.gz &&
tar xzf wireguard-go_linux_$ARCHITECTURE.tar.gz -C /usr/bin/ && rm -f wireguard-go_linux_* && chmod +x /usr/bin/wireguard-go
# 保存好配置文件
mv -f wgcf-account.toml wgcf-profile.conf menu.sh /etc/wireguard >/dev/null 2>&1

Loading…
Cancel
Save