tcponly

package
v20200502.0.0-...-0896176 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type TCPOnly

type TCPOnly struct {
	Timeout      int
	Deadline     int
	Socks5Handle socks5.Handler
}

TCPOnly is a middleman.

func NewTCPOnly

func NewTCPOnly(timeout, deadline int) *TCPOnly

NewTCPOnly returns a TCPOnly.

func (*TCPOnly) Handle

func (t *TCPOnly) Handle(method, addr string, request []byte, conn *net.TCPConn) (handled bool, err error)

Handle handles http proxy request, if the domain is in the white list.

func (*TCPOnly) TCPHandle

func (t *TCPOnly) TCPHandle(s *socks5.Server, c *net.TCPConn, r *socks5.Request) (bool, error)

TCPHandle handles tcp request.

func (*TCPOnly) UDPHandle

func (t *TCPOnly) UDPHandle(s *socks5.Server, ca *net.UDPAddr, d *socks5.Datagram) (bool, error)

UDPHandle handles udp packet.

Jump to

Keyboard shortcuts

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