<!--
{
  "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 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/ProxyConfiguration/RelayHop/init(http3RelayEndpoint:http2RelayEndpoint:tlsOptions:additionalHTTPHeaderFields:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network18ProxyConfigurationV8RelayHopV05http3D8Endpoint05http2dG010tlsOptions26additionalHTTPHeaderFieldsAeA10NWEndpointO_AKSgAA13NWProtocolTLSC0J0CSDyS2SGtcfc"
  },
  "title" : "init(http3RelayEndpoint:http2RelayEndpoint:tlsOptions:additionalHTTPHeaderFields:)"
}
-->

# init(http3RelayEndpoint:http2RelayEndpoint:tlsOptions:additionalHTTPHeaderFields:)

Creates a configuration for a secure relay accessible using HTTP/3, with an optional HTTP/2 fallback.

```
init(http3RelayEndpoint: NWEndpoint, http2RelayEndpoint: NWEndpoint? = nil, tlsOptions: NWProtocolTLS.Options = .init(), additionalHTTPHeaderFields: [String : String] = [:])
```

## Parameters

`http3RelayEndpoint`

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

`http2RelayEndpoint`

An optional URL or host endpoint identifying the relay server accessible using HTTP/2. This can be the same endpoint as `http3RelayEndpoint`.

`tlsOptions`

The TLS options to use for the TLS handshake to the relay.

`additionalHTTPHeaderFields`

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

---

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)