Blockierte Hosts
Verhindern Sie, dass das Proxy-Paket bestimmte Ziel-Hosts erreicht.
GET /packages/{id}/blocked-hosts
Gibt die aktuelle Blocked-Hosts-Liste zurück. Leeres Array = keine Sperre.
GET
/api/v1/packages/{id}/blocked-hostsresponse.json
{
"data": { "hosts": ["facebook.com", "tiktok.com", "*.doubleclick.net"] },
"meta": { "version": "v1" }
}PUT /packages/{id}/blocked-hosts
Ersetzt die gesamte Liste. Leeres Array löscht sie. Max 100 Einträge, je max 253 Zeichen. Nur Hostnamen — kein Schema, kein Port, kein Pfad.
Wildcard-Unterstützung folgt den Provider-Regeln: meistens funktioniert *.example.com, vor produktivem Einsatz testen.
PUT
/api/v1/packages/{id}/blocked-hostsrequest.json
{
"hosts": ["facebook.com", "tiktok.com", "*.doubleclick.net"]
}Code-Beispiele
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":[]}'