Class

NEDNSProxyManager

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

Declaration

@interface NEDNSProxyManager : NSObject

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 class. You enable and configure this proxy from within your app using the singleton proxy manager instance provided by the sharedManager type method of the 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.

Topics

Managing the DNS Proxy Configuration

+ sharedManager

Returns a singleton DNS proxy manager instance.

- loadFromPreferencesWithCompletionHandler:

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

- saveToPreferencesWithCompletionHandler:

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

- removeFromPreferencesWithCompletionHandler:

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

Accessing DNS Proxy Configuration Properties

enabled

The status of a DNS proxy.

providerProtocol

The provider-specific portion of the DNS proxy configuration.

localizedDescription

A description of the DNS proxy.

Notifications

NEDNSProxyConfigurationDidChangeNotification

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

Errors

NEDNSProxyErrorDomain

The DNS proxy error domain.

NEDNSProxyManagerError

The possible DNS proxy manager errors.

Relationships

Inherits From

See Also

Configuration

NEDNSProxyProviderProtocol

Configuration parameters for a DNS proxy.