sing-box icon indicating copy to clipboard operation
sing-box copied to clipboard

1.12版本无法在dns.servers中正确识别"type":"predefined"。它在1.11中正常工作。

Open Greatsaltedfish opened this issue 1 year ago • 6 comments

操作系统

Linux

系统版本

archlinux 6.13.7-arch1-1

安装类型

sing-box 原始命令行程序

如果您使用图形客户端程序,请提供该程序版本。

No response

版本

sing-box-1.12.0-alpha.16-85cb6190

描述

1.12版本无法在dns.servers中正确识别"type":"predefined"。它在1.12.0-alpha.2-dc75ba35中正常工作。

重现方式

  {
        "tag": "local",
        "type":"https",
        "server": "dns.alidns.com",
        "domain_resolver":"system-dns",
        "detour": "direct"
    },
    {
        "tag":"system-dns",
        "type":"local",
        "detour":"direct"
    },
    {
        "tag": "cloudflare",
        "type":"https",
        "server": "dns.cloudflare.com",
        "domain_resolver":"system-dns",
        "detour": "proxy"
    },

    {
        "tag": "dns_success",
        "type":"predefined",
        "responses":[
            {
            "rcode":"NOERROR"
        }
    ]
    },
    {
        "tag": "dns_refused",
        "type":"predefined",
        "responses":[
            {
            "rcode":"REFUSED"
        }
    ]
    }

sudo ~/go/bin/sing-box-amd64-1.12.0-alpha.16-85cb6190 check -c ~/Downloads/hysteria2_singbox_2025-03-16-09-31-32.json FATAL[0000] decode config at /home/laowang/Downloads/hysteria2_singbox_2025-03-16-09-31-32.json: dns.servers[3]: unknown transport type: predefined

日志


支持我们

完整性要求

  • [x] 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • [x] 我保证提供了可以在本地重现该问题的服务器、客户端配置文件与流程,而不是一个脱敏的复杂客户端配置文件。
  • [x] 我保证提供了可用于重现我报告的错误的最简配置,而不是依赖远程服务器、TUN、图形界面客户端或者其他闭源软件。
  • [x] 我保证提供了完整的配置文件与日志,而不是出于对自身智力的自信而仅提供了部分认为有用的部分。

Greatsaltedfish avatar Mar 16 '25 02:03 Greatsaltedfish

The new version has a bug on the server side. The server creates multiple nodes VLESS TCP Reality and cannot connect at the same time. Whether single connection or load balancing, only the last node can communicate with the client. The server version before 1.10.7 is normal. I have already tested it, and the later version is not normal. Subsequent versions still do not fix this error.

Thanks your,bro.However, this is a client-side configuration and there is still a dns leak in this configuration. Domain requests are returned with a fake ip address, making it impossible to complete the tls handshake!

Greatsaltedfish avatar Mar 16 '25 06:03 Greatsaltedfish

1.12.0-alpha.13 Move predefined DNS server to DNS rule action

tooadstool avatar Mar 16 '25 12:03 tooadstool

1.12.0-alpha.13 Move predefined DNS server to DNS rule action1.12.0-alpha.13 版本将预定义的 DNS 服务器移动到 DNS 规则作

thanks bro,it's exciting!I want to use predefined to reply A and AAAA recode for a specific domain, how should I configure it?

Greatsaltedfish avatar Mar 16 '25 13:03 Greatsaltedfish

1.12.0-alpha.13 Move predefined DNS server to DNS rule action1.12.0-alpha.13 版本将预定义的 DNS 服务器移动到 DNS 规则作

thanks bro,it's exciting!I want to use predefined to reply A and AAAA recode for a specific domain, how should I configure it?

You should read the documentation.

tooadstool avatar Mar 16 '25 13:03 tooadstool

1.12.0-alpha.13 Move predefined DNS server to DNS rule action1.12.0-alpha.13 版本将预定义的 DNS 服务器移动到 DNS 规则作

thanks bro,it's exciting!I want to use predefined to reply A and AAAA recode for a specific domain, how should I configure it?

You should read the documentation.

I made the following adjustments to the dns rules, referring to the description on the official documentation:

{ "domain":["www.baidu.com","dns.alidns.com"], "action":"predefined", "rcode":"NOERROR", "answer":["www.baidu.com. IN A 157.148.69.151", "dns.alidns.com. IN A 223.5.5.5" ] } , but it doesn't work

Greatsaltedfish avatar Mar 16 '25 14:03 Greatsaltedfish

The new version has a bug on the server side. The server creates multiple nodes VLESS TCP Reality and cannot connect at the same time. Whether single connection or load balancing, only the last node can communicate with the client. The server version before 1.10.7 is normal. I have already tested it, and the later version is not normal. Subsequent versions still do not fix this error.

Support load balancing?

deqiying avatar May 24 '25 09:05 deqiying