-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
balancer 不工作,从第一个 outbounds 出去了, #2777
Comments
配置好复杂有点看不懂,下面这个配置是干什么用的? {
"routing": {
"balancers": [
{
"strategy": {
"type": "leastPing" // 这里没看懂
}
}
]
}
} 然后这里也没看懂,为什么填balancer的tag而不是outbound的tag? {
"observatory": {
"subjectSelector": [
"balancer11" // 这里
]
}
} |
the configuration issue lies in the incorrect use of tags within the JSON configuration. The "balancerTag" in the routing rule and the "subjectSelector" in the "observatory" section should both be set to the tag of the load balancer, not the outbound tag. This mismatch is likely the cause of the balancer not functioning correctly. Correcting these tags to point to the load balancer should resolve the issue. |
这个是 负载均衡的一种配置,选取最快速的outbounds 出口 |
"balancers": [{ }] }] 我都设置的是 负载均衡的出口 balancer11, 应该是没有错吧 ,检查了好几遍 |
是的你在observatory填了balancer的tag,但是为什么填balancer的tag?根据文档https://www.v2fly.org/config/observatory.html#observatoryobject应该填outbound的tag啊。 然后leastPing的问题,我们来模拟一下它的运行过程。假设tw11测出来是0.123,test11测出来是0.456,那选tw11作为出口没问题啊。然后下一轮再测出tw11是0.234,test11测出来还是0.456,现在又一次选tw11作为出口也没问题啊。当然这只是模拟,实际运行情况可能不是这样。 最后建议在遇到问题的时候先把loglevel设置成debug。 |
@yomnxkcs v2ray core的东西 xray这边没有来着 |
@yomnxkcs 确实如此,搞定了,感谢! longlive xray-core |
{
"log": {
"access": "",
"error": "./error.log",
"loglevel": "warning"
},
"inbounds": [
{
"tag": "socks",
"port": 7889,
"listen": "127.0.0.1",
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
],
"routeOnly": false
},
"settings": {
"auth": "noauth",
"udp": true,
"allowTransparent": false
}
},
{
"tag": "http",
"port": 7890,
"listen": "127.0.0.1",
"protocol": "http",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
],
"routeOnly": false
},
"settings": {
"auth": "noauth",
"udp": true,
"allowTransparent": false
}
}
],
"outbounds": [
],
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
},
"observatory": {
"subjectSelector":[
"balancer11"
],
"probeURL": "https://api.github.com/_private/browser/stats",
"probeInterval": "1s"
}
}
能够成功启动,但是balancer 不工作,访问直接从第一个 outbounds 出去了, 请问下 是我的配置有问题吗,还是说xray 就没有这个功能?
The text was updated successfully, but these errors were encountered: