firewall

package
v0.0.0-...-846a3b6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHostsToExceptions

func AddHostsToExceptions(IPs []net.IP, onlyForICMP bool) error

AddHostsToExceptions - allow comminication with this hosts Note!: all added hosts will be removed from exceptions after client disconnection (after call 'ClientDisconnected()')

func AllowLAN

func AllowLAN(allowLan bool, allowLanMulticast bool) error

AllowLAN - allow/forbid LAN communication

func ClientConnected

func ClientConnected(clientLocalIPAddress net.IP, clientPort int, serverIP net.IP, serverPort int, isTCP bool) error

ClientConnected - allow communication for local vpn/client IP address

func ClientDisconnected

func ClientDisconnected() error

ClientDisconnected - Remove all hosts exceptions

func ClientPaused

func ClientPaused()

ClientPaused saves info about paused state of vpn

func ClientResumed

func ClientResumed()

ClientResumed saves info about resumed state of vpn

func GetEnabled

func GetEnabled() (bool, error)

GetEnabled - get firewall state

func Initialize

func Initialize() error

Initialize is doing initialization stuff Must be called on application start

func SetEnabled

func SetEnabled(enable bool) error

SetEnabled - change firewall state

func SetManualDNS

func SetManualDNS(addr net.IP) error

SetManualDNS - configure firewall to allow DNS which is out of VPN tunnel Applicable to Windows implementation (to allow custom DNS from local network)

func SetPersistant

func SetPersistant(persistant bool) error

SetPersistant - set persistant firewall state and enable it if necessary

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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