plugin

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAuthman

type ClientAuthman interface {
	// GetToken is used for client to prepare token.
	GetToken() ([]byte, error)
}

ClientAuthman is used to provide extra authentication mechanism.

type HTTPMiddleman

type HTTPMiddleman interface {
	// Addr is the absoluteURI, RFC 2396.
	// Request is the http header, don't guarantee it is complete, but contains the host line.
	// Has not written anything to conn.
	// Handle does not need to close conn.
	// If return true that means the request has been handled.
	Handle(method, addr string, request []byte, conn *net.TCPConn) (handled bool, err error)
}

HTTPMiddleman is a middleman who can intercept and handle request

type Internet

type Internet interface {
	TCPEgress(int) error
	UDPEgress(int) error
	Close() error
}

type ServerAuthman

type ServerAuthman interface {
	// VerifyToken is used for server to verify token.
	VerifyToken(token []byte, network string, a byte, dst string, b []byte) (Internet, error)
}

ServerAuthman is used to provide extra authentication mechanism

type Socks5Middleman

type Socks5Middleman interface {
	// TCPHandle does not need to close conn.
	// If return true that means the request has been handled.
	TCPHandle(*socks5.Server, *net.TCPConn, *socks5.Request) (bool, error)

	// UDPHandle handles udp packet.
	// If return true that means the request has been handled.
	UDPHandle(*socks5.Server, *net.UDPAddr, *socks5.Datagram) (bool, error)
}

Socks5Middleman is a middleman who can intercept and handle request.

Directories

Path Synopsis
middleman

Jump to

Keyboard shortcuts

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