Skip to main content
Mole explaining roles

Agent Roles

Each agent in your mesh has a job: accept connections from users, relay traffic between networks, or open connections to destinations. One agent can do all three, or you can specialize agents for different purposes.

The Three Roles

RoleWhat It DoesYou Need This When...
IngressAccepts your SOCKS5 connectionsYou want to connect through this agent
TransitRelays traffic to other agentsYou need to bridge network segments
ExitOpens connections to destinationsYou want traffic to exit from this network

Ingress Role

An ingress agent is where you connect. Point your browser, curl, or SSH at the SOCKS5 proxy and your traffic enters the mesh.

What it does:

  • Runs a SOCKS5 proxy that you connect to
  • Looks up which exit can reach your destination
  • Opens a tunnel through the mesh to that exit
  • Relays your traffic through the tunnel

Typical deployment:

  • User workstations (local SOCKS5 proxy)
  • Edge servers (remote access gateway)
  • Cloud instances (entry point for distributed teams)

Transit Role

A transit agent bridges networks. Put one in the cloud, the DMZ, or anywhere that can reach multiple network segments, and it relays traffic between them.

What it does:

  • Connects to agents in different networks
  • Forwards traffic between them
  • Propagates route information through connected peers
  • Cannot see the traffic content (end-to-end encrypted)

Typical deployment:

  • Cloud relay (bridge between on-premise networks)
  • DMZ server (connect internal and external networks)
  • Geographic hop (reduce latency across regions)
Implicit Role

Transit role is implicit - any agent that connects to multiple peers automatically becomes a transit node. No specific configuration is needed.

Exit Role

An exit agent is where traffic leaves the mesh. Put one inside a private network to reach internal resources, or in a cloud region to exit from that location.

What it does:

  • Advertises which destinations it can reach (CIDR routes, domains)
  • Opens real TCP connections to those destinations
  • Resolves DNS for domain-based routing
  • Controls which destinations are allowed
Agent Reachability

All agents are reachable by ID for management operations (shell, file transfer, ping, status queries) regardless of whether they have exit routes configured. Exit routes only control which network destinations an agent can reach on behalf of SOCKS5 clients.

Typical deployment:

  • Internet gateway (default route for all traffic)
  • Private network access (routes to internal resources)
  • Service endpoint (access to specific services/CIDRs)

Combined Roles

Agents can combine multiple roles. Common patterns:

PatternDescriptionUse Case
Ingress + ExitEntry point that also exits trafficStandalone proxy, simple setups
Ingress + TransitEntry point that relays to other exitsGateway with multiple exit options
Transit + ExitRelay that also provides exit routesBridge between networks with local exit
All ThreeDoes everythingSingle-agent deployments

Role Selection Guide

What You WantHow To Set It Up
Tunnel from my laptop to the internetSingle agent with Ingress + Exit
Reach a remote office networkIngress on your laptop, Exit inside the office
Connect multiple offices togetherTransit in the cloud, Exit at each site
Team access to internal resourcesIngress at each user location, Exit inside the network
Exit from different geographic regionsTransit hub, regional Exit agents

Checking Agent Roles

Query the dashboard API to see each agent's roles:

curl http://localhost:8080/api/nodes | jq '.nodes[] | {display_name, roles}'

The roles field in the response shows which roles each agent has: ingress, transit, exit, forward_ingress, or forward_exit.

Best Practices

  1. Minimize exit points: Fewer exits are easier to monitor and secure
  2. Place transit in DMZ: Transit agents don't need to access sensitive resources
  3. Use specific routes: Avoid 0.0.0.0/0 on exits unless necessary
  4. Separate concerns: Don't combine ingress and exit on the same agent in production
  5. Enable HTTP API: Enable health checks and dashboard on every agent
Connection Direction

Transport connection direction (who dials whom) is independent of agent roles. See Architecture - Connection Model for details.

Next Steps