mole

package
v0.6.3-beta01 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

mole is tunnel maker package. Mole is a craftsman and makes full featured wireguard tunnels. Actually all tunnel and peer configuration should go through this package. wireguard, router and netfilter packages are apprentices to help mole.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mole

type Mole struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(w io.Writer) (*Mole, error)

func (*Mole) AddPeer

func (m *Mole) AddPeer(pi *swireguard.PeerInfo, netpath *common.SdnNetworkPath) error

func (*Mole) Apply

func (m *Mole) Apply()

Apply pending results (sync cache to reality) Send some messages to controller (Writter), if needed

func (*Mole) Close

func (m *Mole) Close() error

Close and cleanup

func (*Mole) CreateChain

func (m *Mole) CreateChain() error

func (*Mole) CreateInterface

func (m *Mole) CreateInterface(ii *swireguard.InterfaceInfo) error

func (*Mole) Flush

func (m *Mole) Flush()

Flush old cache (prepare to build new cache)

func (*Mole) RemoveInterface

func (m *Mole) RemoveInterface(ii *swireguard.InterfaceInfo) error

func (*Mole) RemovePeer

func (m *Mole) RemovePeer(pi *swireguard.PeerInfo, netpath *common.SdnNetworkPath) error

func (*Mole) Router

func (m *Mole) Router() *router.Router

Some compatibility layer to directly access apprentice

func (*Mole) Wireguard

func (m *Mole) Wireguard() *swireguard.Wireguard

Some compatibility layer to directly access apprentice

Directories

Path Synopsis
Package ipfilter wraps iptables commands and is used to setup Syntropy releated rules
Package ipfilter wraps iptables commands and is used to setup Syntropy releated rules

Jump to

Keyboard shortcuts

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