#4472·sing-box

json 配置中的后跟逗号导致出现“configure tun interface: invalid argument”错误

作者: AgentConDier创建于 2026年8月31日更新于 2026年9月17日
Working json config
json
{
  "dns": {
    "servers": [
      {
        "type": "local",
        "tag": "local-dns"
      }
    ],
    "final": "local-dns"
  },
  "inbounds": [
    {
      "type": "tun",
      "tag": "tun-in",
      "mtu": 1380,
      "address": [
        "172.29.254.189/30",
        "fd77:e057:ac0c:8dac:319b:b6e2:4a8b:7c00/126"
      ],
      "auto_route": true,
      "include_package": [
        "com.termux",
        "io.nekohasekai.sfa"
      ],
      "stack": "system"
    }
  ],
  "outbounds": [
    {
      "type": "direct",
      "tag": "direct-out"
    }
  ],
  "route": {
    "rules": [
      {
        "inbound": "tun-in",
        "ip_cidr": [
          "172.29.254.189/30",
          "fd77:e057:ac0c:8dac:319b:b6e2:4a8b:7c00/126"
        ],
        "port": 53,
        "action": "hijack-dns"
      },
      {
        "inbound": "tun-in",
        "ip_cidr": [

内容来源: SagerNet/sing-box