Instance Method


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


func saveToPreferences(completionHandler: @escaping (Error?) -> Void)



A block called when the save operation completes. If the operation fails, an error instance passed to this block describes the problem. Otherwise, the error is nil. See NEDNSProxyManagerError for the list of possible errors.


If you alter the DNS proxy configuration that you load into the proxy manager's properties using a call to the loadFromPreferences(completionHandler:) method, you must then call the saveToPreferences(completionHandler:) method to make the changes take effect. Saving also stores the modified configuration for the next time the proxy is started or the configuration loaded.

Trying to save preferences before loading them produces an error.

If the DNS proxy is enabled, it becomes active as a result of this call.

See Also

Managing the DNS Proxy Configuration

class func shared() -> NEDNSProxyManager

Returns a singleton DNS proxy manager instance.

func loadFromPreferences(completionHandler: (Error?) -> Void)

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

func removeFromPreferences(completionHandler: (Error?) -> Void)

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