tun

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTunWire

func NewTunWire(name string, addr string) (wire.Wire, error)

create tun device on linux

Types

type TunWire

type TunWire struct {
	// base
	wire.BaseWire
	// contains filtered or unexported fields
}

tun device

func (*TunWire) Address

func (w *TunWire) Address() net.IP

func (*TunWire) ChangeAddress

func (w *TunWire) ChangeAddress(addr string) error

func (*TunWire) Close

func (w *TunWire) Close() error

func (*TunWire) Decode

func (w *TunWire) Decode(msg *message.Message) error

Decode

func (*TunWire) Encode

func (w *TunWire) Encode(msg *message.Message) error

Encode

func (*TunWire) Endpoint

func (w *TunWire) Endpoint() string

type TunWireManager

type TunWireManager struct {
	wire.BaseWireManager
}

Tun-wire manager

func (*TunWireManager) Dial

func (m *TunWireManager) Dial(endpoint string) error

func (*TunWireManager) Protocol

func (m *TunWireManager) Protocol() string

Jump to

Keyboard shortcuts

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