---
title: "nw_proxy_config_create_relay(_:_:)"
framework: network
role: symbol
role_heading: Function
path: "network/nw_proxy_config_create_relay(_:_:)"
---

# nw_proxy_config_create_relay(_:_:)

Initializes a proxy configuration with one or two relay hops.

## Declaration

```swift
func nw_proxy_config_create_relay(_ first_hop: nw_relay_hop_t, _ second_hop: nw_relay_hop_t?) -> nw_proxy_config_t
```

## Parameters

- `first_hop`: A relay hop, which is either the first of two hops, or the only hop.
- `second_hop`: An optional second relay hop.

## Return Value

Return Value An initialized proxy configuration object.

## See Also

### Creating Proxy Configurations

- [nw_relay_hop_t](network/nw_relay_hop_t.md)
- [nw_proxy_config_create_oblivious_http(_:_:_:_:)](network/nw_proxy_config_create_oblivious_http(_:_:_:_:).md)
- [nw_proxy_config_create_http_connect(_:_:)](network/nw_proxy_config_create_http_connect(_:_:).md)
- [nw_proxy_config_create_socksv5(_:)](network/nw_proxy_config_create_socksv5(_:).md)
