【饥荒DST】IPV6联机工具

饥荒联机并不支持IPV6直连,所以IPV6的专用服务器会显示三个问号。

前提

  1. 服务器和客户端机子都有IPV6:可通过https://test-ipv6.com/ 检查
  2. 服务端的端口防火墙关闭

原理

利用github的开源项目 https://github.com/wangyu-/tinyPortMapper/releases 提到了这样一个功能:

# local port and remote port can be the same
./tinymapper_amd64 -l0.0.0.0:443 -r10.222.2.1:443 -u

# you can also use 6-to-4 or 4-to-6 forward
./tinymapper_amd64 -l0.0.0.0:1234 -r[2001:19f0:7001:1111:00:ff:11:22]:443 -t -u
./tinymapper_amd64 -l[::]:1234 -r44.55.66.77:443 -t -u

# you can also use ipv4-mapped ipv6 address
# this is especially useful if you want to play with ipv6 and you dont have a real ipv6 address
./tinymapper_amd64 -l[::]:4433 -r[::ffff:10.222.2.1]:443 -t -u
./tinymapper_amd64 -l[::ffff:0.0.0.0]:4433 -r[::ffff:10.222.2.1]:443 -t -u

客户端的IPV4包转发到IPV6端口传输,在服务器端再转发回IPV4端口。

操作

tinyportmapper -l 本地端:本地端口 -r 远端:远端端口 -[ut]
tinyportmapper -l 本地端:本地端口 -r 远端:远端端口 -[ut]

# 例如
# 服务端linux64
ip=`ip a | grep inet6 | grep global | grep -v fd00 | awk '{print 2}'| sed 's/\/64//'`
tinymapper_amd64 -l "[ip]:10999" -r "127.0.0.1:10999" -u
tinymapper_amd64 -l "[$ip]:10998" -r "127.0.0.1:10998" -u

# 客户端windows64
tinyportmapper.exe -l 127.0.0.1:10998 -r [ipv6addr]:10998 -u
tinyportmapper.exe -l 127.0.0.1:10998 -r [ipv6addr]:10998 -u

然后

为了方便我亲爱的嫌麻烦的Windows用户老朋友能够顺利进入游戏,我用python简单写了个前端。只需要鼠标点一点就行了。

性能我是非常满意,两个端口映射进程也才12MB内存,联机延迟在5ms左右。

下载地址:
https://storage.binbla.com/Blog?hash=LWdo0zv1

Leave a Comment

您的电子邮箱地址不会被公开。 必填项已用 * 标注