API Reference
Dashboard
  1. API Reference
  2. Box API
  3. 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.

  • Destructive · confirm first
  • Basic auth
  • Panel API · since v20.8.0
  • Hub: needs owner approval
  • setVpsForwardingRules
POST/v2/forwarding/config_rules

Request body application/json · required

vps_relay_adjust_proxy_portintegeroptional

Offset for proxy ports (also VLESS/Shadowsocks).

vps_relay_adjust_web_portintegeroptional

Offset for the dashboard port.

vps_relay_adjust_selling_portintegeroptional
vps_relay_adjust_group_portintegeroptional
vps_relay_adjust_vpn_portintegeroptional
vps_relay_adjust_ssh_portintegeroptional
vps_relay_enable_proxybooleanoptional
vps_relay_enable_sellingbooleanoptional
vps_relay_enable_groupbooleanoptional
vps_relay_enable_vpnbooleanoptional
vps_relay_enable_webbooleanoptional
vps_relay_enable_sshbooleanoptional
vps_net_isolate_enablebooleanoptional

Network isolation; needs the xrelay engine.

vps_proc_isolate_enablebooleanoptional
vps_socks5_udp_enablebooleanoptional
vps_relay_selling_access_logbooleanoptional
vps_starting_relay_portintegeroptional

First of the 4 relay tunnel ports on the VPS.

vps_relay_tunnelsintegeroptional

Parallel tunnels per port.

vps_tunnel_stackstringoptional
One of xrelay, wireguard

Authentication

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.

statusbooleanoptional
msgstringoptional
codestringoptional
dataobjectoptional

Errors returned in msg

msgMeaningWhat 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 VPScode 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 runningAnother go-live job runs.Wait for it to finish.
Failed to add forwarding configs!Unexpected error.Check the controller log and retry.
Verified against XProxy v21.3.2 on Nov 17, 2026