Eaglercraft-relay

Minecraft Relay Server (mcrelay)

A minecraft reverse proxy server with server address rewrite.

Supports Minecraft Servers and Clients with version 12w04a or later. (Basically means release 1.2.1 and later.)

Minecraft Versions before 12w04a are NOT SUPPORTED!

Features

Requirements

Compatibility

Due to Minecraft Handshake restrictions, this server supports:

Files

Compile

Before compiling, you need to install cJSON at first.

For example, you can install it on a debian-like systems by apt install libcjson-dev.

Then you can use CMake to compile it, by following:

mkdir build
cd build
cmake ..
make

Additionally, if you want cross compiling, following CMake properties will helpful:

Usage

mcrelay < arguments | config_file >

The program will run as a non-exit-style program by default.

When using “-f” or “–forking” option, the program will become daemonized, and store its main process’ PID into /tmp/mcrelay.pid.

Config

See “examples/config/config.json” for instructions.

Instruction of using a DNS-based redirection (SRV)

If you are using a SRV record to provide your service, you should follow the instructions below.

Otherwise, your user will see the message of using a wrong address to connect.

For example, your SRV record should be like this:

_minecraft._tcp.srvrecord.example.com. => PRIVORITY WEIGHT PORT host.example.com

If you provide “srvrecord.example.com” to your user, you should set your vhostname in the configuration file as follow:

For compatibility, it’s recommended to add both of them to your configuration.

IP Forwarding

You can provide the real client address and port through HAProxy’s Proxy Protocol by this feature.

It’s compatible with any server which support this protocol. (e.g. Bungeecord)

Bungeecord

To use this feature correctly, turn on the “proxy_protocol” in the “config.yml”. (“false” to “true”)