- API Reference
- Box API
- VPS forwarding
Change which services the VPS publishes and on which ports
Validates the rules (keys left out keep their saved value). Needs the VPS forwarding license feature. While forwarding is off the rules are only saved. While forwarding is on, the security preflight must pass and a go-live job starts that checks everything, sets up the VPS and applies the rules without a panel restart; the answer then carries job_id and the job reports progress in the panel. Stored VPS credentials are reused when the body leaves them empty.
/v2/forwarding/config_rulesRequest body application/json · required
Offset for proxy ports (also VLESS/Shadowsocks).
Offset for the dashboard port.
Network isolation; needs the xrelay engine.
First of the 4 relay tunnel ports on the VPS.
Parallel tunnels per port.
xrelay, wireguardAuthentication
Needs a trusted caller (loopback, LAN unless "force auth for local" is on, whitelisted IP, allowed Tailscale) or valid dashboard Basic credentials, which are checked only when dashboard authentication is enabled.
Responses
Saved, go-live job started, or a refusal.
The caller is not trusted (not loopback, LAN, whitelisted or allowed Tailscale) and sent no valid Basic credentials. The body depends on whether "Basic auth for all API" is on. Routes that also use the panel login can answer a plain-text 401 "Unauthorized Access" instead.
Errors returned in msg
| msg | Meaning | What to do |
|---|---|---|
This function is available on higher plan license only. Please contact Administrator! | The license has no VPS forwarding feature. | Upgrade the license. |
Secure the dashboard and proxies before exposing them on the VPS | code preflight_blocked: an exposed service has no login; data holds the checklist. | Set a dashboard password and proxy login, then retry. |
Parallel tunnels per port must be between 1 and 16. | vps_relay_tunnels is out of range. | Send 1–16. |
Unknown tunnel engine. | vps_tunnel_stack is not xrelay or wireguard. | Send xrelay or wireguard. |
Network isolation needs the Relay engine. ... | vps_net_isolate_enable is on with the wireguard engine. | Turn off network isolation or use xrelay. |
VPS NAME port N is out of range (LOW-HIGH), please adjust the FIELD. | An offset moves a public port out of range. | Change the named offset. |
VPS selling offset must be between -65000 and 65000. | Selling (or group) offset out of range. | Send a value in range. |
Starting relay port must be between 100 and 65532. | vps_starting_relay_port out of range. | Send 100–65532. |
A VPS setup is already running | Another go-live job runs. | Wait for it to finish. |
Failed to add forwarding configs! | Unexpected error. | Check the controller log and retry. |