IPV6用Warp配置IPv4

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# 安装wireguard
apt update -y && apt install wireguard sudo curl vim openresolv -y

# 安装wgcf
curl -fsSL git.io/wgcf.sh | sudo bash


# 注册账户
wgcf register

# 生成配置文件
wgcf generate

# 编辑配置文件
vim wgcf-profile.conf

# 将配置文件的DNS、AllowedIPs、Endpoint,如下
[Interface]
PrivateKey = 这里会自动生成
Address = 172.16.0.2/32
Address = 这里会自动生成
DNS = 8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844
MTU = 1280
[Peer]
PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
AllowedIPs = 0.0.0.0/0
Endpoint = [2606:4700:d0::a29f:c001]:2408

# 复制配置文件到wireguard文件夹
cp wgcf-profile.conf /etc/wireguard/wgcf.conf

# 尝试启动 wireguard
wg-quick up wgcf

# 测试
ping google.com -4

# 关闭wgcf接口
wg-quick down wgcf

# 加入开机启动
systemctl start wg-quick@wgcf
systemctl enable wg-quick@wgcf

# 默认v6优先级
# 编辑文件 /etc/gai.conf,将 label 2002::/16 2 的注释删除

IPV6用Warp配置IPv4
https://239239xyz.github.io/2021/09/10/61/
作者
i
发布于
2021年9月10日
许可协议