Skip to content
Dashboard

The connector

View as Markdown

The connector is the part of the Minekube plugin that connects a Paper server or Velocity proxy to its network. It is a Rust library, loaded into the server’s own Java process, and it turns on when the plugin’s folder holds a connector.json. Every instance is a platform with a connector.

  • Keeps the instance’s identity. It makes the instance’s key on first start and signs everything the instance says with it.
  • Stays reachable without an open port. It connects outward to its home relay and keeps that connection, so players can be sent to it at home behind NAT too.
  • Hands each player to the platform. Each player arrives as a stream on that connection, and the connector passes it into the server as a local connection, with the player’s real address.
  • Guards the network boundary. It accepts streams only from Minekube’s relays and from instances of its own network.
  • Reports to the Minekube API. A control channel to the Minekube API, signed with its key, carries the instance’s labels, platform, version and load.
  • Finds other instances by label. On a proxy, each server name stands for a selector; the connector picks a matching instance and opens a stream to it, connector to connector.
  • Installs the network’s bundles. When the network deploys a version that this instance’s labels match, the connector fetches its bundles, checks their hashes and writes them where the Minekube plugin’s runtime loads them.
  • Joins a network. With an invite or a token from its environment, it asks the registry to let its key in; without one, it logs a claim code.

Hosting panels that run one container per server, such as Pterodactyl and Pelican, end every process in the container when Java exits. A companion process next to the server would outlive nothing there, and it would cost memory. Inside the process, the connector shares the server’s life and costs one connection per instance.

The connector reaches Java through the Foreign Function and Memory API, which is final from Java 22 on, so it needs Java 22 or newer. The plugin jar carries the native library for each supported operating system.

  • Not the Connect plugin. The Connect plugin is today’s production connector for <endpoint>.play.minekube.net. A server with the Minekube plugin brings its own connector and should not load the Connect plugin as well.
  • Not a proxy. It does not read or change the Minecraft protocol. The server logs players in as it always does.
  • Not where routing is decided. Where players go is the network’s code, in the platform’s runtime. The connector only carries streams.

The connector is built for Paper and Velocity, in preview. Its native libraries are built for Linux, macOS and Windows in CI; loading them is not yet tested on every platform. Planned: signed origins, so an instance that receives a player from another instance can verify where they came from.

Was this helpful?