CHAN.RUN

Products
Restunnel
Guide
Usage

Node Selection

Node Selection

When the hub receives a proxy request, it picks an exit node to route through. By default, it uses the first connected node. You can also select a specific node by label.

Default Behavior

With one exit node connected, all traffic routes through it automatically. With multiple nodes, the hub uses the first connected node.

Named Routing

Both proxy protocols support selecting a specific exit node by its label (the name assigned during enrollment).

SOCKS5

The username field selects the node. The password is ignored — use any value:

# Auto-select (default node)
curl --proxy socks5://localhost:1080 https://example.com

# Route through "vienna-home" specifically
curl --proxy socks5://vienna-home:x@localhost:1080 https://example.com

# Route through "phone-bangkok"
curl --proxy socks5://phone-bangkok:x@localhost:1080 https://example.com

HTTP CONNECT

The Proxy-Authorization header selects the node, using the same username convention:

# Auto-select
curl --proxy http://localhost:1081 https://example.com

# Route through "vienna-home" specifically
curl --proxy http://vienna-home:x@localhost:1081 https://example.com

How Labels Are Assigned

Node labels come from (in priority order):

  1. Token label — set by the operator when generating the enrollment token: --label exit-bangkok
  2. Device hostname — sent by the exit node during enrollment
  3. Auto-generated — sequential ID (node-1, node-2)

You can see connected nodes and their labels on the dashboard.

Future Strategies

These routing strategies are planned but not yet implemented:

StrategyBehavior
autoHealthiest node with lowest latency
randomRandom selection across available nodes
stickySame target domain always uses the same node (consistent IP)
geoPick node closest to a target geography