-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
v2ray 应加入 Fake IP、代理组等实用性功能 #377
Comments
这个功能主要是利好各种“类透明代理”,比如 TUN/TAP、路由器、Android |
有些app啥的必须启用 always_real_ip |
I can try simplify commits from v2ray/v2ray-core#2237 and rebase on master. Though it might take me quite a while to understand all related code. |
我觉得可以开始这项工作了 |
用 sync.Map |
v2ray/v2ray-core#2254 |
@acc557 关于代理组,其他开发者似乎有另外的规划 |
v2ray/v2ray-core#1924 |
测速来决定出口有个坑就是类似网银这种会判断你来连接的IP是不是一段时间内变化,如果变化了就需要重新登陆。一般会选择设置一个阈值,两个出口速度差超过阈值才切换。然后就会遇到阈值设置多少合适的问题...当然还可以再加条件判断,比如限制去某个IP的链接绑定某个出口,这次会遇到银行有好多IP的问题...再添加条件?那就太复杂了吧。 |
确实如此。不光网银,YouTube其实也会有类似问题。 |
通过在相同域下保证使用同一个路线 |
是的,事实上我自己一直在用这个PR. 记得很久前有一次更新后.这个RP应该有一部分涉及路由的config.pb.go的代码和现在的库有冲突,需要跟上上更新.我并不是很熟悉,保留了原来的代码,似乎也没有任何问题.(应该也因为路由的config没什么功能改变过) 我有多条线路,常用线路基础延迟低带宽高流量大,但是偶然会丢包不稳定.备用线路流量小带宽低且延迟高一些,但确保稳定.所以我有在用这个RP,(并且我略微修改了一下,就是在它的算分基础上*权重作为最后比较,更确保在线路状态确实很差的情况下才进行切换) |
@badO1a5A90 Nice! I will have a try. Do you know which one is the last working version? Maybe fallback strategy can also be implemented as a special case inside this speedtest strategy. leaf has this failover mode |
Maybe this should be the default for all kinds of strategies. |
09b81b7 |
The only problem of v2ray/v2ray-core#1924 is that it only test speed periodically. Even if the current outbound fails, it will not realize it until the next testing cycle. I can be improved by integrating with v2ray/v2ray-core#2254, which schedules a speed test right after an amount of failure is observed on the current outbound. I'd really appreciate if someone could make an improved version of 1a574c1, as I am not familiar with golang :) |
I disagree that v2ray/v2ray-core#2254 on its own is not useful. The use-case of v2ray/v2ray-core#2254 is different from v2ray/v2ray-core#1924. The first is to prevent downtime, the second is to maximize performance. The speedtest feature is nice, but should be optional. Personally I think preventing downtime is more important than maximizing performance. Users should be able to choose which one best fits their use-case. Let's say you have a high performance server, but the bandwidth is very expensive. So you want to use a medium performance server with cheap bandwidth as the primary server and the high performance server as backup. With the speedtest function that's not possible because the high performance server will always be first. What about the following approach:
This way the user can adapt the balancer to best fit the use-case. My golang skills are not so great too, hopefully someone can help work on this. |
the issue is shifting away from its theme.. |
没关系,内容也提到了代理组,这就改标题 |
i'll do and only do some work on #2254 . |
I was also thinking to try porting v2ray/v2ray-core#2254 to v2fly and then go from there. The original author seems inactive. Maybe it's better to start over from scratch? |
did one met this
|
Download |
thanks as solved. |
I will take a look and see if I can get get it ready for a PR with basic functionality, but I need to familiarize myself more with the v2ray codebase so it might take a while. Thanks @rurirei ! I pulled your code into my fork and will try to build on it. |
|
configuration released at branch balancer-dev @acc557 {
"tag": "balancer",
"selector": [
"a",
"b",
"c"
],
"settings": {
"strategy": "fallback", // fallback or random. default to random
},
"strategySettings": {
"maxAttempts": 10
}
} |
I think #229 is for getting the current users' browsing behavior, and it will be great when being used together with a balancer update API. But I think some basic strategy like fallback, speedtest ,speedtest-when-fail should be built-in of v2ray. |
Share my patch of fallback + speed test
Feel free to use it on your own build or make a PR with this. |
加个 map 很难吗v2ray/v2ray-core#2237
代理组(高级负载均衡、fallback)功能貌似在计划中
The text was updated successfully, but these errors were encountered: