Hi
I am building a transparent proxy using NETransparentProxyProvider
When I try to "enable" the proxy, I get the following error
TansparentProxy[6293:14201007] save error: Missing protocol or protocol has invalid type
My code is available here on github - https://github.com/safekids-ai/TransparentProxy
If, instead of using
let manager = NETransparentProxyManager.shared()
, i use
let manager = NETransparentProxyManager()
I don't get an error while saving preferences, but I don't see any messages in log from the proxy. I am using the following command to see the logs.
sudo log stream
Also, i don't see any process running in the activity monitor for the extension
I have been looking at other's code and it seems like one has to call
let session = manager.connection as! NETunnelProviderSession
session.startTunnel()
but, in my case session is an instance of NEVPNConnection
One more question... There are two ways to add the proxy extension. One as an app extension (with .appex extension) and the other as a system extension (with .systemextension extension). I am using the second approach.
What is the difference between the two? Is there any right way to build the network extensions?
regards
waqqas