Skip to content

Commit 4d2f320

Browse files
committed
Bug fix
2dust#8879
1 parent f24a79a commit 4d2f320

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

v2rayN/ServiceLib/Services/CoreConfig/V2ray/CoreConfigV2rayService.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ public RetResult GenerateClientProxyRelayConfig()
301301
GenLog();
302302
_coreConfig.outbounds.Clear();
303303
GenOutbounds();
304+
GenStatistic();
304305

305306
var protectNode = new ProfileItem()
306307
{
@@ -326,18 +327,17 @@ public RetResult GenerateClientProxyRelayConfig()
326327
Node = protectNode,
327328
}).BuildProxyOutbound("tun-project-ss"));
328329

330+
_coreConfig.routing.rules ??= [];
329331
var hasBalancer = _coreConfig.routing.balancers is { Count: > 0 };
330-
_coreConfig.routing.rules =
331-
[
332-
new()
333-
{
334-
inboundTag = new List<string> { "proxy-relay-ss" },
335-
outboundTag = hasBalancer ? null : Global.ProxyTag,
336-
balancerTag = hasBalancer ? Global.ProxyTag + Global.BalancerTagSuffix: null,
337-
type = "field"
338-
}
339-
];
340-
_coreConfig.inbounds.Clear();
332+
_coreConfig.routing.rules.Add(new()
333+
{
334+
inboundTag = ["proxy-relay-ss"],
335+
outboundTag = hasBalancer ? null : Global.ProxyTag,
336+
balancerTag = hasBalancer ? Global.ProxyTag + Global.BalancerTagSuffix : null,
337+
type = "field"
338+
});
339+
340+
//_coreConfig.inbounds.Clear();
341341

342342
var configNode = JsonUtils.ParseJson(JsonUtils.Serialize(_coreConfig))!;
343343
configNode["inbounds"]!.AsArray().Add(new

0 commit comments

Comments
 (0)