This commit is contained in:
DHR60
2026-07-16 09:37:17 +00:00
committed by GitHub
parent 5cc2aaba13
commit 09ea4890a7
2 changed files with 26 additions and 20 deletions
@@ -35,18 +35,21 @@ public partial class CoreConfigSingboxService
} }
var lstDirectExe = BuildRoutingDirectExe(); var lstDirectExe = BuildRoutingDirectExe();
if (lstDirectExe.Count > 0)
{
_coreConfig.route.rules.Add(new() _coreConfig.route.rules.Add(new()
{ {
port = [53], port = [53],
action = "hijack-dns", action = "hijack-dns",
process_path = lstDirectExe process_path = lstDirectExe,
}); });
_coreConfig.route.rules.Add(new() _coreConfig.route.rules.Add(new()
{ {
outbound = Global.DirectTag, outbound = Global.DirectTag,
process_path = lstDirectExe process_path = lstDirectExe,
}); });
}
// ICMP Routing // ICMP Routing
var icmpRouting = _config.TunModeItem.IcmpRouting ?? ""; var icmpRouting = _config.TunModeItem.IcmpRouting ?? "";
@@ -14,6 +14,8 @@ public partial class CoreConfigV2rayService
_coreConfig.routing.rules.AddRange(tunRules); _coreConfig.routing.rules.AddRange(tunRules);
} }
var lstDirectExe = BuildRoutingDirectExe(); var lstDirectExe = BuildRoutingDirectExe();
if (lstDirectExe.Count > 0)
{
_coreConfig.routing.rules.Add(new() _coreConfig.routing.rules.Add(new()
{ {
port = "53", port = "53",
@@ -25,6 +27,7 @@ public partial class CoreConfigV2rayService
process = lstDirectExe, process = lstDirectExe,
outboundTag = Global.DirectTag, outboundTag = Global.DirectTag,
}); });
}
_coreConfig.routing.rules.Add(new() _coreConfig.routing.rules.Add(new()
{ {
inboundTag = ["tun"], inboundTag = ["tun"],