Update 661.sh

This commit is contained in:
甬哥侃侃侃ygkkk 2023-03-24 01:43:22 +00:00
parent 7f2f1fa6e0
commit 4307da9829
1 changed files with 2 additions and 1 deletions

3
661.sh
View File

@ -1248,7 +1248,8 @@ ShowWGCF && WGCFmenu
WGproxy(){
[[ ! $(type -P wg-quick) ]] && red "未安装Wgcf-WARP安装好wgcf-warp才能执行" && sleep 3 && bash CFwarp.sh
cp -f /etc/wireguard/wgcf.conf /etc/wireguard/wgproxy.conf >/dev/null 2>&1
sed -i '/PostUp/d;/PostDown/d;/Endpoint/d' /etc/wireguard/wgproxy.conf
sed -i '/PostUp/d;/PostDown/d;/AllowedIPs/d;/Endpoint/d' /etc/wireguard/wgproxy.conf
sed -i "8a AllowedIPs = 0.0.0.0\/0\nAllowedIPs = ::\/0\n" /etc/wireguard/wgproxy.conf
sed -i "10a Endpoint = $endpoint" /etc/wireguard/wgproxy.conf
green "当前wireguard客户端配置文件wgproxy.conf内容如下保存到 /etc/wireguard/wgproxy.conf\n" && sleep 2
white "$(cat /etc/wireguard/wgproxy.conf)\n"