From bce56ce7ae1d150adf21c3b8a67a67cf1af2fb31 Mon Sep 17 00:00:00 2001 From: action Date: Tue, 9 Jun 2026 10:39:49 +0800 Subject: [PATCH] update 2026-06-09 10:39:49 --- momo/files/ucode/hijack.ut | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/momo/files/ucode/hijack.ut b/momo/files/ucode/hijack.ut index 31ddaa0e..8e61d8d3 100644 --- a/momo/files/ucode/hijack.ut +++ b/momo/files/ucode/hijack.ut @@ -499,7 +499,9 @@ table inet momo { {% elif (cgroups_version == 2): %} socket cgroupv2 level 2 "services/{{ cgroup_name }}" counter return {% endif %} + {% if (length(dns_hijack_nfproto) > 0): %} jump router_dns_hijack + {% endif %} {% if (tcp_mode == 'redirect'): %} fib daddr type { local, broadcast, anycast, multicast } counter return ct direction reply counter return @@ -563,7 +565,9 @@ table inet momo { {% if (lan_proxy): %} chain dstnat { type nat hook prerouting priority dstnat + 1; policy accept; + {% if (length(dns_hijack_nfproto) > 0): %} iifname @lan_inbound_device jump lan_dns_hijack + {% endif %} {% if (tcp_mode == 'redirect'): %} fib daddr type { local, broadcast, anycast, multicast } counter return ct direction reply counter return @@ -615,4 +619,4 @@ include "/etc/momo/firewall/geoip_cn.nft" {% endif %} {% if (bypass_china_mainland_ip6): %} include "/etc/momo/firewall/geoip6_cn.nft" -{% endif %} \ No newline at end of file +{% endif %}