2 ms·
Good points, all - there is a lot of subtlety here. CFHostStartInfoResolution is deprecated, no? https://developer.apple.com/documentation/cfnetwork/cfhoststar
by dweekly 10mo ago
Good points, all - there is a lot of subtlety here.
CFHostStartInfoResolution is deprecated, no? https://developer.apple.com/documentation/cfnetwork/cfhoststartinforesolution(_:_:_ https://developer.apple.com/documentation/cfnetwork/cfhostst...:)
That leaves us with DNSServiceGetAddrInfo? https://developer.apple.com/documentation/dnssd/dnsservicegetaddrinfo(_:_:_:_:_:_:_ https://developer.apple.com/documentation/dnssd/dnsservicege...:) or some kinda convoluted use of Network and NWEndpoint/NWconnection with continuations could do the same?
- frumplestlatz 10mo agoOh yes, good catch. Yeah, you want to use `NWConnection` (or one of the other higher-level supported networking APIs), which raises another issue with doing custom DNS resolution. You need those API's connect-by-name semantics to get VPN-on-Demand: https://developer.apple.com/documentation/technotes/tn3151-choosing-the-right-networking-api#Connect-by-name https://developer.apple.com/documentation/technotes/tn3151-c...