<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEDNSProxyProvider/handleNewFlow(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NEDNSProxyProvider(im)handleNewFlow:"
  },
  "title" : "handleNewFlow(_:)"
}
-->

# handleNewFlow(_:)

Handles a new flow of DNS traffic.

```
func handleNewFlow(_ flow: NEAppProxyFlow) -> Bool
```

## Parameters

`flow`

The flow representing the DNS traffic that the proxy should handle.

## Return Value

A Boolean value set to <doc://com.apple.documentation/documentation/Swift/true> if the proxy implementation decides to handle the flow, or <doc://com.apple.documentation/documentation/Swift/false> if it instead decides to terminate the flow.

## Discussion

The system calls this method to deliver a new network data flow to the proxy provider implementation. Subclasses must override this method to perform whatever steps are necessary to ready the proxy to receive data from the flow.

The proxy provider indicates that the proxy is ready to handle flow data by calling the flow’s [`open(withLocalEndpoint:completionHandler:)`](/documentation/NetworkExtension/NEAppProxyFlow/open(withLocalEndpoint:completionHandler:)) method.

If the proxy implementation decides to handle the flow, it’s responsible for retaining a reference to the flow instance.

---

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)