A Minecraft reverse proxy based on domains.
If you have multiple Minecraft servers running but only a limited number of ports this is for you. Mc-Router allows you to listen on a single port while having many local Minecraft servers it will proxy the connection, to based on the domain used when connecting.
Was to lazy to set up proper DNS records that allow Minecraft to figure out the correct port :)
- Make sure you have the most recent rust and cargo version installed, you can update by using
rustup update
; if you don't haverustup
installed you can get it here. - Clone the repo and cd into it.
- Run
cargo build --release
. - You will find the compiled binary in
target/release/mc-router
(append.exe
on Windows);
-
Create a config similar to how show in example.json. The server will try to obtain the config path from your environment variables, specifically
MCR_CONFIG
. (Default is./mcr.json
)Additionally, you can provide the interface/port the server should listen on with
MCR_INTERFACE
. (Default is0.0.0.0:25565
) -
Run the server
- The config is automatically hot reloaded, no need to restart the server, doing so would force all current users to lose connection.