Minecraft Java over I2P
if the reader of this ever wanted to experience minecraft over I2P for whatever reason here's a config to do that!!
minecraft java uses TCP for online play, so all that's needed is a generic server and client tunnels.
this guide assumes that the router is already configured correctly with the web console showing OK for,
at least, IPv4.
on the server, to the tunnels.conf add
[minecraft-server]
type = server
host = [hostname]
port = 25565
keys = minecraft.dat
replace [hostname] with the server's IP, if the server is on the same machine use localhost,
if using containers with dns (must be on the same network), use the server container's name.
reload the client config (e.g. using the webui commands) and note the b32 address in I2P tunnels.
on the client add
[minecraft-client]
type = client
address = 127.0.0.1
port = 25565
inbound.length = 1
outbound.length = 1
i2cp.dontPublishLeaseSet = true
destination = [b32 address noted earlier]
with inbound.length & outbound.length we reduce the amount of hops needed to form a garlic route.
this may pose deanon risks (according to I2P), but for live games ping is really important.
even with minimal hops, the game still runs at ~200-2000ms, which is really slow, but is playable.
Caveats #
Podman #
when running both the game and i2pd in rootful podman containers (don't ask), i2pd cannot connect over localhost at all, even with host networking. i2pd must connect using container IPs or hostnames, so both must be on the same network.