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

# NERelay

A single relay server configuration that you can chain together with other relays.

```
class NERelay
```

## Overview

Relay servers are secure HTTP proxies that allow proxying TCP traffic using the `CONNECT` method and UDP traffic using the `connect-udp` protocol defined in [RFC 9298](https://www.rfc-editor.org/rfc/rfc9298.html).

## Topics

### Configuring server properties

[`HTTP3RelayURL`](/documentation/NetworkExtension/NERelay/http3RelayURL)

A URL identifying the relay server accessible using HTTP/3.

[`HTTP2RelayURL`](/documentation/NetworkExtension/NERelay/http2RelayURL)

A URL identifying the relay server accessible using HTTP/2.

[`dnsOverHTTPSURL`](/documentation/NetworkExtension/NERelay/dnsOverHTTPSURL)

The URL of a DNS-over-HTTPS (DoH) resolver accessible from the relay.

[`rawPublicKeys`](/documentation/NetworkExtension/NERelay/rawPublicKeys)

An array of TLS raw public keys that the relay server can present during the TLS handshake.

### Configuring client properties

[`additionalHTTPHeaderFields`](/documentation/NetworkExtension/NERelay/additionalHTTPHeaderFields)

A dictionary of additional HTTP headers to send as part of `CONNECT` requests to the relay.

[`identityData`](/documentation/NetworkExtension/NERelay/identityData)

The PKCS12 data for the relay client authentication.

[`identityDataPassword`](/documentation/NetworkExtension/NERelay/identityDataPassword)

The password the relay uses to decrypt the PKCS12 identity data.

[`syntheticDNSAnswerIPv4Prefix`](/documentation/NetworkExtension/NERelay/syntheticDNSAnswerIPv4Prefix)

An IPv4 address prefix the relay uses to handle address info requests.

[`syntheticDNSAnswerIPv6Prefix`](/documentation/NetworkExtension/NERelay/syntheticDNSAnswerIPv6Prefix)

An IPv6 address prefix the relay uses to handle address info requests.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)