Skip to main content

Domain Rules

Domain-based rules allow you to route traffic based on the domain name of the destination. Surfboard supports exact matches, suffix matches, and keyword matches.

Example

# Matches the exact domain www.apple.com and forces remote DNS resolution
DOMAIN, www.apple.com, ProxyHTTP, force-remote-dns

# Matches apple.com and all its subdomains, returning a fake IP locally
DOMAIN-SUFFIX, apple.com, Proxy, enhanced-mode

# Matches any domain containing the keyword 'google'
DOMAIN-KEYWORD, google, Proxy

Format

{type}, {domain rule}, {target proxy}[, force-remote-dns][, enhanced-mode]

Parameters

NameValueMandatoryNote
typeDOMAIN
DOMAIN-SUFFIX
DOMAIN-KEYWORD
trueDOMAIN: Exact matching.
DOMAIN-SUFFIX: Suffix matching.
DOMAIN-KEYWORD: Keyword matching.
domain rule-true
target proxy-trueThe specified proxy or proxy group must exist in the profile.
force-remote-dnstrue
false
falseDefault value: false.
If set to true, the DNS query will be triggered on the remote proxy.
enhanced-modetrue
false
falseDefault value: false.
If set to true, a fake IP will be returned in the DNS query.