Keep the DNS interception hooks installed when the firewall is disabled

This commit is contained in:
Viktor Liu
2026-09-09 11:14:35 +02:00
parent d2e62e358a
commit 6c8e0764b8
5 changed files with 89 additions and 6 deletions
+4 -3
View File
@@ -21,9 +21,10 @@ const (
)
// HooksFilter is a minimal packet filter that only handles outbound DNS hooks.
// It is installed on the WireGuard interface when the userspace bind is active
// but a full firewall filter (Manager) is not needed because a native kernel
// firewall (nftables/iptables) handles packet filtering.
// It is installed on the interface when the userspace bind is active but a full
// filter (Manager) is not: either because a native kernel firewall
// (nftables/iptables) handles packet filtering, or because no firewall manager
// runs at all.
type HooksFilter struct {
udpHook atomic.Pointer[common.PacketHook]
tcpHook atomic.Pointer[common.PacketHook]