Is NEDNSProxyProvider supported on macOS?
According to this page
And in the network preferences there is a DNS proxy service added but not running, it shows a message on the panel says
According to this page
But on this page it saysAvailability
iOS 11.0+
macOS 10.15+
Mac Catalyst 13.0+
I tested a DNS proxy application on the mac which runs well on iOS devices(I made some project settings change such as profiles, platform settings) and got following error in the console logsDNS proxy providers are only supported on supervised iOS devices.
Code Block Looking for an extension with identifier com.blob.macappproxy.dns and extension point com.apple.networkextension.dns-proxy Failed to find an app extension with identifier com.blob.macappproxy.dns and extension point com.apple.networkextension.dns-proxy: (null)
And in the network preferences there is a DNS proxy service added but not running, it shows a message on the panel says
Can someone tell me what's the cause of this error and how can I fix it? Thanks a lot!Please use "macappproxy" to control this DNS proxy configuration.
@sadcat
Regarding your code sample, it looks like you are using NEFilterManager and NEDNSProxyProviderProtocol together.
I posted a code snippet of setting up and starting a NEDNSProxyProvider from a container app below. Note that most of the code here is elided except for the core piece:
Hope this helps.
Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
First enable SIP. This will always hide problems that are lurking in your configuration.FYI I have SIP disabled.
Regarding your code sample, it looks like you are using NEFilterManager and NEDNSProxyProviderProtocol together.
I posted a code snippet of setting up and starting a NEDNSProxyProvider from a container app below. Note that most of the code here is elided except for the core piece:
Code Block swift class ViewController: NSViewController { var manager: NEDNSProxyManager? private func installSystemExtension() { let request = OSSystemExtensionRequest.activationRequest( forExtensionWithIdentifier: "bundle.id.to.your.NEDNSProxyProvider", queue: .main ) request.delegate = self OSSystemExtensionManager.shared.submitRequest(request) } private func configureProxy() { guard let dnsManager = manager else { return } dnsManager.loadFromPreferences { error in precondition(Thread.isMainThread) if let nsError = error as NSError? { /* Handle error */ return } let proto = NEDNSProxyProviderProtocol() proto.serverAddress = "localhost" /* Just for testing purposes */ proto.providerBundleIdentifier = "bundle.id.to.your.NEDNSProxyProvider" dnsManager.providerProtocol = proto dnsManager.isEnabled = true dnsManager.localizedDescription = "Testing DNS Proxy" dnsManager.saveToPreferences { saveError in if let nsError = saveError as NSError? { /* Handle error */ return } /* Handle Success Case */ } } } } extension ViewController: OSSystemExtensionRequestDelegate { /* Other delegate methods here */ func request(_ request: OSSystemExtensionRequest, didFinishWithResult result: OSSystemExtensionRequest.Result) { switch result { case .completed: manager = NEDNSProxyManager.shared() case .willCompleteAfterReboot: /* Proceed with result here */ @unknown default: /* Proceed with result here */ } } }
Hope this helps.
Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com