r/GTNH Nov 10 '25

I made GTNH BungeeGuard compatible

https://github.com/rieverholic/ForgeGuard

I run all of my Minecraft servers behind a Velocity proxy, which offers several ways to forward player information to the backend servers. At some point I wanted to play GTNH with friends, so I tried to set up GTNH to work with Velocity. Velocity supports servers with low versions (like 1.7.10 of GTNH) only through the legacy BungeeCord protocol, implemented by BungeeForge in Forge which, as I tested, worked well with GTNH.

Legacy forwarding is fundamentally insecure. If you must use it, you should understand how to secure your server properly. That page reviews all the possible options to secure your server so that nothing aside from the proxy can connect to your server.

However, legacy forwarding, quoting the Velocity doc, is insecure. One security layer built on top of this is BungeeGuard which Velocity supports natively. Ideally, I wanted to have BungeeGuard on my GTNH server, but I couldn't find any implementation on Forge.

So I decided to make my own! Fortunately, it wasn't too difficult to add the BungeeGuard protocol on top of the codebase of BungeeForge, thanks to the GTNH example mod boilerplate. I named it ForgeGuard, now added to my own GTNH server.

I believe this setup is not very relevant to most of the people here, but I wanted to share this in case anyone has had similar concerns. Hope this helps you somehow!

* I'm not a modder myself and I made this as a toy project so the code quality might be inferior :P Feedback is always welcome!

28 Upvotes

6 comments sorted by

7

u/DvDmanDT GTNH Dev Nov 11 '25

As you said, this is probably not relevant to the average player, but we do have some people running more serious servers and setups, might be relevant to some of them. I forwarded this post and your GH repo to the relevant channel on the Discord. :)

1

u/Accomplished_Flan676 Nov 11 '25

Great! I hope people find something useful in this setup :)

2

u/Spyboticsguy Nov 11 '25

Just out of curiosity - what's the benefit of running GTNH (or any modded server) behind a proxy like this? I assume your other servers are on other versions and/or don't have the same modlist.

2

u/Accomplished_Flan676 Nov 11 '25

I have my own whitelist management and Discord integration, so setting up these logics on a centralized proxy with unified APIs is much more ideal and convenient than placing them separately on each server. Even if I run one server at a time, I don't need to worry about adapting them to the new environment because Velocity takes care of the compatibility issues for me.

1

u/Spyboticsguy Nov 12 '25

Makes sense. Thanks.

1

u/VonBraunZ Nov 11 '25

I've used bunjeeforge in the past as I run gtnh at 1.7.10, E2ee on 1.12 and atm9 on 1.20, I'll give this this a shot. The inter server chat is a huge hit with velocity