You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
自动生成的策略设置比较简单,实际使用中,当前节点失败后,快的话几秒十几秒就切换了,慢的话1-3分钟都有可能
{
"outbounds": [ ... ],
"interrupt_exist_connections": false,
"type": "urltest",
"tag": "proxy-auto"
},
因为它缺少了 interval(间隔)和 url(测试地址)字段,Sing-Box 会使用默认行为:
检测机制: 它不是“网络一失败立刻切换”。它是周期性地去测速。
默认时间: 如果没配置,Sing-Box 的默认测速间隔通常较长(可能是 3 分钟或更久,取决于版本)。这意味着如果当前节点挂了,你可能需要等待下一次测速周期,或者手动断开连接触发重测,它才会切到新节点。
是否可以界面里加上设置框,可以设置下面的参数,方便设置控制interrupt_exist_connections、测速方式、间隔和切换方式和idle_timeout
{
"outbounds": [ ... ],
"interrupt_exist_connections": false,
"type": "urltest",
"tag": "proxy-auto",
"url": "http://www.gstatic.com/generate_204",
"interval": "300s",
"tolerance": 50
},
"transport": {
"type": "grpc",
"service_name": "update",
"idle_timeout": "60s",
"ping_timeout": "20s",
"permit_without_stream": false
url: 用来测速的地址,Google 的 generate_204 是经典的测速链接。
interval: 300s 表示每 5 分钟测一次速。如果你希望它对网络故障反应更快,可以改为 "60s"(1分钟),但会稍微增加一点点耗电和流量。
tolerance: 50 表示只有当新节点的延迟比当前节点低 50ms 以上时才切换,防止网络抖动导致节点一直跳来跳去。
注:以上想法的实现是ai帮我写的,我也不太懂哈。大佬帮慢看看
Beta Was this translation helpful? Give feedback.
All reactions