mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-01 10:05:00 +03:00
@@ -301,6 +301,7 @@ public partial class CoreConfigV2rayService(CoreConfigContext context)
|
|||||||
GenLog();
|
GenLog();
|
||||||
_coreConfig.outbounds.Clear();
|
_coreConfig.outbounds.Clear();
|
||||||
GenOutbounds();
|
GenOutbounds();
|
||||||
|
GenStatistic();
|
||||||
|
|
||||||
var protectNode = new ProfileItem()
|
var protectNode = new ProfileItem()
|
||||||
{
|
{
|
||||||
@@ -326,18 +327,17 @@ public partial class CoreConfigV2rayService(CoreConfigContext context)
|
|||||||
Node = protectNode,
|
Node = protectNode,
|
||||||
}).BuildProxyOutbound("tun-project-ss"));
|
}).BuildProxyOutbound("tun-project-ss"));
|
||||||
|
|
||||||
|
_coreConfig.routing.rules ??= [];
|
||||||
var hasBalancer = _coreConfig.routing.balancers is { Count: > 0 };
|
var hasBalancer = _coreConfig.routing.balancers is { Count: > 0 };
|
||||||
_coreConfig.routing.rules =
|
_coreConfig.routing.rules.Add(new()
|
||||||
[
|
{
|
||||||
new()
|
inboundTag = ["proxy-relay-ss"],
|
||||||
{
|
outboundTag = hasBalancer ? null : Global.ProxyTag,
|
||||||
inboundTag = new List<string> { "proxy-relay-ss" },
|
balancerTag = hasBalancer ? Global.ProxyTag + Global.BalancerTagSuffix : null,
|
||||||
outboundTag = hasBalancer ? null : Global.ProxyTag,
|
type = "field"
|
||||||
balancerTag = hasBalancer ? Global.ProxyTag + Global.BalancerTagSuffix: null,
|
});
|
||||||
type = "field"
|
|
||||||
}
|
//_coreConfig.inbounds.Clear();
|
||||||
];
|
|
||||||
_coreConfig.inbounds.Clear();
|
|
||||||
|
|
||||||
var configNode = JsonUtils.ParseJson(JsonUtils.Serialize(_coreConfig))!;
|
var configNode = JsonUtils.ParseJson(JsonUtils.Serialize(_coreConfig))!;
|
||||||
configNode["inbounds"]!.AsArray().Add(new
|
configNode["inbounds"]!.AsArray().Add(new
|
||||||
|
|||||||
Reference in New Issue
Block a user