Website rules

Limit which sites a proxy may reach: a block list (the listed sites are blocked, everything else works) or an allow list (only the listed sites work, everything else is blocked). The rules are enforced on your box by the agent, so the box must run agent 1.3.0 or newer — agent_supported tells you; older agents keep the rules but do not apply them.

EntryMatches
example.comexactly example.com (not www.example.com)
*.example.comexample.com and every name under it (www.example.com, a.b.example.com)
203.0.113.9, 2001:db8::1that IP address
  • Entries are cleaned up for you: lower-case, international names stored as punycode (bücher.example → xn--bcher-kva.example), a pasted URL keeps only its host, duplicates are dropped. At most 500 entries per proxy.
  • Raw IP destinations: allow list → blocked unless that IP is listed; block list → allowed unless listed.
  • A blocked HTTP request gets 403 with the body Blocked by proxy policy (header X-Hyp-Blocked: policy); a blocked HTTPS (CONNECT) request gets 403 before the tunnel opens; a blocked SOCKS5 connection is refused (reply code 2, "not allowed by ruleset").
  • HTTPS is judged by the site name the client asks the proxy for. Nothing is decrypted, so an app that connects by IP (in block-list mode) or hides the real site behind a CDN cannot be told apart.
  • Rotation, SMS and the dongle's own controls are never affected. Changes reach the box within one heartbeat (~15 s); open connections keep running until they close.

Get the rules

GET /proxies/{id}/rules

Ability: read

curl
Python
Node.js
PHP
curl 'https://proxykite.com/api/v1/proxies/7/rules' \
  -H "Authorization: Bearer $HYP_TOKEN" \
  -H 'Accept: application/json'

Response 200

{"data": {"mode": "blocklist", "domains": ["facebook.com", "*.tiktok.com", "203.0.113.9"],
  "max_entries": 500, "agent_version": "1.3.0", "agent_supported": true}}

mode is off, blocklist or allowlist. With off the list is kept (so you can switch it back on) but nothing is blocked.

Set the rules

PUT /proxies/{id}/rules

Ability: manage · Who: the account owner or a team admin (not team viewers, not reseller sub-users).

Body fieldType
modestringrequired — off, blocklist or allowlist
domainsarray of stringsoptional — the whole new list (max 500). Leave it out to keep the current list and only change mode
curl
Python
Node.js
PHP
curl -X PUT 'https://proxykite.com/api/v1/proxies/7/rules' \
  -H "Authorization: Bearer $HYP_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"mode":"allowlist","domains":["example.com","*.example.org"]}'

Response 200 — the rules object as in Get the rules.

422 validation_failed (fields.domains) names the entries that are not a domain, *.domain or IP, a list over 500 entries, or an empty allow list (it would block every site). fields.mode for an unknown mode.