<!--
{
  "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/nw_privacy_context_add_proxy(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "c:@F@nw_privacy_context_add_proxy"
  },
  "title" : "nw_privacy_context_add_proxy(_:_:)"
}
-->

# nw_privacy_context_add_proxy(_:_:)

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

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

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

---

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)