Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minecraft-bedrock-raknet-proxy

A lightweight Node.js UDP proxy that works around a RakNet handshake bug in Minecraft Bedrock Dedicated Server v1.26.32.2, which prevents clients from connecting via the Servers tab.

Temporary fix. Once Mojang ships a corrected server binary, this proxy will no longer be needed. Track the bug at MCPE-239705 and itzg/docker-minecraft-bedrock-server#649.


The bug

Bedrock Server 1.26.32.2 responds to a UNCONNECTED_PING with an incomplete UNCONNECTED_PONG — only 33 bytes instead of the required minimum of 35+. The client receives an EOF mid-handshake and never establishes a connection.

All three connection methods fail:

  • LAN IP (e.g. 192.168.1.x:19132)
  • Domain / DDNS (e.g. myserver.example.com:19132)
  • VPN IP (e.g. Tailscale)

LAN discovery (broadcast ping from the Friends tab) may still work because the client is more lenient with broadcast responses.

Confirmed via the itzg/minecraft-bedrock-server health check:

failed to query bedrock server 127.0.0.1:19132: ping raknet: read unconnected pong: unexpected EOF

How this proxy fixes it

Minecraft client ──UDP :19132──► proxy.js ──UDP :19134──► bedrock_server
                 ◄──────────────          ◄──────────────
  1. The proxy listens on :19132 (the standard Bedrock port clients expect).
  2. When it receives an UNCONNECTED_PING (0x01 / 0x02), it builds and sends a correctly-formed UNCONNECTED_PONG (0x1C) without forwarding the ping to the broken server.
  3. All other game traffic is forwarded bidirectionally to the actual server on :19134.

No npm dependencies. Pure Node.js stdlib (node:dgram).


Requirements

  • Node.js 18+
  • The Bedrock Dedicated Server must be configured to listen on port 19134 (or any port other than 19132)

Quick start

Standalone (binary or existing Docker setup)

1. Change your server port to 19134.

If using server.properties directly:

server-port=19134

2. Start the proxy:

node proxy.js

3. Connect from Minecraft using your server's IP and port 19132 (the default — no need to type it).


With Docker (recommended)

Use the included docker-compose.yaml, which runs both the BDS and the proxy:

# copy your worlds / config into ./worlds and ./config first
docker compose up -d

The compose file starts:

  • bds — Bedrock server on port 19134 (host network)
  • proxy — this proxy on port 19132 (host network)

See docker-compose.yaml for volume paths and environment variables.


Configuration

All settings are controlled via environment variables (no need to edit proxy.js):

Variable Default Description
PROXY_PORT 19132 UDP port clients connect to
SERVER_PORT 19134 UDP port the real BDS listens on
SERVER_HOST 127.0.0.1 Host where the BDS is running
MOTD Bedrock Server Server name shown in the Servers tab
MAX_PLAYERS 10 Max players shown in the server list
PROTOCOL_VERSION 748 RakNet protocol version (match your BDS version)
GAME_VERSION 1.26.32.2 Game version string shown in the server list

Example:

MOTD="My Server" MAX_PLAYERS=20 node proxy.js

Keeping the proxy alive

systemd (Linux)

[Unit]
Description=Minecraft Bedrock RakNet Proxy
After=network.target

[Service]
ExecStart=/usr/bin/node /opt/minecraft-bedrock-raknet-proxy/proxy.js
Restart=always
Environment=MOTD="My Server"
Environment=MAX_PLAYERS=20

[Install]
WantedBy=multi-user.target

Synology DSM

Add a Triggered Task (Boot-up) in DSM → Task Scheduler:

nohup node /volume1/video/scripts/minecraft-proxy.js >> /volume1/video/scripts/minecraft-proxy.log 2>&1 &

PM2

pm2 start proxy.js --name mc-proxy
pm2 save

Troubleshooting

Client shows "Unable to connect" immediately

  • Verify the proxy is running: netstat -ulnp | grep 19132
  • Verify the BDS is running on 19134: netstat -ulnp | grep 19134
  • Check proxy logs for errors

Client connects but drops after a few seconds

  • Make sure you're using --network host (not -p 19132:19132/udp) with Docker. Bridge networking causes the BDS to try to bind 19132, conflicting with the proxy.

Server shows outdated version warning

  • Set PROTOCOL_VERSION and GAME_VERSION to match your BDS version. The proxy cannot auto-detect these from a broken server.

LAN discovery (Friends tab) works but Servers tab doesn't

  • This is exactly the bug this proxy fixes. The Friends tab uses broadcast pings which the broken server handles; the Servers tab uses unicast pings which it doesn't.

When to remove this proxy

When Mojang releases a fixed Bedrock Server version, you can stop using this proxy:

  1. Stop the proxy process.
  2. Change the BDS back to port 19132 (SERVER_PORT=19132 or server-port=19132).
  3. Update firewall rules if needed.

Monitor MCPE-239705 for the fix.


License

MIT — see LICENSE.

About

UDP proxy that fixes the broken RakNet UNCONNECTED_PONG in Bedrock Server 1.26.32.2

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages