Allowed IPs (IP whitelist)
Restrict who can authenticate against a proxy package by managing a whitelist of client IPs.
GET /packages/{id}/allowed-ips
Returns the current whitelist for the package. When empty, any IP that knows the login + password can connect.
GET
/api/v1/packages/{id}/allowed-ipsresponse.json
{
"data": { "ips": ["203.0.113.7", "198.51.100.42"], "max": 5 },
"meta": { "version": "v1" }
}POST /packages/{id}/allowed-ips
Add an IP (IPv4 or IPv6) to the whitelist. Up to 5 IPs per package. Returns 409 if the IP is already on the list, 422 when the maximum is reached.
POST
/api/v1/packages/{id}/allowed-ipsrequest.json
{ "ip": "203.0.113.7" }response.json
{
"data": { "ips": ["203.0.113.7", "198.51.100.42"] },
"meta": { "version": "v1" }
}DELETE /packages/{id}/allowed-ips/{ip}
Remove an IP from the whitelist. Returns 204 on success, 404 if the IP is not present.
DELETE
/api/v1/packages/{id}/allowed-ips/{ip}Notes
A non-empty whitelist DISABLES password authentication: only clients connecting from a whitelisted IP can reach the proxy, regardless of credentials. Setting the whitelist back to empty re-enables password-only auth.
Code examples
allowed-ips.sh
# List
curl https://raxyproxy.com/api/v1/packages/12/allowed-ips \
-H "Authorization: Bearer raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Add
curl -X POST https://raxyproxy.com/api/v1/packages/12/allowed-ips \
-H "Authorization: Bearer raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"ip":"203.0.113.7"}'
# Remove
curl -X DELETE https://raxyproxy.com/api/v1/packages/12/allowed-ips/203.0.113.7 \
-H "Authorization: Bearer raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"allowed-ips.py
import requests
API_KEY = 'raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
PACKAGE_ID = 12
HEADERS = {'Authorization': f'Bearer {API_KEY}'}
BASE = f'https://raxyproxy.com/api/v1/packages/{PACKAGE_ID}/allowed-ips'
# Snapshot my current public IP into the whitelist
my_ip = requests.get('https://api.ipify.org').text
r = requests.post(BASE, headers=HEADERS, json={'ip': my_ip})
print(r.status_code, r.json())