proxy

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpProxyHandler added in v1.6.2

type HttpProxyHandler struct {
	Dialer proxy.Dialer
}

func (*HttpProxyHandler) ServeHTTP added in v1.6.2

func (h *HttpProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RequestAddr added in v1.1.0

type RequestAddr struct {
	Host      string
	Port      string
	Key       string
	Network   string
	Timestamp string
	Random    string
}

The Request address struct

func (*RequestAddr) MarshalBinary added in v1.1.0

func (r *RequestAddr) MarshalBinary() ([]byte, error)

MarshalBinary marshals the RequestAddr

func (*RequestAddr) UnmarshalBinary added in v1.1.0

func (r *RequestAddr) UnmarshalBinary(data []byte) error

UmarshalBinary unmarshals the RequestAddr

type TCPProxy added in v1.0.1

type TCPProxy struct {
	Config  config.Config
	Session *smux.Session
	Lock    sync.Mutex
}

The tcp proxy struct

func (*TCPProxy) Proxy added in v1.5.9

func (t *TCPProxy) Proxy(conn net.Conn, data []byte)

Proxy is a function to proxy data

type TCPServer added in v1.5.9

type TCPServer struct {
	Config   config.Config
	Tproxy   *TCPProxy
	Uproxy   *UDPProxy
	UDPConn  *net.UDPConn
	Listener net.Listener
}

The tcp server struct

func (*TCPServer) Start added in v1.5.9

func (t *TCPServer) Start()

Start starts the tcp server

type UDPProxy added in v1.0.1

type UDPProxy struct {
	Config config.Config
}

The UDPProxy struct

func (*UDPProxy) Proxy added in v1.5.9

func (u *UDPProxy) Proxy(tcpConn net.Conn, udpConn *net.UDPConn)

Proxy handles the udp connection

type UDPServer added in v1.0.1

type UDPServer struct {
	UDPConn *net.UDPConn
	Config  config.Config

	Session *smux.Session
	Lock    sync.Mutex
	// contains filtered or unexported fields
}

The UDP server struct

func (*UDPServer) Start added in v1.4.3

func (u *UDPServer) Start() *net.UDPConn

Start the UDP server

Jump to

Keyboard shortcuts

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