winfirewall

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
}

func NewClient

func NewClient() *Client

func (*Client) AddRuleAllowIP

func (c *Client) AddRuleAllowIP(name string, direction FWRuleDirection, ipNet *net.IPNet) error

AddRuleAllowIP adds Windows firewall rule to accept IP packets

func (*Client) AddRuleBlockIP

func (c *Client) AddRuleBlockIP(name string, direction FWRuleDirection, ipNet *net.IPNet) error

AddRuleBlockIP adds Windows firewall rule to block IP packets

func (*Client) DelAllFirewallRules

func (c *Client) DelAllFirewallRules() error

func (*Client) DelFirewallRuleByName

func (c *Client) DelFirewallRuleByName(name string) error

func (*Client) FirewallRuleExists

func (c *Client) FirewallRuleExists(name string) (bool, error)

type FWRuleDirection

type FWRuleDirection string
const (
	FWRuleIn  FWRuleDirection = "Inbound"
	FWRuleOut FWRuleDirection = "Outbound"
)

Jump to

Keyboard shortcuts

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