Post

Replies

Boosts

Views

Activity

handleNewFlow of NEAppProxyProvider subclass isn't called
Hi! I am experimenting with NEAppProxyProvider (I just want to see the differences between this and NETransparentProxyProvider in action). I have subclassed it in my system extension and it seems like it reaches the startProxy point because I see the corresponding logs. I didn't forget to call the completion handler. However, I do not see logs about flow handling. Can you suggest to me why? Posting the extension source code just in case. import Foundation import NetworkExtension import OSLog class AppProxyProvider: NEAppProxyProvider { override func startProxy(options: [String : Any]? = nil, completionHandler: @escaping (Error?) -> Void) { Logger.appProxyProviderSystExt.warning("Starting NEAppProxy") setTunnelNetworkSettings(configureProxy()) { error in if let error { Logger.appProxyProviderSystExt.warning("\(#functicompletionHandler(nil)on) Unable to set settings for NEAppProxy syst ext") completionHandler(error) return } completionHandler(nil) } } override func handleNewFlow(_ flow: NEAppProxyFlow) -> Bool { Logger.appProxyProviderSystExt.warning("Handling flow") return false } override func stopProxy(with reason: NEProviderStopReason, completionHandler: @escaping () -> Void) { Logger.appProxyProviderSystExt.warning("Stopping NEAppProxy") completionHandler() } override func handleAppMessage(_ messageData: Data, completionHandler: ((Data?) -> Void)? = nil) { completionHandler?(nil) } private func configureProxy() -> NETunnelNetworkSettings { let settings = NETunnelNetworkSettings(tunnelRemoteAddress: "127.0.0.1") return settings Am I missing something in configuration?
1
0
407
Jul ’24