logo NodeSeekbeta

请教大佬们个技术问题

大佬们,请教一个问题,我vps是美西搬瓦工,机房dc99,使用sing-box,sing-box版本是1.12.4,平时浏览网页或者看视频有时候就会断一小会儿
然后我看日志是到这个地址不通 [2606:4700::6810:7c60]:443,日志如下:

Sep 08 23:56:17 zh sing-box[2659305]: ERROR[453121] [2977146481 0ms] inbound/vless[vless-in]: process connection from 220.195.77.155:20820: TLS handshake: REALITY: failed to dial dest: (dial tcp [2606:4700::6810:7c60]:443: connect: network is unreachable | dial tcp [2606:4700::6810:7b60]:443: connect: network is unreachable)
Sep 08 23:56:17 zh sing-box[2659305]: INFO[453121] [1933341696 0ms] inbound/vless[vless-in]: inbound connection from 220.195.77.155:50917
Sep 08 23:56:17 zh sing-box[2659305]: TRACE[453121] inbound/vless[vless-in]: REALITY remoteAddr: 220.195.77.155:50917
Sep 08 23:56:17 zh sing-box[2659305]: ERROR[453121] [1933341696 0ms] inbound/vless[vless-in]: process connection from 220.195.77.155:50917: TLS handshake: REALITY: failed to dial dest: (dial tcp [2606:4700::6810:7c60]:443: connect: network is unreachable | dial tcp [2606:4700::6810:7b60]:443: connect: network is unreachable)
Sep 08 23:56:17 zh sing-box[2659305]: INFO[453121] [3066820937 0ms] inbound/vless[vless-in]: inbound connection from 220.195.77.155:50938
Sep 08 23:56:17 zh sing-box[2659305]: TRACE[453121] inbound/vless[vless-in]: REALITY remoteAddr: 220.195.77.155:50938
Sep 08 23:56:17 zh sing-box[2659305]: ERROR[453121] [3066820937 0ms] inbound/vless[vless-in]: process connection from 220.195.77.155:50938: TLS handshake: REALITY: failed to dial dest: (dial tcp [2606:4700::6810:7c60]:443: connect: network is unreachable | dial tcp [2606:4700::6810:7b60]:443: connect: network is unreachable)

[2606:4700::6810:7c60]:443,这个地址我查了下是cloudflare的ipv6地址,是我配置文件里配置的handshake server的域名一致,配置文件如下:

root@zh:~# cat /etc/sing-box/config.json 
{
  "dns": {
    "servers": [
      {
        "type": "local",
        "tag": "local"
      }
    ]
  },
  "inbounds": [
    {
      "type": "vless",
      "tag": "vless-in",
      "listen": "0.0.0.0",
      "listen_port": 28286,
      "users": [
        {
          "uuid": "xxxxxxxxxxxxxxxxxxxxxx",
          "flow": "xtls-rprx-vision"
        }
      ],
      "tls": {
        "enabled": true,
        "server_name": "www.cloudflare.com",
        "reality": {
          "enabled": true,
          "handshake": {
            "server": "www.cloudflare.com",
            "server_port": 443
          },
          "private_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "short_id": ["xxxx"]
        }
      }
    }
  ],
  "outbounds": [
    {
      "type": "direct",
      "tag": "direct",
      "domain_resolver": {
        "server": "local",
        "strategy": "ipv4_only"
      }
    },
    {
      "type": "block",
      "tag": "block"
    }
  ]
}

因为我的vps是没有ipv6的,所以到这个地址不通是正常的,我就想着怎么能只解析到ipv4呢,于是我设置了"strategy": "ipv4_only",但是没用。
所以想请教下站里的大佬们,连接偶尔会断开是不是因为日志里的到ipv6不通,还是有别的原因。

  • 是的,最近的版本出现了这个问题,我已经反馈了
    在服务端使用如下DNS配置可以暂时解决,有用的话记得给个鸡腿

    "dns": {
        "servers": [
          {
            "type": "local"
          }
        ],
        "strategy": "ipv4_only"
      },
    
  • 内板+权限阅读

  • 同dc99,也是会偶尔断流,没看过日志

  • -10+1
    内版

  • @node-liker #6 按照楼上老哥说的,改了下配置,后面再观察观察。

你好啊,陌生人!

我的朋友,看起来你是新来的,如果想参与到讨论中,点击下面的按钮!

📈用户数目📈

目前论坛共有60484位seeker

🎉欢迎新用户🎉