Post

Replies

Boosts

Views

Activity

Reply to DNSProxyProvider not running
Thanks for replying. No, I don't see any crash reports related to this in Console. FYI, I am running the app in debug mode, and SIP is enabled. When I run this command, systemextensionsctl list, I can see another app using the network extension ( network extension [activated enabled]). Is the another app causing this error?
Oct ’22
Reply to DNSProxyProvider not running
Update: I added OsSystemExtensionRequest. But I'm getting this error The operation couldn’t be completed. (OSSystemExtensionErrorDomain error 1.)   let log = OSLog(subsystem: "com.example.apple-samplecode.DNSTestBed", category: "app") //  let manager = NEDNSProxyManager()   var manager: NEDNSProxyManager?   private func installSystemExtension() {    os_log("DNSFProxy: installing system extension")    let request = OSSystemExtensionRequest.activationRequest(     forExtensionWithIdentifier: "bundle identifier",     queue: .main    )    request.delegate = self    OSSystemExtensionManager.shared.submitRequest(request)   }   private func configureProxy() {       os_log(.info, log: self.log, "will load configurations")     NSLog("QNEDNSProxy.Provider: controller")     NEDNSProxyManager.shared().loadFromPreferences { [weak self] error in         precondition(Thread.isMainThread)       }     os_log(.info, log: self.log, "logs indication the state of loading preferences")   }   override func viewDidLoad() {     super.viewDidLoad()     installSystemExtension() //    configureProxy()           // Do any additional setup after loading the view.   } // //  override var representedObject: Any? { //    didSet { //    // Update the view, if already loaded. //    } //  } } extension ViewController: OSSystemExtensionRequestDelegate {  func request(_ request: OSSystemExtensionRequest, actionForReplacingExtension existing: OSSystemExtensionProperties, withExtension ext: OSSystemExtensionProperties) -> OSSystemExtensionRequest.ReplacementAction {   os_log("DNSProxy: Replacing extension %@ version %@ with version %@", request.identifier, existing.bundleShortVersion, ext.bundleShortVersion)   return .replace  }     func requestNeedsUserApproval(_ request: OSSystemExtensionRequest) {   os_log("DNSProxy: Extension %@ requires user approval", request.identifier)  }     func request(_ request: OSSystemExtensionRequest, didFailWithError error: Error) {   os_log("DNSProxy: System extension request failed: %@", error.localizedDescription)  }     /* Other delegate methods here */  func request(_ request: OSSystemExtensionRequest, didFinishWithResult result: OSSystemExtensionRequest.Result) {   switch result {   case .completed:    manager = NEDNSProxyManager.shared()   case .willCompleteAfterReboot:     os_log("DNSProxy: willCompleteAfterReboot")   @unknown default:    os_log("DNSProxy: default")   }  } }
Oct ’22
Reply to Running two apps with network extension at the same time
I want to set the nameserver of a specific domain to a custom value. I want to write a reply to the DNS request for a specific domain. Can I do that in DNSProxyProvider? Please share the sample code If available.
Replies
Boosts
Views
Activity
Oct ’22
Reply to DNSProxyProvider not running
What does this error code mean  The operation couldn’t be completed. (OSSystemExtensionErrorDomain error 1.)?
Replies
Boosts
Views
Activity
Oct ’22
Reply to DNSProxyProvider not running
Thanks for replying. No, I don't see any crash reports related to this in Console. FYI, I am running the app in debug mode, and SIP is enabled. When I run this command, systemextensionsctl list, I can see another app using the network extension ( network extension [activated enabled]). Is the another app causing this error?
Replies
Boosts
Views
Activity
Oct ’22
Reply to Running two apps with network extension at the same time
Is there any system extension that can be configured to resolve DNS for specific domains in macOS? (similar to defining resolver in /etc/resolver/)
Replies
Boosts
Views
Activity
Oct ’22
Reply to DNSProxyProvider not running
The other app which activated network extension uses only content filtering.
Replies
Boosts
Views
Activity
Oct ’22
Reply to Getting error OSSystemExtensionErrorDomain error 1 (OSSystemExtensionErrorUnknown)
Hi, I am getting the same error when I try to activate the network system extension. Is this issue solved?
Replies
Boosts
Views
Activity
Oct ’22
Reply to DNSProxyProvider not running
Update: I added OsSystemExtensionRequest. But I'm getting this error The operation couldn’t be completed. (OSSystemExtensionErrorDomain error 1.)   let log = OSLog(subsystem: "com.example.apple-samplecode.DNSTestBed", category: "app") //  let manager = NEDNSProxyManager()   var manager: NEDNSProxyManager?   private func installSystemExtension() {    os_log("DNSFProxy: installing system extension")    let request = OSSystemExtensionRequest.activationRequest(     forExtensionWithIdentifier: "bundle identifier",     queue: .main    )    request.delegate = self    OSSystemExtensionManager.shared.submitRequest(request)   }   private func configureProxy() {       os_log(.info, log: self.log, "will load configurations")     NSLog("QNEDNSProxy.Provider: controller")     NEDNSProxyManager.shared().loadFromPreferences { [weak self] error in         precondition(Thread.isMainThread)       }     os_log(.info, log: self.log, "logs indication the state of loading preferences")   }   override func viewDidLoad() {     super.viewDidLoad()     installSystemExtension() //    configureProxy()           // Do any additional setup after loading the view.   } // //  override var representedObject: Any? { //    didSet { //    // Update the view, if already loaded. //    } //  } } extension ViewController: OSSystemExtensionRequestDelegate {  func request(_ request: OSSystemExtensionRequest, actionForReplacingExtension existing: OSSystemExtensionProperties, withExtension ext: OSSystemExtensionProperties) -> OSSystemExtensionRequest.ReplacementAction {   os_log("DNSProxy: Replacing extension %@ version %@ with version %@", request.identifier, existing.bundleShortVersion, ext.bundleShortVersion)   return .replace  }     func requestNeedsUserApproval(_ request: OSSystemExtensionRequest) {   os_log("DNSProxy: Extension %@ requires user approval", request.identifier)  }     func request(_ request: OSSystemExtensionRequest, didFailWithError error: Error) {   os_log("DNSProxy: System extension request failed: %@", error.localizedDescription)  }     /* Other delegate methods here */  func request(_ request: OSSystemExtensionRequest, didFinishWithResult result: OSSystemExtensionRequest.Result) {   switch result {   case .completed:    manager = NEDNSProxyManager.shared()   case .willCompleteAfterReboot:     os_log("DNSProxy: willCompleteAfterReboot")   @unknown default:    os_log("DNSProxy: default")   }  } }
Replies
Boosts
Views
Activity
Oct ’22
Reply to Running two apps with network extension at the same time
Thank you for replying. What happens when one app is a VPN app? Also, is it possible to do DNS resolution using the DNSProxyprovider system extension? If not, Is there a way to do DNS resolution using the network extension? My aim is to resolve all the domains with *example.com to a specific DNS server.
Replies
Boosts
Views
Activity
Oct ’22