STCP/XTCP and Visitors
A regular TCP proxy opens a public port on frps that anyone can connect to. STCP, SUDP and XTCP proxies open no public port: only machines running a visitor with the same secret key can connect. They suit SSH, remote desktop, NAS admin pages and other services you don't want on the internet.
| Type | Description |
|---|---|
| STCP | TCP traffic relayed through frps |
| SUDP | UDP traffic relayed through frps |
| XTCP | TCP traffic over a direct peer-to-peer connection (traffic skips frps); if the direct connection fails, the visitor cannot connect. Good for heavy traffic, but depends on the network |
The path needs both ends:
Machine being reached (publishes the proxy) Machine reaching it (runs the visitor)
Podux / frpc ── STCP proxy "nas" ⇄ frps ⇄ Podux / frpc ── visitor on 127.0.0.1:6000
└── local service 127.0.0.1:5000 └── you connect to 127.0.0.1:6000Both ends must use the same frps. Either end can be managed by Podux or run native frpc.
Step 1: Publish an STCP/XTCP Proxy
On the machine being reached:
- Proxies → Add Proxy, type STCP (or SUDP, XTCP)
- Enter the local address and port, such as
127.0.0.1:5000 - Secret key: a random key is generated when you pick the type; the visitor must use the same value
- Allowed users (optional): empty allows only visitors of the same frps user;
*allows anyone; separate several users with commas - Save
After saving, the "Remote port / domain" column of the proxy list shows the name for visitors, such as nas-abc123def456ghi. Podux registers proxies on frps as "name-ID", so the visitor needs this full name, not just nas.
Step 2: Add a Visitor
On the machine reaching it:
- Visitors → Add visitor
- Choose the server that uses the same frps as the proxy
- Fill in the target proxy:
- If the target proxy is in this Podux too, use Fill from a Podux proxy; it fills in the server, type, name and key
- Otherwise enter the Proxy name (copied in step 1) and Secret key; if the target's frpc uses a different
user, enter it as Proxy user
- Enter the local Listen address and Listen port, such as
127.0.0.1:6000.127.0.0.1accepts local connections only;0.0.0.0accepts the LAN - Encryption and compression must match the target proxy
- Save
If the server is running, the visitor takes effect as soon as it is saved. Connecting to 127.0.0.1:6000 then reaches 127.0.0.1:5000 on the other machine.
XTCP Fallback
XTCP relies on peer-to-peer hole punching, which fails on some networks. An STCP visitor can serve as a fallback:
- On the machine being reached, publish an STCP proxy for the same local service, next to the XTCP proxy
- On the machine reaching it, add an STCP visitor for that proxy and turn on Don't listen (it is only a fallback path)
- Edit the XTCP visitor, choose that STCP visitor under Fall back to, and optionally set the timeout (ms)
When hole punching fails or times out, connections switch to STCP, relayed by frps.
Native frpc on the Other End
A visitor in frpc.toml:
[[visitors]]
name = "nas-visitor"
type = "stcp"
serverName = "nas-abc123def456ghi" # the name copied from the Podux proxy list
secretKey = "the proxy's secret key"
bindAddr = "127.0.0.1"
bindPort = 6000The other way round, a proxy published by native frpc is named by its name setting; enter that in the Podux visitor.
Import
When importing frpc.toml, STCP/SUDP/XTCP proxies are imported like other proxies, and [[visitors]] appear in the preview's Visitors section, where you choose whether to import them and whether to overwrite visitors with the same name. TCPMUX is also supported; unrecognized types are skipped with a warning.
When a private proxy and a same-user visitor targeting it are actually imported from the same file, Podux maps the visitor's serverName to the proxy's generated “name-ID” automatically. References to other users or proxies not imported retain their original target names. An overwrite import clears old fallback settings omitted from the file.