helper

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2016 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSNI = errors.New("No SNI in protocol")
View Source
var ErrTLSClientHello = errors.New("Invalid tls client hello")
View Source
var ErrTLSIncomplete = errors.New("TLS header incomplete")

Functions

func GetRequestURLString

func GetRequestURLString(req *http.Request) string

func IPv42Int

func IPv42Int(ip string) (int64, error)

func IsPrivateIP

func IsPrivateIP(ip string) bool

func Long2IPv4

func Long2IPv4(i uint64) string

func PKCS7Pad

func PKCS7Pad(data []byte, blocklen int) ([]byte, error)

Appends padding.

func PKCS7Unpad

func PKCS7Unpad(data []byte, blocklen int) ([]byte, error)

Returns slice of the original data without padding.

func PrepareRegexp

func PrepareRegexp(rule string, only_star bool) (*regexp.Regexp, error)

func RandAsciiString

func RandAsciiString(n int) string

func ReadWithoutComment

func ReadWithoutComment(file string, commentPrefix string) ([]byte, error)

func TLSParseSNI

func TLSParseSNI(data []byte) (string, error)

func WildcardMatch

func WildcardMatch(text string, pattern string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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