core

package
v0.0.0-...-a0e9eea Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_HOST = "www.qiandu.com"
View Source
const EMOJI_BEGIN = "😀😁😂😃😄😅😆"
View Source
const EMOJI_END = "😐😑😶😏😔"
View Source
const HTTP_BUFFER_SIZE = 1 << 16
View Source
const TLS_APP_PROTO = "com.qiandu.spider"

Variables

This section is empty.

Functions

func CreateBarebonesTLSConfig

func CreateBarebonesTLSConfig() (c *tls.Config, err error)

func MakePipe

func MakePipe() (pipe [2]net.Conn)

func NewOnceCloser

func NewOnceCloser(c io.Closer) io.Closer

func RunSimpleSwitch

func RunSimpleSwitch(red, blue io.ReadWriteCloser, rb, br Translator)

Types

type Base64Dec

type Base64Dec struct{}

func (*Base64Dec) RunOnBytes

func (this *Base64Dec) RunOnBytes(p []byte) ([]byte, error)

type Base64Enc

type Base64Enc struct{}

func (*Base64Enc) RunOnBytes

func (this *Base64Enc) RunOnBytes(p []byte) ([]byte, error)

type Compressor

type Compressor struct{}

func (*Compressor) RunOnBytes

func (this *Compressor) RunOnBytes(p []byte) (result []byte, err error)

type CopyPass

type CopyPass struct{}

func (*CopyPass) RunOnBytes

func (this *CopyPass) RunOnBytes(p []byte) ([]byte, error)

type Decompressor

type Decompressor struct{}

func (*Decompressor) RunOnBytes

func (this *Decompressor) RunOnBytes(p []byte) (result []byte, err error)

type DummyPass

type DummyPass struct{}

func (*DummyPass) RunOnBytes

func (this *DummyPass) RunOnBytes(p []byte) ([]byte, error)

type HTTPPacker

type HTTPPacker struct {
	P Pass
}

func (*HTTPPacker) Translate

func (this *HTTPPacker) Translate(in io.Reader, out io.Writer) error

type HTTPUnpacker

type HTTPUnpacker struct {
	P Pass
}

func (*HTTPUnpacker) Translate

func (this *HTTPUnpacker) Translate(in io.Reader, out io.Writer) error

type LVPacker

type LVPacker struct{}

func (*LVPacker) Translate

func (this *LVPacker) Translate(in io.Reader, out io.Writer) error

type LVUnpacker

type LVUnpacker struct{}

func (*LVUnpacker) Translate

func (this *LVUnpacker) Translate(in io.Reader, out io.Writer) error

type OnceCloser

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

func (*OnceCloser) Close

func (this *OnceCloser) Close() error

type Padder

type Padder struct{}

func (*Padder) RunOnBytes

func (this *Padder) RunOnBytes(p []byte) ([]byte, error)

type Pass

type Pass interface {
	RunOnBytes([]byte) ([]byte, error)
}

type PassManager

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

func NewPassManager

func NewPassManager() *PassManager

func (*PassManager) AddPass

func (this *PassManager) AddPass(p Pass) *PassManager

func (*PassManager) RunOnBytes

func (this *PassManager) RunOnBytes(buf []byte) (result []byte, err error)

type RC4Pass

type RC4Pass struct {
	C *rc4.Cipher
}

func (*RC4Pass) RunOnBytes

func (this *RC4Pass) RunOnBytes(p []byte) ([]byte, error)

type Repeater

type Repeater struct{}

func (*Repeater) Translate

func (this *Repeater) Translate(in io.Reader, out io.Writer) error

type SimpleSwitch

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

func NewSimpleSwitch

func NewSimpleSwitch(red, blue io.ReadWriteCloser, rb, br Translator) *SimpleSwitch

func (*SimpleSwitch) Run

func (this *SimpleSwitch) Run()

type Translator

type Translator interface {
	Translate(in io.Reader, out io.Writer) error
}

type Unpadder

type Unpadder struct{}

func (*Unpadder) RunOnBytes

func (this *Unpadder) RunOnBytes(p []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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