Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transfer Server Router by AXFJ

中文 | English

Now rewritten in rust!

Introduction

Transfer Server Router is an extremely lightweight Minecraft server routing tool. It sends a transfer packet as soon as a player connects to the server (equivalent to the vanilla /transfer command), quickly redirecting the player to the specified target server. This tool can be used for routing incoming connections at the server entry point, or in scenarios where players are forced to use a public IP under a virtual LAN (please refer to my other repository Radmin-VPN-Minecraft-Server-Force-Join-with-Public-IP).

Currently stable protocol support: Minecraft 1.21.11 (protocol version 774), configurable for compatibility with other versions.


Features

  • Configurable connection limits:
    • Global maximum concurrent connections
    • Maximum concurrent connections per IP
    • Rate limit per IP (requests per second)
  • Connection timeout setting to prevent zombie connections
  • Protocol version mismatch warnings (configurable)
  • Clean configuration file
  • Complete SLP support

Configuration File

On first startup, the program will automatically generate a tsr_server.properties file in the current directory with default settings. You can modify the parameters as needed.

Configuration Options

Key Type Default Description
ip string 0.0.0.0 Listening IP address
port integer 25565 Listening port
target-ip string example.com Target server IP or domain name
target-port integer 25565 Target server port
protocol integer 774 Expected client protocol version. A warning is logged if the client version mismatches, but the connection is not rejected.
max-conn integer 5 Global maximum concurrent connections
max-conn-per-ip integer 2 Maximum concurrent connections per IP
rate-per-ip float 1.0 Allowed requests per second per IP
timeout-per-conn integer 15 Connection timeout in seconds

And some SLP options


Quick Start

1. Compile the script

In the terminal, run:

cargo build

On first startup, the default configuration file tsr_server.properties will be created automatically, and the service will start listening according to the settings.

2. Stop the service

Type stop in the running console and press Enter.


License

Apache 2.0


TODOs

[] Improve DoS protection

About

An extremely lightweight Minecraft server routing tool. Can be also used for forcing players to use a public IP under a virtual LAN.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages