SagerNet / sing-box

The universal proxy platform
https://sing-box.sagernet.org/
Other
15.38k stars 1.89k forks source link

运行sing-box后设备无法被访问 #1856

Closed ZenQy closed 2 weeks ago

ZenQy commented 2 weeks ago

操作系统

Linux

系统版本

NixOS 24.11.20240605.e8057b6 (Vicuña) aarch64

安装类型

sing-box 原始命令行程序

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

No response

版本

sing-box version 1.9.3

Environment: go1.22.4 linux/arm64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api
Revision: 085f60337799afc906069b540a38368968c123e4
CGO: disabled

描述

运行sing-box后,设备本身运行看起来正常,但其他设备无法访问该设备,ping、ssh等均无法访问。 ping 10.8 PING 10.8 (10.0.0.8) 56(84) bytes of data.(一直卡在这,不会有下一行信息)

重现方式

即可复现

sudo ./sing-box -c config.json run

config.json示例:

{
  "dns": {
    "servers": [
      {
        "tag": "google",
        "address": "tls://8.8.8.8"
      },
      {
        "tag": "local",
        "address": "223.5.5.5",
        "detour": "direct"
      },
      {
        "tag": "remote",
        "address": "fakeip"
      }
    ],
    "rules": [
      {
        "outbound": "any",
        "server": "local"
      },
      {
        "query_type": [
          "A",
          "AAAA"
        ],
        "server": "remote"
      }
    ],
    "fakeip": {
      "enabled": true,
      "inet4_range": "198.18.0.0/15",
      "inet6_range": "fc00::/18"
    },
    "independent_cache": true
  },
  "inbounds": [
    {
      "type": "tun",
      "inet4_address": "172.19.0.1/30",
      "inet6_address": "fdfe:dcba:9876::1/126",
      "auto_route": true,
      "strict_route": true
    }
  ],
  "outbounds": [
    {
      "type": "direct",
      "tag": "direct"
    },
    {
      "type": "dns",
      "tag": "dns-out"
    }
  ],
  "route": {
    "rules": [
      {
        "protocol": "dns",
        "outbound": "dns-out"
      },
      {
        "geoip": [
          "private"
        ],
        "outbound": "direct"
      }
    ],
    "auto_detect_interface": true
  }
}

日志

No response

支持我们

完整性要求

ZenQy commented 2 weeks ago

1.8.x及以前均正常,1.9.x均存在该问题

ZenQy commented 2 weeks ago

strict_route设置为false好像就能解决该问题。 是我没仔细阅读文档。