itzg / mc-router

Routes Minecraft client connections to backend servers based upon the requested server address

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Forward UDP packet along same port?

Merith-TK opened this issue · comments

commented

Would it be possible to add an --enable-udp flag that allows proxying UDP traffic to the server?

probably listens on port for TCP and UDP then routes,
and you could specify container port for udp traffic like so

{
	"mappings": {
		// base, proxies tcp/udp to port by default
		"example.com": "example:25565",
		// geyser example for use along side above
		"example.com" : "example:19132/tcp"	
	}
}

It would need to interpret the RakNet protocol that bedrock uses on UDP to correctly route the datagrams to the associated backend. Worse still it would have to interpret and track every single datagram unlike the simplicity of Java edition's TCP stream based connections.

What's doable is if all you want is a "route all UDP traffic on the specified port to one backend".

commented

wait seriously? its that damn complicated?!

hmm... for bedrock a service like "geyserconnect" can be used for navigation, so an bedrock-container map would probably be the best bet to just forward bedrock traffic to a single container, and then let that handle the networking part, however things like Proximity Voice chat mods are probably easier?

so... proposed method of

{
	// this being anything but "" causes router to
	// listen on port 19132 and forward traffic on that
	// port to the bedrock container
	"bedrock" : "bedrock-container:19132"
	"mappings": {
		// base, proxies tcp by default, UDP if possible
		// (PlasmoVoice or SimpleVoice)
		"example.com": "example:25565"
	}
}
commented

Just noticed in the geyserconnect config there is this section at the bottom

# Enable virtual hosts to be specified to skip the server list
# Allows people to connect using addresses like
#   hypixel.net._p25565.example.com
#   hypixel.net.example.com
#   hypixel.net._o.example.com    - For offline mode
vhost:
  enabled: true
  base-domain: geyser.merith.xyz