tuns

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tun

type Tun struct {
	Link       netlink.Link
	Routes     map[string]netlink.Route
	Name       string
	Alias      string
	IsLoopback bool
	Active     bool
}

func (*Tun) Proto

func (tun *Tun) Proto() *pb.Tun

func (*Tun) String

func (tun *Tun) String() string

type TunRouteEvent

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

func (*TunRouteEvent) Proto

func (event *TunRouteEvent) Proto() *pb.TunRoute

type Tuns

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

func New

func New(storage *storage.Store) *Tuns

func (*Tuns) AddRoute

func (tuns *Tuns) AddRoute(alias string, cidr string) error

func (*Tuns) Create

func (tuns *Tuns) Create(name string, isLoopback bool) (Tun, error)

func (*Tuns) DeleteRoute

func (tuns *Tuns) DeleteRoute(alias string, cidr string) error

func (*Tuns) Destroy

func (tuns *Tuns) Destroy(alias string) error

func (*Tuns) GetOne

func (tuns *Tuns) GetOne(alias string) *Tun

func (*Tuns) Len

func (tuns *Tuns) Len() int

func (*Tuns) List

func (tuns *Tuns) List() map[string]*Tun

I know

func (*Tuns) Rename added in v1.0.2

func (tuns *Tuns) Rename(oldAlias, newAlias string) error

func (*Tuns) Restore

func (tuns *Tuns) Restore() error

func (*Tuns) RouteOverlaps

func (tuns *Tuns) RouteOverlaps(cidr string) *Tun

Jump to

Keyboard shortcuts

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