Hosts bloqueados
Impeça o pacote proxy de alcançar hosts de destino específicos.
GET /packages/{id}/blocked-hosts
Retorna a lista atual de hosts bloqueados. Array vazio = nenhum.
GET
/api/v1/packages/{id}/blocked-hostsresponse.json
{
"data": { "hosts": ["facebook.com", "tiktok.com", "*.doubleclick.net"] },
"meta": { "version": "v1" }
}PUT /packages/{id}/blocked-hosts
Substitui a lista inteira. Array vazio para limpar. Até 100 entradas, ≤253 chars cada. Apenas hostnames — sem esquema, porta ou path.
Suporte a wildcards segue as regras do provedor: *.example.com geralmente funciona; teste antes da produção.
PUT
/api/v1/packages/{id}/blocked-hostsrequest.json
{
"hosts": ["facebook.com", "tiktok.com", "*.doubleclick.net"]
}Exemplos de código
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":[]}'