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.
/ proxies. v1. Proxies/ TestProxyListRequest 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
hoststringEndpoint host name or IP address. Required. An invalid host fails the row.
password?stringPassword for proxy authentication. Write only: stored encrypted and never returned. Empty for an endpoint that authenticates by IP address.
port?integerEndpoint TCP port, from 1 to 65535. Any other value fails the row.
Format"int32"
scheme?stringProtocol used to connect: "http", "https" or "socks5". Empty means "http".
username?stringUsername 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?stringISO 3166-1 alpha-2 code of the proxy's exit address when it is known, empty otherwise.
failure?stringWhy the proxy did not answer. Unspecified when online.
Value in"PROXY_"PROXY_"PROXY_"PROXY_"PROXY_"PROXY_
latency?stringRound trip of the check through the proxy. Set when online.
online?booleanTrue when the proxy answered the connectivity check.
application/json
The request was malformed, such as a missing required field or an unparseable cursor. The request cannot be carried out in the current system state.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request was rate limited. Slow down and retry later.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The service is temporarily unavailable. Retry with backoff.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
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
}
]
}'const res = await fetch("https://api.goldmine.to/proxies.v1.Proxies/TestProxyList", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"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
}
]
}),
});
const data = await res.json();body := strings.NewReader(`{
"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
}
]
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/proxies.v1.Proxies/TestProxyList", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/proxies.v1.Proxies/TestProxyList",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"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
}
]
},
)
data = res.json(){
"results": [
{
"online": true,
"latency": "0.218s"
},
{
"failure": "PROXY_TEST_FAILURE_CREDENTIALS_REJECTED"
},
{
"failure": "PROXY_TEST_FAILURE_NOT_A_PROXY_ADDRESS"
}
]
}{
"code": "failed_precondition",
"message": "The request cannot be carried out in the current system state."
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}{
"code": "unavailable",
"message": "The service is temporarily unavailable. Retry with backoff."
}