util

package
Version: v0.0.0-...-7e11129 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddressTypeIPV4   = 0x01
	AddressTypeDomain = 0x03
	AddressTypeIPV6   = 0x04
)

address type enum

Variables

View Source
var (
	Name        = "@github.com/Qingluan/ProxyConnector/github.com/Qingluan/ProxyConnector"
	Version     = "unknown"
	BuildTime   = "unknown"
	GitRevision = "unknown"
)

version info

Functions

func Copy

func Copy(dst io.Writer, src io.Reader) (written int64, err error)

Copy copy with default buf

func KDF

func KDF(password string, size int) []byte

KDF generate key from password

func MD5

func MD5(datas ...[]byte) []byte

MD5 md5 hash

func PrintVersion

func PrintVersion()

PrintVersion print version

Types

type TimeoutConn

type TimeoutConn struct {
	net.Conn
	// contains filtered or unexported fields
}

TimeoutConn net.Conn with Read/Write timeout. from https://qiita.com/kwi/items/b38d6273624ad3f6ae79

func NewTimeoutConn

func NewTimeoutConn(conn net.Conn, timeout time.Duration) *TimeoutConn

NewTimeoutConn create timeout conn

func (*TimeoutConn) Read

func (c *TimeoutConn) Read(p []byte) (n int, err error)

func (*TimeoutConn) Write

func (c *TimeoutConn) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL