glimpse

package
v0.0.0-...-869189d Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendErrorReply

func SendErrorReply(conn net.Conn, r socks.Reply) error

Send error reply to a client with address and port both set to 0

func SendReply

func SendReply(conn net.Conn, r socks.Reply, bndAddr netip.AddrPort) error

Send reply to a client

Types

type Request

type Request struct {
	Cmd  socks.Cmd
	Atyp socks.Atyp
	// contains filtered or unexported fields
}

SOCKS5 request payload

func ReadRequest

func ReadRequest(conn net.Conn) (*Request, error)

Read and parse a SOCKS5 request from a socket

func (*Request) AddrPort

func (r *Request) AddrPort() string

Return an address string that can be passed to net.Dial()

func (*Request) String

func (r *Request) String() string

Return a human-readable representation of a request

Jump to

Keyboard shortcuts

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