Port Forwarding Tools
Port forwarding requires a paid plan.
Route6 port forwarding uses a socat host bridge: traffic arriving on your agent's public IPv6 at a given external port is forwarded to the host machine's port (not just inside the container). This lets you expose any service running on the host.
port_forward_create
Expose a host-machine port to the internet via your agent's public IPv6.
| Parameter | Type | Required | Description |
|---|---|---|---|
external_port | number | ✓ | Public port on your agent's IPv6 (1024–65535, not 3000) |
internal_port | number | — | Port on the host machine (defaults to external_port) |
protocol | "tcp" | "udp" | — | Default: "tcp" |
ttl_seconds | number | — | Auto-expire after N seconds (60–86400). Omit for persistent. |
description | string | — | Label for your reference |
Example: port_forward_create(external_port=443, internal_port=8080)
→ Traffic to [your-ipv6]:443 reaches host:8080.
Temporary forward: port_forward_create(external_port=8888, ttl_seconds=3600)
→ Auto-expires after 1 hour.
port_forward_list
List all active port forwards with their external/internal ports, socat status, and TLS state. No parameters.
port_forward_delete
Remove a port forward and stop the socat process.
| Parameter | Type | Required | Description |
|---|---|---|---|
external_port | number | ✓ | External port of the forward to remove |
port_forward_tls
Enable or disable Route6-managed TLS termination on a TCP port forward.
When enabled, the *.on.route6.me wildcard cert is used — clients connect with HTTPS, socat decrypts and forwards plain TCP to the host. Requires a registered hostname (set via hostname_register).
| Parameter | Type | Required | Description |
|---|---|---|---|
port | number | ✓ | External port to configure TLS on |
action | "enable" | "disable" | ✓ | Enable or disable TLS termination |
Example:
port_forward_create(external_port=443, internal_port=8080)
port_forward_tls(port=443, action=enable)→ Clients connect to https://mybot.on.route6.me:443 with valid TLS.