utils

package
v0.0.0-...-a98dcf2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UP_W    = byte(1)
	UP_R    = byte(1) << 1
	LOCAL_W = byte(1) << 2
	LOCAL_R = byte(1) << 3
)
View Source
const BUF_SIZE = 1024 * 4
View Source
const BUF_SIZE_MAX = 1024 * 1024 * 8

Variables

This section is empty.

Functions

func EncodeAsASCII

func EncodeAsASCII(buf []byte) string

func GetInspectHandler

func GetInspectHandler() http.Handler

func InspectSummary

func InspectSummary(w io.Writer)

func IsIOError

func IsIOError(err error) bool

func IsLegitProxiableIP

func IsLegitProxiableIP(ip net.IP) bool

func Proxy

func Proxy(conn, upConn io.ReadWriter)

func RandDigits

func RandDigits(size int) string

func RandString

func RandString(size int) string

func UniqueId

func UniqueId(size int) string

Types

type ReadWriteBuffer

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

func NewReadWriteBuffer

func NewReadWriteBuffer() *ReadWriteBuffer

func (*ReadWriteBuffer) Close

func (f *ReadWriteBuffer) Close() error

func (*ReadWriteBuffer) Closed

func (f *ReadWriteBuffer) Closed() bool

func (*ReadWriteBuffer) Read

func (f *ReadWriteBuffer) Read(buf []byte) (int, error)

func (*ReadWriteBuffer) Write

func (f *ReadWriteBuffer) Write(dat []byte) (int, error)

type Wildcard

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

func NewWildcard

func NewWildcard(pattern string) *Wildcard

func (*Wildcard) Match

func (wc *Wildcard) Match(text string) bool

Jump to

Keyboard shortcuts

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