Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Tags
Creators
Details
InvSeparate
InvSeparate is an open-source routing solution for Minecraft networks that host multiple modpacks behind a single proxy entrypoint.
It is made of two parts:
- a
Velocityplugin that decides which login server and destination backend a player should use - a client mod that appends a pack identifier to the Minecraft handshake before backend selection happens
This allows one Velocity proxy to serve vanilla clients, multiple modpack clients, and different login flows at the same time.
Features
- Identifier-based initial routing
- Two-stage routing from login server to final backend
- Default fallback for clients without the mod or with unknown identifiers
- Developed against
Velocity 3.4.xwith a target compatibility range throughVelocity 4.x - Monorepo layout for shared protocol code, proxy plugin, and multiple loader implementations
How It Works
- The client mod reads the configured
identifier - The mod writes
<hostname>\0<identifier>into the handshake host field - The Velocity plugin reads the identifier from the raw handshake hostname
- The plugin selects the configured login server and post-login target
- If no identifier is present, normal default routing is used
Important: Velocity's getVirtualHost() discards any data after the null byte. The proxy plugin must therefore read the raw virtual host value to recover the identifier.
Repository Layout
common: shared protocol constants and helpersvelocity: Velocity plugin implementationneoforged: NeoForge client modfabric: Fabric client modforge: reserved Forge modulebungeecord: reserved BungeeCord module
Example Configuration
Velocity config at plugins/invseparate/config.yml:
default-server: "login"
default-post-login-server: "lobby"
post-login-delay-seconds: 5
identifiers:
endlessmc-hng:
login-server: "hng_login"
post-login-server: "hng"
Client config:
identifier = "endlessmc-hng"
Build Notes
Common and Velocity
The repository currently defaults to Gradle 9.x, so these modules can be built directly:
./gradlew.bat :common:build :velocity:build
Loader Modules
Loader-specific modules such as neoforged, fabric, and forge live in the same repository, but they are not all enabled by default in settings.gradle.kts.
Follow the inline comments in the build files to switch the required Gradle version and enable the loader module you want to build.
Branch Strategy
1.21.1is the current primary branch- Other Minecraft versions should be maintained in dedicated branches when needed
- The
1.21.8branch is no longer in use
Use Cases
- Vanilla clients join the default login server
- Different modpack clients join different login servers
- Players are forwarded to their target backend after authentication
- Networks that need a stronger proxy-side routing layer than simple post-login forwarding plugins
License
The current source headers are organized around the MIT license.
InvSeparate
InvSeparate 是一个面向多整合包 Minecraft 网络的开源路由方案。
它由两部分组成:
Velocity插件:在代理层识别客户端标识,并决定玩家应进入哪个登录服、认证后再进入哪个目标服。- 客户端 Mod:在 Minecraft 握手阶段把整合包标识附加到握手主机名中,让代理在真正进入后端前就能完成分流。
这让同一个 Velocity 入口可以同时服务原版客户端、多个整合包客户端,以及各自不同的登录与落地流程。
特性
- 支持基于客户端标识的初始路由
- 支持“登录服 -> 目标服”的二段转发
- 未安装 Mod 或标识未知时回退到默认服务器
- 当前以
Velocity 3.4.x为基线开发,目标兼容Velocity 4.x - 仓库内按模块组织公共协议、代理插件和不同加载器实现
工作原理
- 客户端 Mod 在连接服务器时读取本地配置中的
identifier - Mod 将
<hostname>\0<identifier>写入握手地址 - Velocity 插件从原始握手主机名中提取标识
- 插件根据
config.yml中的规则选择登录服与登录后目标服 - 若无标识或标识未知,则按默认规则处理
注意:Velocity 的 getVirtualHost() 会丢弃 null byte 之后的数据,因此服务端必须读取原始主机名而不是处理后的虚拟主机值。
仓库结构
common:公共协议常量与工具velocity:Velocity 插件实现neoforged:NeoForge 客户端 Modfabric:Fabric 客户端 Modforge:预留 Forge 模块bungeecord:预留 BungeeCord 模块
配置示例
Velocity 配置文件位于 plugins/invseparate/config.yml:
default-server: "login"
default-post-login-server: "lobby"
post-login-delay-seconds: 5
identifiers:
endlessmc-hng:
login-server: "hng_login"
post-login-server: "hng"
NeoForge/Fabric 客户端配置核心项:
identifier = "endlessmc-hng"
构建说明
公共模块与 Velocity
当前仓库默认使用 Gradle 9.x,可直接构建:
./gradlew.bat :common:build :velocity:build
Loader 模块
neoforged、fabric、forge 等加载器模块保留在同一仓库中,但当前 settings.gradle.kts 默认未启用全部模块。
按仓库内注释切换对应模块与 Gradle 版本后,可分别构建对应 Loader 产物。
分支策略
- 当前主线版本为
1.21.1 - 其他 Minecraft 版本建议使用独立分支维护
1.21.8分支已停止使用
适用场景
- 原版客户端进入默认登录服
- 不同整合包客户端进入各自的登录服
- 登录认证完成后自动进入各自目标后端
- 需要替代或补强现有“只负责转发、不负责识别客户端”的代理路由方案
许可证
本项目当前源码头部按 MIT 许可约定组织。

