example

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TCP_MAX_CONNECTION_SIZE  = 1024
	FORWARD_CH_WRITE_SIZE    = 4096
	UDP_MAX_BUFFER_SIZE      = 8192
	TCP_MAX_BUFFER_SIZE      = 8192
	UDP_READ_BUFFER_SIZE     = 524288
	UDP_WRITE_BUFFER_SIZE    = 262144
	TCP_READ_BUFFER_SIZE     = 524288
	TCP_WRITE_BUFFER_SIZE    = 262144
	UDP_CONNECTION_IDLE_TIME = 1
	CH_WRITE_SIZE            = 100
	TCP_CONNECT_TIMEOUT      = 5
	TCP_CONNECT_RETRY        = 3
)

Variables

This section is empty.

Functions

func PanicHandler

func PanicHandler()

Types

type LocalForwarder

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

func NewLocalForwarder

func NewLocalForwarder() (*LocalForwarder, error)

func (*LocalForwarder) ClearConnect

func (lf *LocalForwarder) ClearConnect()

func (*LocalForwarder) Close

func (lf *LocalForwarder) Close()

func (*LocalForwarder) SetLocalIP

func (lf *LocalForwarder) SetLocalIP(ip string)

func (*LocalForwarder) SetPacketHandler

func (lf *LocalForwarder) SetPacketHandler(handler func([]byte))

func (*LocalForwarder) StartProcess

func (lf *LocalForwarder) StartProcess()

func (*LocalForwarder) Write

func (lf *LocalForwarder) Write(pkg []byte)

packet from tun device tcp/ip

Jump to

Keyboard shortcuts

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