anytls

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ClientConfig
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *ClientConfig) *Client

func (*Client) HandleFlow

func (c *Client) HandleFlow(ctx context.Context, dst net.Destination, rw buf.ReaderWriter) error

func (*Client) HandlePacketConn

func (c *Client) HandlePacketConn(ctx context.Context, dst net.Destination, rw udp.PacketReaderWriter) error

type ClientConfig

type ClientConfig struct {
	Address    net.Address
	PortPicker i.PortSelector
	Password   string
	Dialer     i.Dialer
}

type Server

type Server struct {
	ServerSettings
	// contains filtered or unexported fields
}

func NewServer

func NewServer(settings ServerSettings) *Server

func (*Server) AddUser

func (h *Server) AddUser(user i.User)

func (*Server) FallbackProcess

func (s *Server) FallbackProcess(ctx context.Context, conn net.Conn) (bool, buf.MultiBuffer, error)

func (*Server) GetUser

func (h *Server) GetUser(sha256 [32]byte) (string, error)

func (*Server) Network

func (d *Server) Network() []net.Network

func (*Server) Process

func (d *Server) Process(ctx context.Context, conn net.Conn) error

func (*Server) RemoveUser

func (h *Server) RemoveUser(uid, secret string)

func (*Server) WithOnUnauthorizedRequest

func (h *Server) WithOnUnauthorizedRequest(f i.UnauthorizedReport)

type ServerSettings

type ServerSettings struct {
	Handler               i.Handler
	OnUnauthorizedRequest i.UnauthorizedReport
}

Jump to

Keyboard shortcuts

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