添加外部服务器到本地局域网
提示
通过添加外部服务器到本地局域网,让《网易我的世界》连接到外部服务器
Android
「基岩版作弊」一章中的Lumina Client已提到此方法(点击跳转)
Windows
提示
需管理员权限
- 使用 netsh 添加转发规则:
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=19132 connectaddress=127.0.0.1 connectport=19132
listenaddress=0.0.0.0
:监听所有 IP。connectaddress=127.0.0.1
:转发到本机。
- 验证规则:
netsh interface portproxy show all
- 放行防火墙(若启用):
netsh advfirewall firewall add rule name="Port 19132" dir=in action=allow protocol=TCP localport=19132
Linux/MacOS
提示
需root权限
使用socat
- 安装socat
- Ubuntu
- MacOS
- ArchLinux
apt install socat
brew install socat
yay -S socat
- 添加映射
socat TCP-LISTEN:19132,fork TCP:127.0.0.1:19132
fork
:允许多连接。
使用iptables
iptables -t nat -A PREROUTING -p tcp --dport 19132 -j DNAT --to-destination 127.0.0.1:19132
iptables -t nat -A OUTPUT -p tcp -d zaku.ltd --dport 19132 -j DNAT --to-destination 127.0.0.1:19132