BARTIS.DEV
DOCS/hub/Technical

How it Works (Deep Dive)

Understanding the traffic flow helps in debugging and optimizing your setup.

  1. Ingress: A user connects to your Gate IP (e.g., play.example.com on port 25565).
  2. Packet Sniffing: The Gate accepts the TCP connection and inspects the first few bytes (without terminating SSL).
    • Minecraft: Extracts the hostname from the Handshake packet.
    • HTTPS: Extracts the SNI from the TLS Client Hello.
    • HTTP: Extracts the Host header.
  3. Route Lookup: The Gate queries its routing table (InMemory or Redis) for play.example.com.
  4. Tunnel Selection: It finds the associated Tunnel ID for the active Agent (Link).
  5. Stream Multiplexing: The Gate opens a new virtual stream inside the existing, persistent TCP tunnel to the Link.
  6. Forwarding: The Link receives the stream and dials the local target (e.g., 127.0.0.1:25565).
  7. Data Flow: Traffic flows transparently: User <-> Gate <-> Link <-> Local Server.
ID: 17LAST UPDATED: 3/1/2026