V2Ray load balancing
Some friends are right V2ray There is a bit of a wrong understanding of load balancing,V2ray load balancingRather than choosing which line is faster, V2Ray's load balancing uses a polling method to balance the load. That is to say, when there is traffic that needs to pass throughactingWhen, first go to the first vnext configurationserver, then when there is a second connection, go to the second server, then the third, the fourth and so on. After polling once, start polling again.
It should be noted that inConfigure V2rayDuring load balancing, configuration items such as ports and IDs in the vnext array can be different, but their transport layer configurations (streamSettings) must be consistent, that is, the same transport protocol must be used.
{ "inbound": { ... }, "outbound": { "protocol": "vmess", "settings": { "vnext": [ { "address": "AAA", "port": 3721, " users": [ { "id": "d5d013f9-7ee2-4298-93bf-ad3fe7088296", "alterId": 64 } ] }, { "address": "BBB", "port": 4399, "users": [ { "id": "68f0d692-b1cf-439d-9979-eecccef741e9", "alterId": 64 } ] } // If there are more nodes, you can continue to add! ] }, "streamSettings": { ... } }, ... }
The above is the sample code for V2ray load balancing.
Configuration in OpenWrt V2ray load balancing
existOpenWrt, configure load balancing in the V2ray service, if you have multiple v2ray servicesnode, you can use load balancing on OpenWrt.
First set the identification TAG for each outbound connection
For example, there are currently three outbound connections, and the identification tags are set to A/B/C respectively.
Then enter the routing settings page and check Balancers.
After checking Balancers, add a rule in the routing rules"proxy"
Fill in the load balancing identification name, save and apply it after filling in. In the routing options, check the newly added "proxy" and add it, then save the application.
Fill in balancer as the bottom mark, paying attention to capitalization. After filling in, click Save.
Then return to the global settings and check all outbound servers.
After the configuration is complete, you canIP querywebsite:https://ip.skk.moe/multi , check the IP addresses used when visiting places around the world.