Skip to content

API Reference / Proxy pools

Test proxies before importing them

Dials each proxy once through the same connectivity check the service uses for imported proxies and reports whether it answered, how long it took, and why it failed. Rows are validated exactly as ImportProxyList validates them, at most 25 rows a call, and nothing is stored. Limited per workspace to 60 calls a minute with a burst of 10. A refused call is resource_exhausted with the rate limited reason and a retry time.

POST/proxies.v1.Proxies/TestProxyList

Request body

application/jsonRequired

Request to test up to 25 proxies before they are imported.

rows?array<ProxyImportRow>

The proxies to test, at most 25. More is rejected with invalid_argument.

Show attributes
hoststring

Endpoint host name or IP address. Required. An invalid host fails the row.

password?string

Password for proxy authentication. Write only: stored encrypted and never returned. Empty for an endpoint that authenticates by IP address.

port?integer

Endpoint TCP port, from 1 to 65535. Any other value fails the row.

Format"int32"

scheme?string

Protocol used to connect: "http", "https" or "socks5". Empty means "http".

username?string

Username for proxy authentication. Empty for an endpoint that authenticates by IP address.

Response body

application/json

Success

results?array<ProxyTestResult>

The outcome of each row, in request order.

Show attributes
country?string

ISO 3166-1 alpha-2 code of the proxy's exit address when it is known, empty otherwise.

failure?string

Why the proxy did not answer. Unspecified when online.

Value in"PROXY_TEST_FAILURE_TIMED_OUT""PROXY_TEST_FAILURE_CREDENTIALS_REJECTED""PROXY_TEST_FAILURE_CONNECTION_FAILED""PROXY_TEST_FAILURE_UNEXPECTED_RESPONSE""PROXY_TEST_FAILURE_NOT_A_PROXY_ADDRESS""PROXY_TEST_FAILURE_ADDRESS_NOT_ALLOWED"

latency?string

Round trip of the check through the proxy. Set when online.

online?boolean

True when the proxy answered the connectivity check.

curl -X POST "https://api.goldmine.to/proxies.v1.Proxies/TestProxyList" \
  -H "Authorization: Bearer $CSTRADER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "rows": [
      {
        "scheme": "http",
        "host": "203.0.113.10",
        "port": 8080,
        "username": "u1",
        "password": "p1"
      },
      {
        "scheme": "socks5",
        "host": "203.0.113.11",
        "port": 1080,
        "username": "u1",
        "password": "wrong"
      },
      {
        "host": "not a host",
        "port": 8080
      }
    ]
  }'
{
  "results": [
    {
      "online": true,
      "latency": "0.218s"
    },
    {
      "failure": "PROXY_TEST_FAILURE_CREDENTIALS_REJECTED"
    },
    {
      "failure": "PROXY_TEST_FAILURE_NOT_A_PROXY_ADDRESS"
    }
  ]
}