pmux

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// don't change the order!!!
	HTTP proto = iota
	HTTPS
	SOCKS4
	SOCKS5
)
View Source
const ProxyURL ckey = iota

Variables

This section is empty.

Functions

func BypassProxy

func BypassProxy() http.Handler

func ContextualHttpTransport

func ContextualHttpTransport() *http.Transport

func SetupHttpProxy added in v0.0.4

func SetupHttpProxy(proxy *Proxy) func()

func SetupHttpsProxy added in v0.0.4

func SetupHttpsProxy(proxy *Proxy) func()

Types

type Proxy

type Proxy uint64

uint64 = uint32 + uint16 + uint16 (padding for alignment)

func GetProxyFromContext

func GetProxyFromContext(ctx context.Context) Proxy

func HttpProxy

func HttpProxy(addr string) Proxy

func HttpsProxy

func HttpsProxy(addr string) Proxy

func NewProxy

func NewProxy(addr string, t string) Proxy

func Socks4Proxy

func Socks4Proxy(addr string) Proxy

func Socks5Proxy

func Socks5Proxy(addr string) Proxy

func (Proxy) Address added in v0.0.2

func (p Proxy) Address() string

func (Proxy) Bucket

func (p Proxy) Bucket(buckets int) int

func (Proxy) IP

func (p Proxy) IP() net.IP

func (Proxy) InContext

func (p Proxy) InContext(ctx context.Context) context.Context

func (Proxy) IsTunnel

func (p Proxy) IsTunnel() bool

func (Proxy) MarshalJSON added in v0.0.2

func (p Proxy) MarshalJSON() ([]byte, error)

func (Proxy) Port

func (p Proxy) Port() uint16

func (Proxy) Proto

func (p Proxy) Proto() proto

func (Proxy) Scheme added in v0.0.2

func (p Proxy) Scheme() string

func (Proxy) String

func (p Proxy) String() string

func (Proxy) URL

func (p Proxy) URL() *url.URL

func (Proxy) Valid

func (p Proxy) Valid() bool

Jump to

Keyboard shortcuts

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