utils

package
v0.0.0-...-e08b482 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SPool = sync.Pool{
		New: func() interface{} {
			return make([]byte, 576)
		},
	} // small buff pool
	LPool = sync.Pool{
		New: func() interface{} {
			return make([]byte, 64*1024+262)
		},
	} // large buff pool for udp
)

Functions

func SearchDns

func SearchDns(domain string, dns string) ([]string, error)

func Transport

func Transport(rw1, rw2 io.ReadWriter) error

Transport rw1 and rw2

Types

type Divert

type Divert struct {
	Timeout int64  `json:"timeout"`
	Key     []byte `json:"-"`
}

func NewDivert

func NewDivert(key string) Divert

func (Divert) Check

func (d Divert) Check(key string) bool

func (Divert) NewKey

func (d Divert) NewKey() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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