Instance Property

matchDomains

A list of domain strings used to determine which DNS queries will use the DNS resolver settings contained in this object.

Declaration

@property(copy) NSArray<NSString *> *matchDomains;

Discussion

This property is used to create a “split DNS” configuration, where only hosts in certain domains are resolved using the tunnel’s DNS resolver settings. Hosts not in one of the domains in this list are resolved using the system’s default resolver.

If matchDomains contains the empty string it becomes the default domain. This is how a split-tunnel configuration can direct all DNS queries first to the VPN DNS servers before the primary DNS servers.

If the VPN tunnel becomes the network’s default route, the servers listed earlier by NEDNSSettings become the default resolver and the matchDomains list is ignored.

See Also

Accessing DNS Properties

servers

The DNS server IP addresses.

searchDomains

A list of domain strings used to fully qualify single-label host names.

domainName

The primary domain of the tunnel.

matchDomainsNoSearch

A Boolean that specifies if the domains in the matchDomains list should not be appended to the resolver’s list of search domains.