ymcoming 大佬有话说 :
Euserv IPV6 OVZ小鸡安装wireguard教程
本帖最后由 ymcoming 于 2021-2-6 21:07 编辑
100%可行,因为我2只euserv小鸡都成功了:)
先期工作:先搞一个wg0.conf的配置,(https://github.com/ViRb3/wgcf),如果现在注册时显示太多用户了,那么你是得不到warp的配置。这样的话,去谷歌商店下载1.1.1.1的手机版,连上warp后,好像可以备份导出手机上的客户端配置,这个conf改名为wg0.conf,下载回电脑,在wireguard安装好后再上传到euserv
正式步骤:
1、给euserv安装go
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list && printf ‘Package: *nPin: release a=unstablenPin-Priority: 90n’ > /etc/apt/preferences.d/limit-unstable && apt update
apt install wireguard-tools –no-install-recommends
cd /tmp && wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz && tar zvxf go1.13.4.linux-amd64.tar.gz &&mv go /opt/go1.13.4 &&ln -s /opt/go1.13.4/bin/go /usr/local/bin/go
go version
2、给euserv安装wireguard-go
apt install make
cd /usr/local/src && wget https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-0.0.20191012.tar.xz && tar xvf wireguard-go-0.0.20191012.tar.xz && cd wireguard-go-0.0.20191012
make
cp wireguard-go /usr/local/bin
wireguard-go –version
3、生成wireguard KEY
wg genkey | tee private key | wg pubkey > publickey
4、编辑 /lib/systemd/system/[email protected],在“Environment=WG_ENDPOINT_RESOLUTION_RETRIES=infinity ”这行的下方,插入一行:
Environment=WG_I_PREFER_BUGGY_USERSPACE_TO_POLISHED_KMOD=1
5、执行:
ln -s /usr/bin/resolvectl /usr/local/bin/resolvconf
ln -sf /lib/systemd/system/systemd-resolved.service /etc/systemd/system/dbus-org.freedesktop.resolve1.service
6、放入先期工作的wg0.conf到/etc/wireguard目录下,需要修改,方法参见https://www.hostloc.com/thread-805047-1-1.html,删AllowedIPs = ::/0,并改endpoint=:2408
7、运行
wg-quick up wg0
wg-quick down wg0
systemctl enable wg-quick@wg0
systemctl start wg-quick@wg0
wg
8、检验,Ping ipv4网站,如下就成功了。。。(对了,记得把你们IPV4隧道,改NAT64都关了!)
root@:~# ping github.com
PING github.com (140.82.121.3) 56(84) bytes of data.
64 bytes from lb-140-82-121-3-fra.github.com (140.82.121.3): icmp_seq=1 ttl=59 time=22.2 ms
64 bytes from lb-140-82-121-3-fra.github.com (140.82.121.3): icmp_seq=2 ttl=59 time=17.1 ms
64 bytes from lb-140-82-121-3-fra.github.com (140.82.121.3): icmp_seq=3 ttl=59 time=15.0 ms
FallFor 大佬有话说 :
感谢分享zsbd
wifitry 大佬有话说 :
感谢分享
f10 大佬有话说 :
没看懂怎么玩,用wg套CF?
red233 大佬有话说 :
搜了下这作用也是戴笠啊
Yancheng 大佬有话说 :
f10 大佬有话说 : 2021-2-6 20:55
没看懂怎么玩,用wg套CF?
給只有 IPv6 的小雞透過 CF warp 連 IPv4,CF warp 就是 Wireguard。
Scaleway 星塵也能用
f10 大佬有话说 :
Yancheng 大佬有话说 : 2021-2-6 21:00
給只有 IPv6 的小雞透過 CF warp 連 IPv4,CF warp 就是 Wireguard。
Scaleway 星塵也能用 …
大概明白了:lol 有空去星尘上搞下试试。
b66667777 大佬有话说 :
帮顶
纳米科技 大佬有话说 :
绑定
fule 大佬有话说 :
感谢分享