Proxies.ai

Ports API

List open ports and replace the port list of a Hyperproxy.

Inspect and change which ports a Hyperproxy has open. A Hyperproxy only opens the base port 3128, ports that have a credential, and ports that have an active managed-proxy binding. See the Port Manager guide for the model.

List Ports

GET/api/proxies/:id/ports

Requires the proxies:read scope.

bash
curl https://proxies.ai/api/proxies/proxy-id/ports \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "ports": [3128, 3201, 3301],
  "boundCredentialPorts": [3201],
  "boundUpstreamPorts": [3301],
  "secureSharePorts": [3401],
  "reservedSystemPorts": [1344, 3129, 13440, 5353, 8080],
  "allocations": [
    {
      "port": 3128,
      "plane": "cifp-core",
      "label": "Hyperproxy Core",
      "username": "hyprx-proxy-id",
      "usernamePasswordRequired": false,
      "ipAuthEnabled": true
    }
  ],
  "count": 3
}
FieldDescription
portsEvery open port: the base port, ports with a credential, and ports with an active binding
boundCredentialPortsPorts that have a credential
boundUpstreamPortsPorts with an active managed-proxy binding
secureSharePortsPorts held by active Secure Shares. Not part of ports; they cannot be given credentials or bindings.
reservedSystemPortsPorts that can never be used
allocationsOne entry per port with its type (plane), label, login username, and Dual-Auth state

Update Ports

PUT/api/proxies/:id/ports

Requires a paid plan and the proxies:write scope. Send any of add, remove, or ports; every number must be an integer from 1024 to 65535.

FieldDescription
portsReplace the port list. Any open port other than 3128 that is missing from this list is closed. Up to 5,000 entries.
addPorts to open. Up to 1,000 entries.
removePorts to close. Up to 1,000 entries.
bash
# Keep only 3201; close every other extra port
curl -X PUT https://proxies.ai/api/proxies/proxy-id/ports \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ports": [3201]}'
Response (200)
{
  "status": "ok",
  "ports": [3128, 3201],
  "count": 2,
  "boundCredentialPorts": [3201],
  "boundUpstreamPorts": [],
  "reconcileMode": "pushed"
}

reconcileMode is pushed when the change reached your Hyperproxy immediately, or sync-bundle-queued when it will be applied on the next sync.

Rules

  • The base port 3128 cannot be removed (400).
  • You can only open a port that already has a credential or an active binding. Otherwise the request fails with 422 and code: "LEAST_PORTS_OPEN_VIOLATION", listing the unboundPorts. Provision a credential or binding first.
  • Closing a port deletes its credential and disables its binding. Closing a port that has a credential also requires the credentials:write scope.
  • Reserved ports and Secure Share ports can never be opened this way, because they cannot hold a credential or binding.