Language

Celerity

Celerity

Modrinth

Celerity: Geo-Based Server Redirection: This plugin allows players to connect to the closest proxy server based on their geographic location.

84 downloads 2 followers updated 24mo ago
latest v1.0.0-ALPHA Modrinth
Velocity 1.21 – 1.21.1 ManagementOptimizationUtility

Celerity: Geo-Based Server Redirection

USE AT YOUR OWN RISK (NOT IN PRODUCTION)

About

This plugin allows players to connect to the closest server based on their geographic location. By simply entering myserver.com, players are automatically redirected to the nearest server without the need for proxying their connection.

Example Scenario:

Server A (east.myserver.com) located in New York.

Server B (west.myserver.com) located in Los Angeles.

Players who connect through myserver.com will be redirected to either Server A or Server B, depending on which is geographically closer.

Road Map

This is a work in progress but here is a basic roadmap for what needs to be done:

  • Set up the cache expiry system.
  • Allow clients with old versions to connect through.
  • Add more API options
  • Allow IP history to be stored locally. SQLite?

If you would like to help out, check out the github!

Installing

Drop it into the velocity plugins folder of your main proxy server, then make sure all downstream server are configured to accept players with transfer packets.

It will then make a config.toml like such:

[settings]

# List of domains where no transfer should occur if the user connects using these
no_transfer_domains = ["east.myserver.com", "est.myserver.com"]
debug = false   # Enable to get debug messages. You know the drill

[settings.api]
enabled = true             # Disabling this will stop use from using the api.
provider = "ipgeolocation" # Right now only ipgeolocation (https://ipgeolocation.io/) is supported, go there to make an api key
key = "somekeyyouget"      # If no key is needed, set to None

[settings.db_cache]
enabled = true           # Whether to use the database caching feature
cache_ip = true          # Save IPs in the database
cache_username = true    # Save usernames in the database (may decrease accuracy)
cache_expire = 730       # Hours until a cached entry expires (0 disables expiration)

[db] ## Database Configuration for Cache
address = "120.0.0.1:12345"
database = "fundatabase"
table_prefix = "cel_"
username = "username"
password = "password"

[servers] ## Server Configuration section

[servers.easternserver]
ip = "east.myserver.net"
port = 25565
latitude = 40.7128   # Example: Latitude of New York City
longitude = -74.0060 # Example: Longitude of New York City

[servers.westernserver]
ip = "123.45.68.79"
port = 42069
latitude = 34.0522    # Example: Latitude of Los Angeles
longitude = -118.2437 # Example: Longitude of Los Angeles

Building

You should be able to build this plugin with Maven, using Java 21.

Versions

Alpha
1.0.0-ALPHA
velocity · 1.21, 1.21.1 · 24mo ago
## USE AT YOUR OWN RISK (NOT IN PRODUCTION) This is the first working build
84

Comments 0

No comments yet. Be the first to share your thoughts.

FAQ

How do I install Celerity?

Download the file for your Minecraft version and loader from this page, then drop the .jar into your mods (or plugins) folder and launch the game.

Is Celerity free?

Celerity is free to download on Modgrid — we link straight to the official source, no paywall or bundled installer.

Which Minecraft versions does Celerity support?

Works with Velocity. Supports versions 1.21–1.21.1. See the download section on this page for the full list of supported versions and loaders.

Download Celerity

Files are served directly from the original source. Modgrid does not host or modify them.