Home›Java›Mods›InvSeparate
ModsJava

InvSeparate

by Himic · on Modrinth

InvSeparate is an open-source routing solution for Minecraft networks that host multiple modpacks behind a single proxy entrypoint.

⬇ Download on Modrinth

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:

This allows one Velocity proxy to serve vanilla clients, multiple modpack clients, and different login flows at the same time.

Features

How It Works

  1. The client mod reads the configured identifier
  2. The mod writes <hostname>\0<identifier> into the handshake host field
  3. The Velocity plugin reads the identifier from the raw handshake hostname
  4. The plugin selects the configured login server and post-login target
  5. 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

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

Use Cases

License

The current source headers are organized around the MIT license.

InvSeparate

InvSeparate 是一个面向多整合包 Minecraft 网络的开源路由方案。

它由两部分组成:

这让同一个 Velocity 入口可以同时服务原版客户端、多个整合包客户端,以及各自不同的登录与落地流程。

特性

工作原理

  1. 客户端 Mod 在连接服务器时读取本地配置中的 identifier
  2. Mod 将 <hostname>\0<identifier> 写入握手地址
  3. Velocity 插件从原始握手主机名中提取标识
  4. 插件根据 config.yml 中的规则选择登录服与登录后目标服
  5. 若无标识或标识未知,则按默认规则处理

注意:Velocity 的 getVirtualHost() 会丢弃 null byte 之后的数据,因此服务端必须读取原始主机名而不是处理后的虚拟主机值。

仓库结构

配置示例

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 产物。

分支策略

适用场景

许可证

本项目当前源码头部按 MIT 许可约定组织。

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more