VelocityRouter
根据玩家的权限和他们连接的域名,动态地在你的 Minecraft 网络中为玩家分配路由。
概述
VelocityRouter 是一款功能强大的 Velocity 代理服务器路由插件,它根据以下条件将玩家引导至特定的后端服务器:
- 他们连接时使用的域名,
- 他们的权限,
- 以及在无匹配权限或目标服务器离线时的回退默认服务器。
这让你能够轻松地为不同玩家群体(如 VIP、工作人员或普通用户)创建复杂的路由规则。
特性
-
基于权限的路由
根据玩家分配的权限将他们引导至不同的服务器。
-
基于域名的路由
配置针对玩家连接所使用的域名或主机名的特定路由规则。
-
回退服务器
为每个域名指定默认服务器,以防没有匹配的权限路由或目标服务器处于离线状态。
-
自定义拒绝消息
向无权访问某些服务器的玩家显示个性化消息。
-
通配符支持
使用通配符 (*) 域名来定义全局回退路由规则。
示例配置
routes:
# 路由 1:默认通用访问
- hostname: "play.example.com"
defaultServer: "lobby"
permissionRoutes: [] # 此域名没有特殊的权限路由
# 路由 2:VIP 访问
- hostname: "vip.example.com"
defaultServer: "vip_lobby" # 若无权限匹配或 VIP 服务器离线时的回退服务器
permissionRoutes:
- permission: "velocity.vip.access"
targetServer: "vip_server"
denyMessage: "<red>You need VIP rank to access this server."
# 路由 3:工作人员访问
- hostname: "staff.example.com"
defaultServer: "admin_lobby" # 若无权限匹配时的回退服务器
permissionRoutes:
- permission: "velocity.staff.access"
targetServer: "staff_server"
denyMessage: "<red>You do not have staff access."
# 路由 4:全局回退(通配符域名)
- hostname: "*" # 匹配上面未明确配置的任意域名
defaultServer: "lobby"
permissionRoutes: []
工作原理
- 当玩家连接时,VelocityRouter 检查他们使用的域名。
- 查找匹配的路由配置。
- 在该路由内,检查玩家符合哪些基于权限的路由。
- 如果找到匹配的权限路由且目标服务器在线,则将玩家转发至该服务器。
- 如果没有权限匹配或服务器离线,玩家将被发送到该路由的
defaultServer。
- 如果玩家无权访问某个已匹配的权限路由,则显示配置的
denyMessage。
VelocityRouter
Route players across your Minecraft network dynamically based on their permissions and the hostname they connect to.
Overview
VelocityRouter is a powerful routing plugin for Velocity proxy servers that directs players to specific backend servers based on:
- The hostname they joined with,
- Their permissions,
- And fallback default servers when no permissions match or servers are offline.
This allows you to create complex routing rules for different player groups like VIPs, staff, or general users with ease.
Features
-
Permission-Based Routing
Direct players to different servers depending on their assigned permissions.
-
Hostname-Based Routing
Configure routing rules specific to the hostname or domain players connect with.
-
Fallback Servers
Specify default servers for each hostname if no permission route matches or if the target server is offline.
-
Custom Deny Messages
Display personalized messages to players who lack permission to access certain servers.
-
Wildcard Support
Use a wildcard (*) hostname to define global fallback routing rules.
Example Configuration
routes:
# Route 1: Default general access
- hostname: "play.example.com"
defaultServer: "lobby"
permissionRoutes: [] # No special permission routing for this hostname
# Route 2: VIP access
- hostname: "vip.example.com"
defaultServer: "vip_lobby" # Fallback if no permission matches or VIP server is offline
permissionRoutes:
- permission: "velocity.vip.access"
targetServer: "vip_server"
denyMessage: "<red>You need VIP rank to access this server."
# Route 3: Staff access
- hostname: "staff.example.com"
defaultServer: "admin_lobby" # Fallback if no permission matches
permissionRoutes:
- permission: "velocity.staff.access"
targetServer: "staff_server"
denyMessage: "<red>You do not have staff access."
# Route 4: Global fallback (wildcard hostname)
- hostname: "*" # Matches any hostname not explicitly configured above
defaultServer: "lobby"
permissionRoutes: []
How It Works
- When a player connects, VelocityRouter checks the hostname they used.
- It looks for a matching route configuration.
- Within that route, it checks for any permission-based routes the player qualifies for.
- If a matching permission route is found and the target server is online, the player is forwarded there.
- If no permission matches or the server is offline, the player is sent to the route's
defaultServer.
- If the player lacks permission for a matched permission route, the configured
denyMessage is shown.
评论 0
登录后参与评分
还没有评论,来抢沙发吧