Post

Replies

Boosts

Views

Activity

Reply to Network Extension performance issue
@Matt is there any way we can make specific process as trusted process with "NENetworkRule" for Network extension with its name or PID rather than network traffic characteristics which varies ?. so that network extension / content filters always allows the traffic. I don't find this here https://developer.apple.com/documentation/networkextension/nenetworkrule
Nov ’20
Reply to Network Extension performance issue
@Matt , We can check PID in handleNewFlow and allow the traffic as it is trusted process , but we would like to avoid that and stop filtering the traffic of a trusted process before handleNewflow with NEFilterRule as below . is it possible ?. and other thing is NE content filter is not able to handle the plenty traffic . I see it is limitation or bug in NE content filter . Let me know any README on how many network operations network extension content filter can handle ??. class FilterDataProvider: NEFilterDataProvider {   override func startFilter(completionHandler: @escaping (Error?) -> Void) {     DGNetopsFilterCommsInit()     //For all traffic     let filterRules = ["0.0.0.0", "::"].map { address -> NEFilterRule in       let bothNetworkRule = NENetworkRule(remoteNetwork: nil,                          remotePrefix: 0,                          localNetwork: nil,                          localPrefix: 0,                          protocol: .any,                          direction: .any )       return NEFilterRule(networkRule: bothNetworkRule, action: .filterData)     }     // Allow all flows that do not match the filter rules by default action as allow.     let filterSettings = NEFilterSettings(rules: filterRules, defaultAction: .allow)     apply(filterSettings) { error in        if let applyError = error {          os_log("Failed to apply filter settings: %@", applyError.localizedDescription)        }        completionHandler(error)     }   }
Nov ’20