Class

NENetworkRule

A rule to match attributes of network traffic.

Declaration

class NENetworkRule : NSObject

Topics

Creating a Network Rule

init(destinationNetwork: NWHostEndpoint, prefix: Int, protocol: NENetworkRule.`Protocol`)

Creates a rule that matches network traffic destined for a host within a specific network.

init(destinationHost: NWHostEndpoint, protocol: NENetworkRule.`Protocol`)

Creates a rule that matches network traffic destined for a host within a specific DNS domain.

Matching Network Traffic Characteristics

var matchRemoteEndpoint: NWHostEndpoint?

The remote endpoint that the rule matches.

var matchRemotePrefix: Int

A number that specifies the remote sub-network that the rule matches.

var matchLocalNetwork: NWHostEndpoint?

The local network that the rule matches.

var matchLocalPrefix: Int

A number that specifies the local sub-network that the rule matches.

var matchProtocol: NENetworkRule.`Protocol`

The protocol that the rule matches.

enum NENetworkRule.Protocol

A type to represent network protocols used by routing rules.

var matchDirection: NETrafficDirection

The direction of network traffic that the rule matches.

enum NETrafficDirection

A type to represent the direction of network traffic.

Relationships

Inherits From

See Also

Transparent Proxy Configuration

class NETransparentProxyManager

An object that configures and controls transparent proxies.

class NETransparentProxyNetworkSettings

A specification of what traffic to route through a transparent proxy.