mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-15 08:55:00 +03:00
Improve and optimize
This commit is contained in:
@@ -528,5 +528,12 @@ public class Global
|
||||
@""
|
||||
];
|
||||
|
||||
public static readonly List<string> OutboundTags =
|
||||
[
|
||||
ProxyTag,
|
||||
DirectTag,
|
||||
BlockTag
|
||||
];
|
||||
|
||||
#endregion const
|
||||
}
|
||||
|
||||
@@ -1369,7 +1369,7 @@ public class CoreConfigSingboxService
|
||||
|
||||
private async Task<string?> GenRoutingUserRuleOutbound(string outboundTag, SingboxConfig singboxConfig)
|
||||
{
|
||||
if (outboundTag is Global.ProxyTag or Global.DirectTag or Global.BlockTag)
|
||||
if (Global.OutboundTags.Contains(outboundTag))
|
||||
{
|
||||
return outboundTag;
|
||||
}
|
||||
|
||||
@@ -631,7 +631,7 @@ public class CoreConfigV2rayService
|
||||
|
||||
private async Task<string?> GenRoutingUserRuleOutbound(string outboundTag, V2rayConfig v2rayConfig)
|
||||
{
|
||||
if (outboundTag is Global.ProxyTag or Global.DirectTag or Global.BlockTag)
|
||||
if (Global.OutboundTags.Contains(outboundTag))
|
||||
{
|
||||
return outboundTag;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user