I want NEPacketTunnelProvider to filter out my own HTTP or SOCKS connections. I have tried setting NEProxySettings' exceptionList or proxyAutoConfigurationJavaScript and setting autoProxyConfigurationEnabled to YES, but it doesn't seem to work. I'm not sure where I've gone wrong with the configuration.
This is part of my code.
settings.exceptionList = @[@"www.xxxx.xxx"];//Ip address is also not working.
settings.proxyAutoConfigurationJavaScript = [NSString stringWithFormat:@"function FindProxyForURL(url, host) { if(dnsDomainIs(host, \"www.xxxx.xxx\")) return \"DIRECT\"; return \"PROXY %@:%@\"}", proxyAddress, @(proxyPort)];
settings.autoProxyConfigurationEnabled = YES;