Domain route via VPN
This allows you to selectively route specific domains through the VPN tunnel while keeping all other traffic unaffected. This is the opposite of the Domain Bypass feature.
Configuration via VPN
let bypassConfiguration = BypassConfiguration(
isBypassEnabled: false,
bypassDomainsBehaviour: .bypassAllExcept,
bypassDomains: ["*.domain1.com", "domain2.net", "domain3.org"],
bypassDNSServer: nil
)
In this example:
Traffic for subdomains of
domain1.com
,domain2.net
anddomain3.org
will be routed through the VPN.All other traffic will bypass the VPN and use direct connections.
Since we do not provide default values for this initializer at the moment, you need to explicitly specify
isBypassEnabled: false
.It's important to be aware that if you use
isBypassEnabled: true
, it will result in a full bypass, meaning that all traffic will be bypassed and not routed through the VPN.
Last updated
Was this helpful?