How can I control if traffic from other apps goes through the proxy when using a NETunnelProvider?

I am setting up a fake VPN with proxy settings using NEPacketTunnelProvider. When I check proxy check sites, I can see the proxy is detected.

let settings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "10.0.0.1")
let proxySettings = NEProxySettings()
proxySettings.httpEnabled = true
    proxySettings.httpsEnabled = true 
proxySettings.httpServer = NEProxyServer(address: hostIP, port: portNumber)
    proxySettings.httpsServer = NEProxyServer(address: hostIP2, port: portNumber2)
proxySettings.excludeSimpleHostnames = false
proxySettings.matchDomains = [""]
settings.proxySettings = proxySettings

How can I control whether other installed apps on the phone use or bypass this proxy? Can I do this with exceptionList? Since I am routing everything through a VPN, I assumed I could control this. The selection of which apps use the proxy should be up to the user.

Could you provide an explanation of how I can manage this? I am quite new to these types of tasks.

What platform is this?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How can I control if traffic from other apps goes through the proxy when using a NETunnelProvider?
 
 
Q