tun

package
v0.0.0-...-d272c5d Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const TunGUID = "{BF663C0F-5A47-4720-A8CB-BEFD5A7A4633}"

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateError

type CreateError struct {
	Err error
}

func (*CreateError) Error

func (err *CreateError) Error() string

type Session

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

func (*Session) Close

func (s *Session) Close() error

func (*Session) Reader

func (s *Session) Reader(ctx context.Context) *SessionReader

func (*Session) Write

func (s *Session) Write(p []byte) (int, error)

type SessionReader

type SessionReader struct {
	Packets <-chan *pool.Packet
	// contains filtered or unexported fields
}

func (*SessionReader) Close

func (r *SessionReader) Close() error

type Tun

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

func New

func New(logger zerolog.Logger, ringSize uint32) (*Tun, error)

func (*Tun) AssignIPv4

func (t *Tun) AssignIPv4(ip net.IP) error

func (*Tun) Down

func (t *Tun) Down() (err error)

func (*Tun) SetIPv4Options

func (t *Tun) SetIPv4Options(mtu uint32) error

func (*Tun) StartSession

func (t *Tun) StartSession(p pool.Pool) (*Session, error)

Jump to

Keyboard shortcuts

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