tunnelclient

package
v0.0.0-...-f577a90 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoTCPConnection = errors.New("not a TCP Connection")
)

Functions

This section is empty.

Types

type HeadersFunc

type HeadersFunc func(host []byte) string

type ServMode

type ServMode int
const (
	SERV_HTTP_PROXY ServMode = iota
	SERV_SOCKS5
	SERV_REDIRECT
)

type TunnelHTTPClient

type TunnelHTTPClient struct {
	DestAddr  string
	LocalAddr string
	// contains filtered or unexported fields
}

func NewTunnelHTTPClient

func NewTunnelHTTPClient() *TunnelHTTPClient

func (*TunnelHTTPClient) ListenAndServe

func (thc *TunnelHTTPClient) ListenAndServe(st ServMode) (err error)

ListenAndServe 启动服务1

func (*TunnelHTTPClient) SetHeadersFunc

func (thc *TunnelHTTPClient) SetHeadersFunc(fn HeadersFunc)

func (*TunnelHTTPClient) SetRelayMethod

func (thc *TunnelHTTPClient) SetRelayMethod(methods string)

SetRelayMethod 设置允许HTTP流量中继的方法

Jump to

Keyboard shortcuts

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