Improve and optimize

This commit is contained in:
2dust
2025-07-15 20:17:01 +08:00
parent 42c4f9a6c6
commit 1360051f0c
5 changed files with 16 additions and 6 deletions
+7
View File
@@ -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;
}