Blocked Hosts
DocsBlocked Hosts

Blocked hosts

Prevent the proxy package from reaching specific destination hosts.

GET /packages/{id}/blocked-hosts

Returns the current blocked-hosts list. Empty array means no host is blocked.

GET/api/v1/packages/{id}/blocked-hosts
response.json
{
  "data": { "hosts": ["facebook.com", "tiktok.com", "*.doubleclick.net"] },
  "meta": { "version": "v1" }
}

PUT /packages/{id}/blocked-hosts

Replaces the entire blocked-hosts list. Pass an empty array to clear it. Up to 100 entries, each up to 253 characters. Hostnames only — no scheme, no port, no path.

Wildcard support follows the provider rules: most setups accept *.example.com but check by experimentation before relying on it in production.

PUT/api/v1/packages/{id}/blocked-hosts
request.json
{
  "hosts": ["facebook.com", "tiktok.com", "*.doubleclick.net"]
}

Code examples

blocked-hosts.sh
# Get current blocked list
curl https://raxyproxy.com/api/v1/packages/12/blocked-hosts \
     -H "Authorization: Bearer raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Replace with new list
curl -X PUT https://raxyproxy.com/api/v1/packages/12/blocked-hosts \
     -H "Authorization: Bearer raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
     -H "Content-Type: application/json" \
     -d '{"hosts":["facebook.com","tiktok.com"]}'

# Clear the list
curl -X PUT https://raxyproxy.com/api/v1/packages/12/blocked-hosts \
     -H "Authorization: Bearer raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
     -H "Content-Type: application/json" \
     -d '{"hosts":[]}'