<!--
{
  "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(http2RelayEndpoint:tlsOptions:additionalHTTPHeaderFields:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network18ProxyConfigurationV8RelayHopV05http2D8Endpoint10tlsOptions26additionalHTTPHeaderFieldsAeA10NWEndpointO_AA13NWProtocolTLSC0I0CSDyS2SGtcfc"
  },
  "title" : "init(http2RelayEndpoint:tlsOptions:additionalHTTPHeaderFields:)"
}
-->

# init(http2RelayEndpoint:tlsOptions:additionalHTTPHeaderFields:)

Creates a configuration for a secure relay accessible only using HTTP/2.

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

## Parameters

`http2RelayEndpoint`

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

`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)