yuubinsya

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNet = errors.New("network error")

Functions

func DecodePacket added in v0.3.3

func DecodePacket(r []byte, auth Auth, prefix bool) ([]byte, netapi.Address, error)

func EncodePacket added in v0.3.3

func EncodePacket(w *bytes.Buffer, addr net.Addr, buf []byte, auth Auth, prefix bool) error

func NewAuthPacketConn added in v0.3.3

func NewAuthPacketConn(local net.PacketConn, tcp net.Conn, target net.Addr, auth Auth, prefix bool) *authPacketConn

func NewClient added in v0.3.3

func NewClient(config *protocol.Protocol_Yuubinsya) point.WrapProxy

func NewHandshaker

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

func NewServer

func NewServer(config *pl.Inbound_Yuubinsya) func(netapi.Listener) (netapi.ProtocolServer, error)

func StartUDPServer added in v0.3.3

func StartUDPServer(packet net.PacketConn, sendPacket func(*netapi.Packet) bool, auth Auth, prefix bool)

Types

type Auth added in v0.3.3

type Auth interface {
	cipher.AEAD
	KeySize() int
	Key() []byte
}

func NewAuth added in v0.3.3

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

func NewPlainAuth added in v0.3.3

func NewPlainAuth(password []byte) Auth

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 {
	net.Conn
	// contains filtered or unexported fields
}

func (*PacketConn) ReadFrom

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

func (*PacketConn) WriteTo

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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