common

package
v0.0.0-...-48a15a0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: 0BSD Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CleartextPort = 1080
	// TODO: waiting for IANA consideration.
	EncryptedPort = 8389
)
View Source
const ProtocolVersion byte = 212

ProtocolVersion is SOCKS 6 wireformat version

TODO: set to const 6 and update comment when standardized 1xx: represent draft xx 2xx: based on draft xx

Variables

This section is empty.

Functions

func ConvertSocketErrno

func ConvertSocketErrno(e syscall.Errno) syscall.Errno

Types

type CancellableDefer

type CancellableDefer struct {
	// contains filtered or unexported fields
}

func NewCancellableDefer

func NewCancellableDefer(f ...func()) *CancellableDefer

func (*CancellableDefer) Add

func (c *CancellableDefer) Add(f func())

func (*CancellableDefer) Cancel

func (c *CancellableDefer) Cancel()

func (*CancellableDefer) Defer

func (c *CancellableDefer) Defer()

type LeveledError

type LeveledError struct {
	Message string
	Verbose string
	Base    error
	Level   lg.Level
}

func (LeveledError) Error

func (e LeveledError) Error() string

func (LeveledError) Inner

func (e LeveledError) Inner() error

func (LeveledError) Is

func (e LeveledError) Is(e2 error) bool

func (LeveledError) Unwrap

func (e LeveledError) Unwrap() error

func (LeveledError) WithVerbose

func (e LeveledError) WithVerbose(f string, v ...interface{}) LeveledError

type SyncMap

type SyncMap[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewSyncMap

func NewSyncMap[K comparable, V any]() SyncMap[K, V]

func (*SyncMap[K, V]) Delete

func (s *SyncMap[K, V]) Delete(key K)

func (*SyncMap[K, V]) Load

func (s *SyncMap[K, V]) Load(key K) (V, bool)

func (*SyncMap[K, V]) Range

func (s *SyncMap[K, V]) Range(f func(key K, value V) bool)

func (*SyncMap[K, V]) Store

func (s *SyncMap[K, V]) Store(key K, value V)

Directories

Path Synopsis
lg is a wrapper of builtin log package
lg is a wrapper of builtin log package

Jump to

Keyboard shortcuts

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