Skip to content

[improvement] Implement "IPv6 Unavaliable" Error Code #4

@shanoaice

Description

@shanoaice

This is an issue attempting to solve a real-world issue that I have encountered lately. The problem is described as follows:

  1. To enable the ECH feature of browsers, one have to enable the built-in browser DoH resolver. But this will cause proxy clients to unable to sniff and hijack DNS requests as usual.
  2. If TUN inbound is enabled and an IPv6 address is add to the TUN interface, even if the remote proxy server does not support IPv6, the browser will still attempt to send request to the resolved IPv6 address and will fail.
  3. Under existing protocols, there is no way for the server to tell its clients that either it does not support IPv6 or an IPv6 request fails, thus browser's Happy Eyeball fallback cannot be triggered (by proxy client returning an ICMP unreadable response on TUN), causing connection failure.

To address this issue, I propose that an error code representing "IPv6 connection failure" to be added, so that proxy clients can properly trigger Happy Eyeballs when TUN inbound is used.

edit: context: SagerNet/sing-box#932 (comment)

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