尝试解决一下 服务器自建节点长时间无 IPv6 流量后,再次连接 v6 地址会回退至 IPv4 出站
表现为 Surge MTProto 提示 “连接 Telegram IPv6 服务器时,在收到任何数据前反复失败。所选代理服务器可能不支持 IPv6 转发。请使用支持 IPv6 的代理,或在 [MTProto] 段中设置 `ipv6 = false`。”
sing-box 配置添加 [urltest] 策略组:
"outbounds": [
{
"type": "direct",
"tag": "direct"
},
{
"type": "urltest",
"tag": "direct-v6",
"outbounds": ["direct"],
"url": "http://[2001:4860:4860::8888]/generate_204",
"interval": "60s",
"idle_timeout": "5m"
}
或者使用 crontab
*/2 * * * * ping -6 -c 2 2001:4860:4860::8888 > /dev/null 2>&1
Powered by Gemini
#singbox #Surge