[networkextesion] dnsproxy

hello

I am testing the use of network extension. When we use dnsproxy to proxy DNS requests, we will send you a message that the udp pcbcount of your system continues to increase. For example

for ((i=1; i<=99999; i++));do echo "Attempt $i:" dig google.com done

when the dig command is used continuously, the dig command will show the following errors when pcbcount reaches a certain number.

isc_socket_bind: address not available

Can you help us determine what the problem might be? thank you

Are you sure you’re passing the right endpoint info through to the open(withLocalEndpoint:completionHandler:) method?

Note On macOS 15 and later this in deprecated in favour of open(withLocalFlowEndpoint:completionHandler:), which uses Network framework types, but the effect is the same.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

thanks for your reply when we proces udp flow,we passed (NWHostEndpoint * )udp_flow.localEndpoint to flow open api。is that right?

we also test passed the endpoint like :

NWHostEndpoint* endpoint =

          [NWHostEndpoint endpointWithHostname:@"0.0.0.0" port:@"0"];

and passed nil to open api. also cause net.inet.udp.pcbcount increased

is that right?

It depends on how you’re proxying the flow. How does your DNS proxy actually resolve requests?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

after open the flow we create a bsd socket to proxy the flow request.

[networkextesion] dnsproxy
 
 
Q