host

package
v0.0.0-...-2ef223d Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	UDPOptions UDPOptions
	TCPOptions TCPOptions
}

func DefaultOptions

func DefaultOptions() Options

type TCPOptions

type TCPOptions struct {
	MaxConns             int
	KeepaliveIdle        time.Duration
	KeepaliveInterval    time.Duration
	Stats                bool
	AllowHostConnections bool
	Dialer               func(network, addr string) (net.Conn, error)
}

type TCPStats

type TCPStats struct {
	Conns uint32

	SentBytes uint64
	RecvBytes uint64
}

type TunDevice

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

func New

func New(opts Options) (out *TunDevice, err error)

func (*TunDevice) AttachToCmd

func (t *TunDevice) AttachToCmd(cmd *exec.Cmd)

func (*TunDevice) Close

func (t *TunDevice) Close() error

func (*TunDevice) TCPStats

func (t *TunDevice) TCPStats() *TCPStats

func (*TunDevice) UDPStats

func (t *TunDevice) UDPStats() *UDPStats

type UDPOptions

type UDPOptions struct {
	Threads   int
	QueueSize int
	Stats     bool
	Dialer    func(network, addr string) (net.Conn, error)
}

type UDPStats

type UDPStats struct {
	SentPacket uint32
	RecvPacket uint32

	SentBytes uint64
	RecvBytes uint64
}

Jump to

Keyboard shortcuts

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