Network Policy
Control outbound network access using DNS-based filtering. Policies define which domains sprites can reach, with support for exact matches, wildcard subdomains, and preset rule bundles.
Changes apply immediately—existing connections to newly-blocked domains are terminated. Failed DNS lookups return REFUSED for fast failure.
Get Network Policy
/v1/sprites/{name}/policy/network
Get the current network policy configuration.
Response
application/jsonrules*
NetworkPolicyRule[]
List of network policy rules
domain
string
Domain pattern (e.g., *.github.com)
action
string
allow or deny
include
string
Include rules from preset
Response Codes
Success
Not Found - Resource not found
Internal Server Error
Set Network Policy
/v1/sprites/{name}/policy/network
Update the network policy configuration.
Request Body
application/jsonrules*
NetworkPolicyRule[]
List of network policy rules
domain
string
Domain pattern (e.g., *.github.com)
action
string
allow or deny
include
string
Include rules from preset
Response
application/jsonResponse Codes
Success
Bad Request - Invalid request body
Not Found - Resource not found
Internal Server Error