全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 2881|回复: 16

腾讯云清凉配置Warp实现IPv6访问

[复制链接]
发表于 2021-4-4 22:33:34 | 显示全部楼层 |阅读模式
本帖最后由 abudu 于 2021-4-4 22:33 编辑

众所周知,腾讯云清凉价格实惠,深受MJJ喜爱,但其对于IPv6的支持并不友好,得益于Cloudflare在海外优秀的连接速度,我们可以使用Cloudflare Warp对其桥接实现IPv6连接

安装BBR
这一步其实可有可无,但是安装BBR可以有效提高网络速度
  1. wget -N "https://github.000060000.xyz/tcp.sh" & chmod +x tcp.sh && ./tcp.sh
复制代码


出现这一界面时输入1,回车,安装bbr内核,输入Y重启

再次刷入如下命令
  1. wget -N "https://github.000060000.xyz/tcp.sh" & chmod +x tcp.sh && ./tcp.sh
复制代码


输入12,回车后reboot重启
安装WireGuard
配置Warp安装WireGuard是必不可少的,但是在CentOS7上,WireGuard的安装较为复杂,官方给出了三种安装方法
我测试第三种安装方法最为方便,且不影响BBR,于是乎这里建议选择第三种方法:
  1. sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  2. sudo curl -o /etc/yum.repos.d/jdoss-wireguard-epel-7.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo
  3. sudo yum install wireguard-dkms wireguard-tools
复制代码

中间若有提示一律按y回车
接着运行以下命令检查安装状态:
  1. modprobe wireguard  #加载wireguard模块
  2. lsmod | grep wireguard  #查看模块状态
复制代码

若有返回结果,即为安装成功

安装WGCF
  1. mkdir wgcf #新建文件夹
  2. cd wgcf
  3. wget -O wgcf https://github.com/ViRb3/wgcf/releases/download/v2.2.3/wgcf_2.2.3_linux_amd64 #下载程序
  4. chmod +x wgcf #修改权限
复制代码

若中途无报错即为安装成功
配置文件
先注册一下Warp的账户
  1. ./wgcf register
复制代码

若出现这样的界面直接回车即可

然后输入
  1. ./wgcf generate
复制代码
,检查目录下是否出现名为wgcf-profile.conf的文件,内容大概这样
  1. [Interface]
  2. PrivateKey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  3. Address = 172.16.0.2/32
  4. Address = fd01:5ca1:ab1e:8a15:6634:bea7:4f74:47d9/128
  5. DNS = 1.1.1.1
  6. MTU = 1280
  7. [Peer]
  8. PublicKey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  9. AllowedIPs = 0.0.0.0/0
  10. AllowedIPs = ::/0
  11. Endpoint = engage.cloudflareclient.com:2408
复制代码

输入nano  wgcf-profile.conf 修改配置,删除第九行AllowedIPs = 0.0.0.0/0 ,Ctrl+X保存
接着输入如下命令,运行WGCF并设置开机自启动
  1. sudo cp wgcf-profile.conf /etc/wireguard/wgcf.conf
  2. sudo systemctl start wg-quick@wgcf
  3. sudo systemctl enable wg-quick@wgcf
复制代码

测试连接
SSH输入ping 2001:4860:4860::8888 -6 ,若连接正常即为配置成功
  1. PING 2001:4860:4860::8888(2001:4860:4860::8888) 56 data bytes
  2. 64 bytes from 2001:4860:4860::8888: icmp_seq=1 ttl=119 time=4.68 ms
  3. 64 bytes from 2001:4860:4860::8888: icmp_seq=2 ttl=119 time=2.21 ms
  4. 64 bytes from 2001:4860:4860::8888: icmp_seq=3 ttl=119 time=2.18 ms
  5. 64 bytes from 2001:4860:4860::8888: icmp_seq=4 ttl=119 time=2.22 ms
  6. 64 bytes from 2001:4860:4860::8888: icmp_seq=5 ttl=119 time=2.15 ms
  7. 64 bytes from 2001:4860:4860::8888: icmp_seq=6 ttl=119 time=2.22 ms
  8. 64 bytes from 2001:4860:4860::8888: icmp_seq=7 ttl=119 time=2.19 ms
  9. 64 bytes from 2001:4860:4860::8888: icmp_seq=8 ttl=119 time=2.21 ms
  10. 64 bytes from 2001:4860:4860::8888: icmp_seq=9 ttl=119 time=2.16 ms
  11. 64 bytes from 2001:4860:4860::8888: icmp_seq=10 ttl=119 time=2.19 ms

  12. --- 2001:4860:4860::8888 ping statistics ---
  13. 10 packets transmitted, 10 received, 0% packet loss, time 9010ms
  14. rtt min/avg/max/mdev = 2.159/2.446/4.686/0.748 ms
复制代码

参考
【WGCF】提取WARP配置为CERNET提供IPv6流量转发 https://luotianyi.vc/4500.html
Euserv正确打开优化方式 http://blog.cyfan.top/p/d788bdf3.html
发表于 2021-4-4 22:46:03 | 显示全部楼层
yum -y install epel-release elrepo-release
yum -y install yum-plugin-elrepo
yum -y install kmod-wireguard wireguard-tools
。。。。
发表于 2021-4-4 22:46:46 | 显示全部楼层
这是论坛里第几篇warp教程了
发表于 2021-4-4 23:16:09 | 显示全部楼层
图片水印挡了很多字,看不清
发表于 2021-4-4 23:22:44 | 显示全部楼层
bbr不是tcp么?wireguard是udp啊
发表于 2021-4-4 23:35:06 | 显示全部楼层
对IPV6没有需求
 楼主| 发表于 2021-4-5 12:18:05 | 显示全部楼层
LEB 发表于 2021-4-4 23:22
bbr不是tcp么?wireguard是udp啊

这里装bbr主要是更新一下内核
发表于 2021-4-5 12:31:35 | 显示全部楼层
有个一键 脚本 OK。我也配置好了 可以解锁nf了
发表于 2021-4-5 12:32:04 | 显示全部楼层
战术性mark
IPV6用不上
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-26 15:48 , Processed in 0.069164 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表