- 生成配置文件
12345678910#下载wgcf并给予权限wget -O wgcf https://github.com/ViRb3/wgcf/releases/download/v2.2.14/wgcf_2.2.14_linux_amd64 && chmod +x wgcf↓IPv6 Only↓wget -O wgcf https://gh.133335.xyz/https://github.com/ViRb3/wgcf/releases/download/v2.2.14/wgcf_2.2.14_linux_amd64 && chmod +x wgcf#注册账户./wgcf register#生成配置./wgcf generate - 修改配置
12345678910111213141516#修改配置nano wgcf-profile.conf#修改如下[Interface]PrivateKey = 1^ryUhm1Cs&pAiY#c!TVvv6okMieHZlYnk4E%!JZJPZEAddress = 172.16.0.2/32Address = fd01:5ca1:ab1e:8d98:2ece:490f:c0f:d1aa/128DNS = 1.1.1.1 #删除MTU = 1280[Peer]PublicKey = JqtNyvMsl$#$^ymxR@g@3zcBSy4Yl6m^glmqjoGNAjIFAllowedIPs = 0.0.0.0/0 #IPv4 Only删除AllowedIPs = ::/0 #IPv6 Only删除Endpoint = 162.159.192.1:2408 #IPv6 Only删除Endpoint = [2606:4700:d0::a29f:c001]:2408 #IPv4 Only删除 - 安装WireGuard
12345#内核需要≥5.6apt install wireguard -y#拷贝配置cp wgcf-profile.conf /etc/wireguard/wgcf.conf - 启动WireGuard
12systemctl enable wg-quick@wgcfsystemctl start wg-quick@wgcf - 测试网络
12345#IPv4 Onlycurl -6 ip.gs#IPv6 Onlycurl -4 ip.gs