<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEDNSProxyManager",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NEDNSProxyManager"
  },
  "title" : "NEDNSProxyManager"
}
-->

# NEDNSProxyManager

An object to create and manage an DNS proxy provider’s configuration.

```
class NEDNSProxyManager
```

## Overview

A DNS proxy allows your app to intercept all DNS traffic generated on a device. You can use this capability to provide services like DNS traffic encryption, typically by redirecting DNS traffic to your own server. You usually do this in the context of managed devices, such as those owned by a school or an enterprise.

You create a DNS proxy as an app extension based on a custom subclass of the [`NEDNSProxyProvider`](/documentation/NetworkExtension/NEDNSProxyProvider) class. You enable and configure this proxy from within your app using the singleton proxy manager instance provided by the [`shared()`](/documentation/NetworkExtension/NEDNSProxyManager/shared()) type method of the [`NEDNSProxyManager`](/documentation/NetworkExtension/NEDNSProxyManager) class. For example, for a proxy that performs a simple redirect, you can use the proxy manager to define and dynamically configure the destination IP address of the redirected traffic.

Instances of the proxy manager are thread safe.

> Important:
> To use the ``doc://com.apple.networkextension/documentation/NetworkExtension/NEDNSProxyManager`` class, you must enable the Network Extensions capability in Xcode and select the DNS Proxy capability. See [Configure network extensions](http://help.apple.com/xcode/mac/current/#/dev0b2ef6f08).

## Topics

### Managing the DNS proxy configuration

[`shared()`](/documentation/NetworkExtension/NEDNSProxyManager/shared())

Returns a singleton DNS proxy manager instance.

[`loadFromPreferences(completionHandler:)`](/documentation/NetworkExtension/NEDNSProxyManager/loadFromPreferences(completionHandler:))

Loads the current DNS proxy configuration from the caller’s DNS proxy preferences.

[`saveToPreferences(completionHandler:)`](/documentation/NetworkExtension/NEDNSProxyManager/saveToPreferences(completionHandler:))

Saves the DNS proxy configuration in the caller’s DNS proxy preferences.

[`removeFromPreferences(completionHandler:)`](/documentation/NetworkExtension/NEDNSProxyManager/removeFromPreferences(completionHandler:))

Removes the DNS proxy configuration from the caller’s DNS proxy preferences.

### Accessing DNS proxy configuration properties

[`isEnabled`](/documentation/NetworkExtension/NEDNSProxyManager/isEnabled)

The status of a DNS proxy.

[`providerProtocol`](/documentation/NetworkExtension/NEDNSProxyManager/providerProtocol)

The provider-specific portion of the DNS proxy configuration.

[`localizedDescription`](/documentation/NetworkExtension/NEDNSProxyManager/localizedDescription)

A description of the DNS proxy.

### Notifications

  <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/NEDNSProxyConfigurationDidChange>

[`NEDNSProxyConfigurationDidChangeNotification`](/documentation/NetworkExtension/NEDNSProxyConfigurationDidChangeNotification)

A notification that is posted when the DNS proxy configuration changes.

### Notifications

[`NEDNSProxyConfigurationDidChangeNotification`](/documentation/NetworkExtension/NEDNSProxyConfigurationDidChangeNotification)

A notification that is posted when the DNS proxy configuration changes.

### Errors

[`NEDNSProxyErrorDomain`](/documentation/NetworkExtension/NEDNSProxyErrorDomain)

The DNS proxy error domain.

[`NEDNSProxyManagerError`](/documentation/NetworkExtension/NEDNSProxyManagerError)

The possible DNS proxy manager errors.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)