hy

package
v0.0.0-...-70d54de Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDevice stack.LinkEndpoint
View Source
var DefaultTunnel = tunnel{}

Functions

func Free

func Free()

func Receive

func Receive() ([]byte, error)

func Send

func Send(data []byte) error

Types

type Device

type Device struct {
	*iobased.Endpoint
}

func WarpTun

func WarpTun() (*Device, error)

func (*Device) Read

func (d *Device) Read(b []byte) (int, error)

func (*Device) Write

func (d *Device) Write(b []byte) (int, error)

type HyConfig

type HyConfig struct {
	Server             string
	Port               int
	Uuid               string
	Obfs               string
	IsDebug            bool
	LimitMemory        int
	MaxReconnectSecond int
	MaxReconnectCount  int
	Bandwidth          string
	Token              string
}

type MogoHysteria

type MogoHysteria struct {
	IP string
	// contains filtered or unexported fields
}

func StartTunnel

func StartTunnel(flow PacketFlow, cfg *HyConfig) (*MogoHysteria, error)

func (*MogoHysteria) HandleTCP

func (mhy *MogoHysteria) HandleTCP(conn adapter.TCPConn)

func (*MogoHysteria) HandleUDP

func (mhy *MogoHysteria) HandleUDP(conn adapter.UDPConn)

func (*MogoHysteria) StopTunnel

func (mhy *MogoHysteria) StopTunnel() error

type PacketFlow

type PacketFlow interface {
	WritePacket(packet []byte)
	ReadPacket() []byte
	Log(msg string)
	ReconnectCallback(err error)
}

type Pool

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

func (*Pool) Get

func (p *Pool) Get() []byte

func (*Pool) Put

func (p *Pool) Put(b []byte)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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