Documentation
¶
Overview ¶
Package wfp installs Windows Filtering Platform (WFP) PERMIT filters in a dynamic, session-scoped sublayer. Because WFP sits below Windows Defender Firewall, a high-weight permit at FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V4/V6 lets the matching inbound traffic through regardless of WDF rules.
Each Session owns its own engine handle. When the handle closes, every dynamic object added during the session is auto-deleted by Windows, so there are no orphaned filters.
Type definitions and constants are derived from the wireguard-windows firewall package (MIT). Only the subset we exercise is reproduced.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session holds the WFP engine handle for a single bypass operation. The handle owns a dynamic session: when it is closed, every WFP object added during the session (sublayer + filters) is automatically deleted by Windows. That gives us correct cleanup even if the host process is killed hard between Permit* and Close.
func PermitInterface ¶
PermitInterface installs PERMIT filters at FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V4 and _V6 scoped to the given network interface LUID. Inbound traffic on that interface bypasses Windows Defender Firewall.
func PermitUDPPort ¶
PermitUDPPort installs PERMIT filters at FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V4 and _V6 scoped to UDP traffic with the given local port. Inbound UDP to that port on any interface bypasses Windows Defender Firewall.