socks5

package
v0.0.0-...-4cbae8c Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accepter

type Accepter interface {
	Accept() (net.Conn, error)
}

type EventLogger

type EventLogger interface {
	TCPRequest(addr net.Addr, reqAddr string)
	TCPError(addr net.Addr, reqAddr string, err error)
	UDPRequest(addr net.Addr)
	UDPError(addr net.Addr, err error)
}

type FakeHyClient

type FakeHyClient interface {
	TCP(addr string) (net.Conn, error)
	UDP() (FakeHyUDPConn, error)
	Close() error
}

type FakeHyUDPConn

type FakeHyUDPConn interface {
	Receive() (b []byte, addr string, err error)
	Send(b []byte, addr string) error
	Close() error
}

type Server

type Server struct {
	HyClient    FakeHyClient
	AuthFunc    func(username, password string) bool // nil = no authentication
	DisableUDP  bool
	EventLogger EventLogger
}

Server is a SOCKS5 server using a Hysteria client as outbound.

func (*Server) Serve

func (s *Server) Serve(listener Accepter) error

Jump to

Keyboard shortcuts

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