——————————— debian初始化———————————
wget http://coolaj.cn/tools/Debian10.list sudo mv Debian10.list /etc/apt/sources.list sudo apt update && sudo apt upgrade -y apt install libgd3 libgd-dev -y apt install gcc automake autoconf libtool make -y
——————————— WGCF安装———————————
#弄个文件夹方便管理相关文件 mkdir wgcf cd wgcf #下载对应程序 wget -O wgcf https://github.com/ViRb3/wgcf/releases/download/v2.1.4/wgcf_2.1.4_linux_amd64 #添加执行权限 chmod +x wgcf #注册WARP账户 ./wgcf register #生成WireGuard配置文件 ./wgcf generate sed -i "s/AllowedIPs = 0.0.0.0\/0//" wgcf-profile.conf
——————————— WGCF加载———————————
apt-get install sudo net-tools openresolv -y #Debian添加unstable源 echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list printf 'Package: *\nPin: release a=unstable\nPin-Priority: 150\n' > /etc/apt/preferences.d/limit-unstable #debian更新源并安装 apt-get update apt-get install wireguard-dkms wireguard-tools #加载内核模块 modprobe wireguard #检查WG模块加载是否正常 lsmod | grep wireguard cat wgcf-profile.conf >/etc/wireguard/wgcf.conf #开启隧道 sudo wg-quick up wgcf #关闭隧道 sudo wg-quick down wgcf
#查看是否显示V6IP ifconfig V2配置参考下方文章的六