rnetx / sing-box

https://sing-box.sagernet.org
Other
71 stars 8 forks source link

配置fallback时 用check命令 报错 #7

Closed bigbluebaby1 closed 1 year ago

bigbluebaby1 commented 1 year ago

Welcome

Description of the problem

decode config at config.json: outbound options: json: cannot unmarshal string into Go struct field URLTestFallbackOptions.fallback.max_delay of type uint16

Version of sing-box

sing-box version 1.3-beta12-yaott-8a54c7c

Environment: go1.20.5 windows/amd64 Tags: with_quic,with_grpc,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_reality_server,with_acme,with_clash_api,with_v2ray_api,with_gvisor,with_proxyprovider,with_clash_ui,with_sideload Revision: 8a54c7ccd559c80c0dc55f851021f15903d018fe CGO: disabled

Server and client configuration file

{ "tag": "telegram-US", "type": "urltest", "outbounds":[ "Kuromis-US", "Ytoo-US", "ImmTelecom-US", "Nexitally-US" ], "fallback": { "enabled": true ,// 开启 fallback "max_delay": "200ms" // 可选配置 // 若某节点可用,但是延迟超过 max_delay,则认为该节点不可用,淘汰忽略该节点,继续匹配选择下一个节点 // 但若所有节点均不可用,但是存在被 max_delay 规则淘汰的节点,则选择延迟最低的被淘汰节点 }

Server and client log file

decode config at config.json: outbound options: json: cannot unmarshal string into Go struct field URLTestFallbackOptions.fallback.max_delay of type uint16

0xffffharry commented 1 year ago

请尝试最新commit

bigbluebaby1 commented 1 year ago

outbound/urltest.go:57:14: cannot use options.Fallback.MaxDelay (variable of type option.Duration) as uint16 value in struct literal

编译时出现问题

0xffffharry commented 1 year ago

请重新拉取分支,尝试最新commit

bigbluebaby1 commented 1 year ago

已解决 thanks