Celerity 图标

Celerity

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0-ALPHA
本资源为搬运资源,原资源地址: https://modrinth.com/mod/celerity
资源信息

Minecraft 版本: 1.21 1.21.1

平台: velocity

标签: management optimization utility

资源介绍

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.

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Res0ul

价格:0 墨喵币
下载量:0

查看详情
MapCycle

价格:0 墨喵币
下载量:0

查看详情
Craft gunpowder+

价格:0 墨喵币
下载量:0

查看详情
Panda Archaeology

价格:0 墨喵币
下载量:0

查看详情