Skip to content

Commit

Permalink
Fix possible issues with load balancing
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Jan 5, 2025
1 parent aae5906 commit 5d4bd2f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
37 changes: 17 additions & 20 deletions v2rayN/ServiceLib/Sample/SampleClientConfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,25 @@
"loglevel": "warning"
},
"inbounds": [],
"outbounds": [{
"outbounds": [
{
"tag": "proxy",
"protocol": "vmess",
"settings": {
"vnext": [{
"address": "v2ray.cool",
"port": 10086,
"address": "",
"port": 0,
"users": [{
"id": "a3482e88-686a-4a58-8126-99c9df64b7bf",
"id": "",
"security": "auto"
}]
}],
"servers": [{
"address": "v2ray.cool",
"method": "chacha20",
"address": "",
"method": "",
"ota": false,
"password": "123456",
"port": 10086,
"password": "",
"port": 0,
"level": 1
}]
},
Expand All @@ -35,27 +36,23 @@
},
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "block",
"settings": {
"response": {
"type": "http"
}
}
"tag": "block"
}
],
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"inboundTag": ["api"],
"outboundTag": "api",
"type": "field"
}
{
"inboundTag": [
"api"
],
"outboundTag": "api",
"type": "field"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public async Task<RetResult> GenerateClientMultipleLoadConfig(List<ProfileItem>
var outbound = JsonUtils.Deserialize<Outbound4Sbox>(txtOutbound);
await GenOutbound(item, outbound);
outbound.tag = $"{Global.ProxyTag}-{tagProxy.Count + 1}";
singboxConfig.outbounds.Add(outbound);
singboxConfig.outbounds.Insert(0, outbound);
tagProxy.Add(outbound.tag);
}
if (tagProxy.Count <= 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public async Task<RetResult> GenerateClientMultipleLoadConfig(List<ProfileItem>
var outbound = JsonUtils.Deserialize<Outbounds4Ray>(txtOutbound);
await GenOutbound(item, outbound);
outbound.tag = $"{Global.ProxyTag}-{tagProxy.Count + 1}";
v2rayConfig.outbounds.Add(outbound);
v2rayConfig.outbounds.Insert(0, outbound);
tagProxy.Add(outbound.tag);
}
if (tagProxy.Count <= 0)
Expand Down

0 comments on commit 5d4bd2f

Please sign in to comment.