Open NghiaTranUIT opened 3 years ago
Thanks @NghiaTranUIT!
This is a surprising behaviour to me, I definitely don't know the macOS DNS configuration well enough to understand this issue. I'll consult with some colleagues and get back to you.
Ok, I haven't yet reproduced this today. I'll do some more investigation tomorrow. Please also do file Feedback Assistant reports and note their numbers here.
Out of curiosity @NghiaTranUIT, when you run this are you seeing DNS lookups to Cloudflare domains?
Yes, I can see they call CONNECT cloudflare-dns.com:443 HTTP/1.1
-12-09T18:59:58+0700 info com.apple.nio-connect-proxy.ConnectHandler : localAddress=Optional([IPv4]127.0.0.1/127.0.0.1:9090) channel=ObjectIdentifier(0x0000000108b04230) remoteAddress=Optional([IPv4]127.0.0.1/127.0.0.1:57790) CONNECT cloudflare-dns.com:443 HTTP/1.1
2020-12-09T18:59:58+0700 info com.apple.nio-connect-proxy.ConnectHandler : localAddress=Optional([IPv4]127.0.0.1/127.0.0.1:9090) channel=ObjectIdentifier(0x0000000108b04230) remoteAddress=Optional([IPv4]127.0.0.1/127.0.0.1:57790) Connecting to cloudflare-dns.com:443
2020-12-09T18:59:59+0700 info com.apple.nio-connect-proxy.ConnectHandler : remoteAddress=Optional([IPv4]127.0.0.1/127.0.0.1:57791) channel=ObjectIdentifier(0x0000000100e07210) localAddress=Optional([IPv4]127.0.0.1/127.0.0.1:9090) CONNECT p63-caldav.icloud.com:443 HTTP/1.1
2020-12-09T18:59:59+0700 info com.apple.nio-connect-proxy.ConnectHandler : remoteAddress=Optional([IPv4]127.0.0.1/127.0.0.1:57791) channel=ObjectIdentifier(0x0000000100e07210) localAddress=Optional([IPv4]127.0.0.1/127.0.0.1:9090) Connecting to p63-caldav.icloud.com:443
2020-12-09T19:00:00+0700 info com.apple.nio-connect-proxy.ConnectHandler : remoteAddress=Optional([IPv4]127.0.0.1/127.0.0.1:57792) localAddress=Optional([IPv4]127.0.0.1/127.0.0.1:9090) channel=ObjectIdentifier(0x0000000108b06000) CONNECT cloudflare-dns.com:443 HTTP/1.1
2020-12-09T19:00:00+0700 info com.apple.nio-connect-proxy.ConnectHandler : remoteAddress=Optional([IPv4]127.0.0.1/127.0.0.1:57792) localAddress=Optional([IPv4]127.0.0.1/127.0.0.1:9090) channel=ObjectIdentifier(0x0000000108b06000) Connecting to cloudflare-dns.com:443
After a while, I'm still received a bunch of Timeout Error like the first comment. Stop and Start the project again, I'm able to visit those websites as usual. Like 50% reproducible rate.
Full log: log.txt
Are you seeing those actually work? That is, do those DNS lookups ever succeed?
I just noticed that the CloudFlare profile is unsiged. Not sure if it's related 🤔
Here is the success log: You can see the app call cloudflare-dns.com
and there is no error log. I'm able to access google.com and another website as usual.
If I start/stop the project, 50% works, 50% doesn't work for some reason 🤔
I think we have a recursive DNS issue. I think if the DNS lookup for Cloudflare-dns is cached then we don't have an issue, but if we try to do a new lookup we get stuck.
@NghiaTranUIT Can I ask you to try adding cloudflare-dns.com
to the excluded hosts list for the HTTPS proxying to see if that resolves the issue?
I added cloudflare-dns.com
and www.google.com
to the exclusive list, but for some reason, I still can see cloudflare-dns.com
from the console log, but not www.google.com
Result:
https://news.ycombinator.com
(see the error log)Log: log.txt
That’s really useful information @NghiaTranUIT, thanks!
Expected behavior
Actual behavior
Steps to reproduce
cloudflare-https.mobileconfig
on Big Sur macOSconnect-proxy
at port 9090version/commit hashes from all involved dependencies
Swift & OS version (output of
swift --version && uname -a
)Thank Swift NIO team for developing a powerful tool 👍