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

# nw_privacy_context_add_proxy(_:_:)

Applies a proxy configuration to all connections associated with this context.

## Declaration

```swift
func nw_privacy_context_add_proxy(_ privacy_context: nw_privacy_context_t, _ proxy_config: nw_proxy_config_t)
```

## Parameters

- `privacy_context`: A privacy context to modify. This can include the default privacy context.
- `proxy_config`: A proxy configuration object to apply to all connections that use this context.

## Discussion

Discussion If set on NW_DEFAULT_PRIVACY_CONTEXT, this proxy will additionally apply to other networking APIs used by the calling process.

## See Also

### Configuring Proxies

- [nw_privacy_context_clear_proxies(_:)](network/nw_privacy_context_clear_proxies(_:).md)
- [nw_proxy_config_t](network/nw_proxy_config_t.md)
