Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS lookup failed when enabled both Early data in websocket transport and multiplexing #1755

Closed
4 of 5 tasks
socketcat opened this issue May 10, 2024 · 0 comments
Closed
4 of 5 tasks
Labels
from end user An end user is asking a developer to fix their problem for free no locally reproducible process provided No basic respect for the open source community not following template Necessary information is not provided or is incomplete

Comments

@socketcat
Copy link

Operating system

macOS

System version

14.4.1

Installation type

Original sing-box Command Line

If you are using a graphical client, please provide the version of the client.

No response

Version

sing-box version 1.9.0-rc.16

Environment: go1.22.2 darwin/arm64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api
Revision: 619aad076c730b90621b6008640fe4983a0cf0e6
CGO: disabled

Description

When using V2Ray's websocket transport, enabling both Early Data and multiplexing (with smux or yamux protocol) will cause outbound name resolution to fail.
h2mux is unaffected.

Reproduction

Using the config below and start sing-box client.
Client config:

{
  "log": {
    "level": "trace"
  },
  "dns": {
    "servers": [
      {
        "tag": "alidns",
        "address": "223.5.5.5",
        "detour": "direct"
      }
    ]
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "listen_port": 2080,
      "tag": "mixed-in",
      "type": "mixed"
    }
  ],
  "outbounds": [
    {
      "server": "www.example.com",
      "server_port": 443,
      "tag": "www.example.com",
      "tls": {
        "enabled": true,
        "server_name": "www.example.com"
      },
      "transport": {
        "early_data_header_name": "Sec-WebSocket-Protocol",
        "headers": {
          "Host": "www.example.com"
        },
        "max_early_data": 2560,
        "path": "/",
        "type": "ws"
      },
      "type": "vless",
      "uuid": "31c72d79-18fb-495d-8e85-f2b51c7f84e4",
      "multiplex": {
        "enabled": true,
        "protocol": "smux",
        "max_connections": 4,
        "min_streams": 4,
        "padding": true
      }
    },
    {
      "type": "direct",
      "tag": "direct"
    },
    {
      "type": "dns",
      "tag": "dns-out"
    }
  ],
  "route": {
    "auto_detect_interface": true,
    "rules": [
      {
        "type": "logical",
        "mode": "or",
        "rules": [
          {
            "protocol": "dns"
          },
          {
            "port": 53
          }
        ],
        "outbound": "dns-out"
      }
    ]
  }
}

Logs

DEBUG[0001] [1864092512 9ms] dns: lookup domain www.example.com
INFO[0001] outbound/direct[direct]: outbound packet connection to 223.5.5.5:53
INFO[0001] outbound/direct[direct]: outbound packet connection to 223.5.5.5:53
DEBUG[0001] [1864092512 10ms] dns: lookup failed for www.example.com: exchange6: context canceled | exchange4: context canceled | upstream: context canceled

Supporter

Integrity requirements

  • I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
  • I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
  • I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
  • I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.
@nekohasekai nekohasekai added not following template Necessary information is not provided or is incomplete from end user An end user is asking a developer to fix their problem for free no locally reproducible process provided No basic respect for the open source community labels May 16, 2024
@nekohasekai nekohasekai closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from end user An end user is asking a developer to fix their problem for free no locally reproducible process provided No basic respect for the open source community not following template Necessary information is not provided or is incomplete
Projects
None yet
Development

No branches or pull requests

2 participants