Skip to content

connect-proxy example isn't working with DNS Over HTTPS #65

@NghiaTranUIT

Description

@NghiaTranUIT

Expected behavior

  • Connect-Proxy example should work with DNS Over HTTPS -> Can access the Internet as usual

Actual behavior

  • Could not connect to certain domains
2020-12-08T10:18:44+0700 error com.apple.nio-connect-proxy.ConnectHandler : remoteAddress=Optional([IPv4]127.0.0.1/127.0.0.1:51759) localAddress=Optional([IPv4]127.0.0.1/127.0.0.1:9090) channel=ObjectIdentifier(0x000000010840c7a0) Connect failed: NIOConnectionError(host: "in.appcenter.ms", port: 443, dnsAError: Optional(NIO.SocketAddressError.unknown(host: "in.appcenter.ms", port: 443)), dnsAAAAError: Optional(NIO.SocketAddressError.unknown(host: "in.appcenter.ms", port: 443)), connectionErrors: [])

2020-12-08T10:18:44+0700 error com.apple.nio-connect-proxy.ConnectHandler : channel=ObjectIdentifier(0x0000000100c0b770) remoteAddress=Optional([IPv4]127.0.0.1/127.0.0.1:51760) localAddress=Optional([IPv4]127.0.0.1/127.0.0.1:9090) Connect failed: NIOConnectionError(host: "google.com", port: 443, dnsAError: Optional(NIO.SocketAddressError.unknown(host: "google.com", port: 443)), dnsAAAAError: Optional(NIO.SocketAddressError.unknown(host: "google.com", port: 443)), connectionErrors: [])

2020-12-08T10:18:44+0700 error com.apple.nio-connect-proxy.ConnectHandler : remoteAddress=Optional([IPv4]127.0.0.1/127.0.0.1:51855) localAddress=Optional([IPv4]127.0.0.1/127.0.0.1:9090) channel=ObjectIdentifier(0x000000010800a3a0) Connect failed: connectTimeout(NIO.TimeAmount(nanoseconds: 10000000000))
  • It happens 50-50 all the time. Sometimes I could connect, but sometimes I couldn't and get a bunch of errors.
  • If I delete the DNS Profile -> 100% it's working

Steps to reproduce

  1. Download DNS Profile at https://github.com/paulmillr/encrypted-dns
  2. Install cloudflare-https.mobileconfig on Big Sur macOS
  3. Go to System Preferrrence -> Profile and install it again
  4. Verify that you can open any websites from Safari and Google Chrome as usual`
  5. Set HTTP/HTTPS Proxy from Wifi -> Advanced -> Proxies to 9090
  6. Start connect-proxy at port 9090
  7. Quit Safari or Google Chrome if it's opening. Try to access some well-known websites, such as google.com, stackoverflow.com, ...

version/commit hashes from all involved dependencies

  • The lasted commit on the main branch (09044ff)

Swift & OS version (output of swift --version && uname -a)

Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)
Target: x86_64-apple-darwin20.1.0
Darwin Nghias-MacBook-Pro.local 20.1.0 Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:11 PDT 2020; root:xnu-7195.50.7~2/RELEASE_X86_64 x86_64

Thank Swift NIO team for developing a powerful tool 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions