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

route rule "ip_version": 6 no match #2443

Closed
4 of 5 tasks
tozy1203 opened this issue Jan 6, 2025 · 1 comment
Closed
4 of 5 tasks

route rule "ip_version": 6 no match #2443

tozy1203 opened this issue Jan 6, 2025 · 1 comment

Comments

@tozy1203
Copy link

tozy1203 commented Jan 6, 2025

Operating system

Windows

System version

10

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.exe version
sing-box version 1.11.0-beta.18

Environment: go1.23.4 windows/amd64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api
Revision: bb1ec4698d6dea38bc4fcef39d740910bc5380b3
CGO: disabled

Description

when set up

 {
                "ip_version": 6,
                "outbound": "direct"
            },

there is no match after dns resolved.
stream goes to the FINAL outbound.

Reproduction

{
    "log": {
        "disabled": false,
        "level": "trace"
    },
    "dns": {
        "servers": [
            {
                "tag": "dns-local",
                "address": "192.168.1.9",
                "detour": "direct"
            },
            {
                "address": "https://8.8.8.8/dns-query",
                "address_resolver": "dns-local",
                "strategy": "ipv4_only",
                "client_subnet": "114.114.114.114",
                "tag": "dns-remote",
                "detour": "proxy"
            },
            {
                "tag": "dns-block",
                "address": "rcode://name_error"
            },
            {
                "tag": "dns-fake",
                "address": "fakeip"
            }
        ],
        "rules": [
            {
                "rule_set": "geosite-geolocation-!cn",
                "server": "dns-fake"
            }
        ],
        "fakeip": {
            "enabled": true,
            "inet4_range": "198.18.0.0/15",
            "inet6_range": "fc00::/18"
        },
        "strategy": "ipv4_only",
        "final": "dns-local"
    },
    "inbounds": [
        {
            "type": "mixed",
            "tag": "mixed-in",
            "listen": "127.0.0.1",
            "listen_port": 10086,
            "tcp_fast_open": true
        }
    ],
    "outbounds": [
        {
            "type": "socks",
            "tag": "proxy",
            "server": "192.168.1.9",
            "server_port": 10086,
            "detour": "direct"
        },
        {
            "type": "direct",
            "tag": "direct"
        },
        {
            "type": "block",
            "tag": "block"
        },
        {
            "type": "dns",
            "tag": "dns-out"
        }
    ],
    "route": {
        "rules": [
            {
                "action": "sniff"
            },
            {
                "protocol": "quic",
                "action": "reject"
            },
            {
                "protocol": "dns",
                "action": "hijack-dns"
            },
            {
                "rule_set": "geosite-geolocation-!cn",
                "outbound": "proxy"
            },
            {
                "action": "resolve",
                "strategy": "prefer_ipv4",
                "server": "dns-local"
            },
            {
                "ip_version": 6,
                "outbound": "direct"
            },
            {
                "ip_cidr": [
                    "173.245.48.0/20",
                    "103.21.244.0/22",
                    "103.22.200.0/22",
                    "103.31.4.0/22",
                    "141.101.64.0/18",
                    "108.162.192.0/18",
                    "190.93.240.0/20",
                    "188.114.96.0/20",
                    "197.234.240.0/22",
                    "198.41.128.0/17",
                    "162.158.0.0/15",
                    "104.16.0.0/13",
                    "104.24.0.0/14",
                    "172.64.0.0/13",
                    "131.0.72.0/22"
                ],
                "outbound": "direct"
            },
            {
                "rule_set": "geoip-cn",
                "outbound": "direct"
            }
        ],
        "rule_set": [
            {
                "tag": "geoip-cn",
                "type": "remote",
                "format": "binary",
                "url": "https://ghproxy.cn/https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
                "download_detour": "direct"
            },
            {
                "tag": "geosite-geolocation-!cn",
                "type": "remote",
                "format": "binary",
                "url": "https://ghproxy.cn/https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs",
                "download_detour": "direct"
            }
        ],
        "final": "proxy",
        "auto_detect_interface": true
    }
}

Logs

�[36mINFO�[0m[0006] [�[38;5;131m2020194931�[0m 0ms] inbound/mixed[mixed-in]: inbound connection from 127.0.0.1:52054
�[36mINFO�[0m[0006] [�[38;5;131m2020194931�[0m 0ms] inbound/mixed[mixed-in]: inbound connection to 6.ipw.cn:443
�[37mDEBUG�[0m[0006] [�[38;5;131m2020194931�[0m 0ms] router: match[0] => sniff
�[37mDEBUG�[0m[0006] [�[38;5;131m2020194931�[0m 1ms] router: sniffed protocol: tls, domain: 6.ipw.cn
�[37mDEBUG�[0m[0006] [�[38;5;131m2020194931�[0m 1ms] router: match[4] => resolve(prefer_ipv4,dns-local)
�[37mDEBUG�[0m[0006] [�[38;5;131m2020194931�[0m 1ms] dns: lookup domain 6.ipw.cn
�[37mDEBUG�[0m[0006] [�[38;5;131m2020194931�[0m 2ms] dns: exchanged 6.ipw.cn NOERROR 472
�[36mINFO�[0m[0006] [�[38;5;131m2020194931�[0m 2ms] dns: exchanged 6.ipw.cn AAAA 6.ipw.cn. 472 IN AAAA 2400:8905::f03c:94ff:fe1c:a95e
�[37mDEBUG�[0m[0006] [�[38;5;131m2020194931�[0m 2ms] dns: exchanged 6.ipw.cn NOERROR 472
�[36mINFO�[0m[0006] [�[38;5;131m2020194931�[0m 2ms] dns: exchanged 6.ipw.cn SOA 6.ipw.cn. 472 IN SOA ns3.dnsv2.com. level3dnsadmin.dnspod.com. 1714832016 3600 180 1209600 180
�[36mINFO�[0m[0006] [�[38;5;131m2020194931�[0m 2ms] dns: lookup succeed for 6.ipw.cn: 2400:8905::f03c:94ff:fe1c:a95e
�[37mDEBUG�[0m[0006] [�[38;5;131m2020194931�[0m 2ms] dns: resolved [2400:8905::f03c:94ff:fe1c:a95e]
�[36mINFO�[0m[0006] [�[38;5;131m2020194931�[0m 2ms] outbound/socks[proxy]: outbound connection to [2400:8905::f03c:94ff:fe1c:a95e]:443
�[36mINFO�[0m[0006] [�[38;5;131m2020194931�[0m 2ms] outbound/direct[direct]: outbound connection to 192.168.1.9:10086
�[37mDEBUG�[0m[0006] [�[38;5;131m2020194931�[0m 298ms] connection: connection download finished
�[37mDEBUG�[0m[0006] [�[38;5;131m2020194931�[0m 298ms] connection: connection upload finished
�[36mINFO�[0m[0006] [�[38;5;203m1165396411�[0m 0ms] inbound/mixed[mixed-in]: inbound connection from 127.0.0.1:52056
�[36mINFO�[0m[0006] [�[38;5;203m1165396411�[0m 0ms] inbound/mixed[mixed-in]: inbound connection to 6.ipw.cn:443
�[37mDEBUG�[0m[0006] [�[38;5;203m1165396411�[0m 0ms] router: match[0] => sniff
�[37mDEBUG�[0m[0006] [�[38;5;203m1165396411�[0m 1ms] router: sniffed protocol: tls, domain: 6.ipw.cn
�[37mDEBUG�[0m[0006] [�[38;5;203m1165396411�[0m 1ms] router: match[4] => resolve(prefer_ipv4,dns-local)
�[37mDEBUG�[0m[0006] [�[38;5;203m1165396411�[0m 4ms] dns: resolved [2400:8905::f03c:94ff:fe1c:a95e]
�[36mINFO�[0m[0006] [�[38;5;203m1165396411�[0m 4ms] outbound/socks[proxy]: outbound connection to [2400:8905::f03c:94ff:fe1c:a95e]:443
�[36mINFO�[0m[0006] [�[38;5;203m1165396411�[0m 5ms] outbound/direct[direct]: outbound connection to 192.168.1.9:10086
�[37mDEBUG�[0m[0007] [�[38;5;203m1165396411�[0m 311ms] connection: connection download finished
�[37mDEBUG�[0m[0007] [�[38;5;203m1165396411�[0m 311ms] connection: connection upload finished

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.
@dyhkwong
Copy link
Contributor

dyhkwong commented Jan 6, 2025

see #694

@nekohasekai nekohasekai closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants