yuubinsya

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuth added in v0.3.3

func NewAuth(crypt bool, password []byte) (types.Auth, error)

func NewAuthPacketConn added in v0.3.3

func NewAuthPacketConn(local net.PacketConn) *authPacketConn

func NewClient added in v0.3.3

func NewClient(config *protocol.Yuubinsya, dialer netapi.Proxy) (netapi.Proxy, error)

func NewHandshaker

func NewHandshaker(server bool, encrypted bool, password []byte) types.Handshaker

func NewServer

func NewServer(config *pl.Yuubinsya, ii netapi.Listener, handler netapi.Handler) (netapi.Accepter, error)

Types

type Conn

type Conn struct {
	net.Conn
	// contains filtered or unexported fields
}

func (*Conn) Write

func (c *Conn) Write(b []byte) (int, error)

type PacketConn

type PacketConn struct {
	pool.BufioConn
	// contains filtered or unexported fields
}

func (*PacketConn) Handshake added in v0.3.6

func (c *PacketConn) Handshake(migrateID uint64) (uint64, error)

Handshake Handshake only used for client

func (*PacketConn) ReadFrom

func (c *PacketConn) ReadFrom(payload []byte) (n int, _ net.Addr, err error)

func (*PacketConn) WriteBack added in v0.3.7

func (c *PacketConn) WriteBack(b []byte, addr net.Addr) (int, error)

func (*PacketConn) WriteTo

func (c *PacketConn) WriteTo(payload []byte, addr net.Addr) (int, error)

type UDPServer added in v0.3.8

type UDPServer struct {
	PacketConn net.PacketConn
	Handler    func(*netapi.Packet)
	Auth       types.Auth
	Prefix     bool
}

func (*UDPServer) Serve added in v0.3.8

func (s *UDPServer) Serve() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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