Proxy
A proxy sits in front of several servers. Players connect to the proxy once and can switch between the servers behind it without reconnecting.
Vanillite has its own proxy, vanillite-proxy, written in Rust. It speaks Velocity's "modern forwarding" (and BungeeCord's older forwarding), so behind it you can run Vanillite, Paper and Spigot servers. You can also put Vanillite behind a Velocity proxy.
Login, server switching, fallback, the trusted link, older clients, Bedrock players and the commands below work. The proxy has no plugin API yet (Planned).
What it does
- Checks the players' Minecraft accounts and encrypts the connection (
online-mode). - Sends players to the first server of the try order that is up.
/server <name>switches to another server (names are completed with Tab);/serveralone lists the servers with their player counts, click one to switch./glistshows the players on all servers,/glist <server>one server.- Operators' commands:
/send <player|all|current> <server>moves players,/alert <message>tells everybody,/proxy reloadreloadsproxy.tomlwithout a restart and/proxy infoshows the version and servers. - A console in the terminal where the proxy runs takes
glist,send,alert,kick <player> [reason],proxy reloadandend(stops the proxy). - On a switch, resource packs of the old server that the new one does not send are removed.
- If a server goes down or refuses the player (for example with a whitelist), the player is moved to the next server of the try order. Every server is tried at most once. When none is left, the player is disconnected with the reason of the last server, in the player's language (for example "You are not whitelisted on this server!").
- Forced hosts: a host name (like
lobby.example.com) can send players to a chosen server. - The server list shows the players of all servers together, with the proxy's own MOTD and icon (
motd,favicon). - Players that a server sent with a transfer packet can be accepted (
accepts-transfers, off by default). - BungeeCord plugin channel (
bungee-plugin-channel, on by default): plugins on the servers can use the usualBungeeCordmessages, for example to connect a player to another server, count players, list servers or send a message. Players cannot fake messages on this channel. - Limits against connection floods (connections per IP, time between logins).
- Trusted link to Vanillite servers: they prepare the packets for the player, and the proxy passes them on unchanged. This saves most of the proxy's work (Proxy speed). On by default (
trusted-linkinproxy.toml); Paper servers simply ignore it. - Older clients (1.20.5 to 26.2) are translated by the proxy, so the servers behind it only see 26.3 (
older-versionsinproxy.toml, default"all"; see Connecting). - Bedrock players can join through the proxy (see below).
Setting it up
The proxy is built together with the server (see Installation); the program is target/release/vanillite-proxy. Start it in an empty folder:
vanillite-proxy --dir my-proxy
The first start writes proxy.toml with every setting explained, and forwarding.secret with a random secret. The proxy listens on port 25577 by default. Name your servers and the try order in proxy.toml:
try = ["lobby"]
[servers]
lobby = "127.0.0.1:25565"
survival = "127.0.0.1:25566"
[permissions] decides who may use /server, /glist, /send, /alert and /proxy ("*" = everybody; /send, /alert and /proxy are for nobody by default; the console may always use them). The secret can also come from the environment variable VANILLITE_PROXY_SECRET.
player-info-forwarding says how the servers learn who a player is:
| Value | Meaning |
|---|---|
"modern" (default) |
Velocity's modern forwarding, signed with the secret. Vanillite and Paper servers. |
"legacy" |
BungeeCord forwarding, not signed. Spigot servers with bungeecord: true. Only behind a firewall. |
"none" |
The servers see offline UUIDs. |
To let Bedrock players in, set enabled = true in the [bedrock] section of proxy.toml. The proxy then also listens on port 19132, over UDP and TCP (Bedrock 1.26.60 and newer need both; the proxy keeps its identity in bedrock-identity.key). min-protocol in the same section limits the accepted Bedrock versions, like on the server. See Connecting for what Bedrock players can do.
The servers behind it
Each server needs the same secret as the proxy. On a Vanillite server, set it in vanillite.toml:
| Key | Default | What it does |
|---|---|---|
proxy.velocity-secret |
empty | The proxy's secret. Empty turns forwarding off. With a secret, the player's account and address come from the proxy. Needs a restart. |
proxy.allow-direct-connections |
false |
With forwarding on, also let players join directly, without the proxy (their account is checked as usual). Needs a restart. |
On Paper, set the same secret under proxies.velocity. Keep the servers' own ports closed to the internet, so players can only come in through the proxy.
See also: Configuration overview, Connecting, Proxy speed.
Next chapter: Configuration overview.