wf

package
v1.106.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: BSD-3-Clause Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Rendered for windows/amd64

Overview

Package wf controls the Windows Filtering Platform to change Windows firewall rules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Firewall

type Firewall struct {
	// contains filtered or unexported fields
}

Firewall uses the Windows Filtering Platform to implement a network firewall.

func New

func New(luid uint64) (*Firewall, error)

New returns a new Firewall for the provided interface ID.

func (*Firewall) UpdatePermittedRoutes

func (f *Firewall) UpdatePermittedRoutes(newRoutes []netip.Prefix) error

UpdatedPermittedRoutes adds rules to allow incoming and outgoing connections from the provided prefixes. It will also remove rules for routes that were previously added but have been removed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL