adapters

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveHopByHopHeaders added in v0.7.0

func RemoveHopByHopHeaders(header http.Header)

RemoveHopByHopHeaders remove hop-by-hop header

Types

type HTTPAdapter

type HTTPAdapter struct {
	R *http.Request
	// contains filtered or unexported fields
}

HTTPAdapter is a adapter for HTTP connection

func NewHTTP

func NewHTTP(request *http.Request, conn net.Conn) *HTTPAdapter

NewHTTP is HTTPAdapter generator

func (*HTTPAdapter) Addr

func (h *HTTPAdapter) Addr() *C.Addr

Addr return destination address

func (*HTTPAdapter) Close

func (h *HTTPAdapter) Close()

Close HTTP connection

func (*HTTPAdapter) Conn

func (h *HTTPAdapter) Conn() net.Conn

Conn return raw net.Conn of HTTP

type SocketAdapter added in v0.7.0

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

SocketAdapter is a adapter for socks and redir connection

func NewHTTPS added in v0.7.0

func NewHTTPS(request *http.Request, conn net.Conn) *SocketAdapter

NewHTTPS is HTTPAdapter generator

func NewSocket added in v0.7.0

func NewSocket(target socks.Addr, conn net.Conn) *SocketAdapter

NewSocket is SocketAdapter generator

func (*SocketAdapter) Addr added in v0.7.0

func (s *SocketAdapter) Addr() *C.Addr

Addr return destination address

func (*SocketAdapter) Close added in v0.7.0

func (s *SocketAdapter) Close()

Close socks and redir connection

func (*SocketAdapter) Conn added in v0.7.0

func (s *SocketAdapter) Conn() net.Conn

Conn return raw net.Conn

Jump to

Keyboard shortcuts

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