Skip to main content

remove_overlay_rules

Function remove_overlay_rules 

Source
pub fn remove_overlay_rules() -> Result<(), FirewallError>
Expand description

Remove any ZLayer-managed inbound firewall rules that this module would otherwise install.

Safe to call when the rules do not exist — missing rules are treated as a successful no-op. On non-Windows targets this is a no-op that returns Ok(()).

§Errors

Returns a FirewallError if COM initialization fails, the INetFwPolicy2 service is unavailable, or the Windows Firewall API rejects the remove call. “Rule not found” is not treated as an error. On non-Windows targets this cannot fail.