proxy

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidAuthentication  = errors.New("Invalid authentication.")
	InvalidProtocolVersion = errors.New("Invalid protocol version.")
)

Functions

func RegisterInboundConnectionHandlerFactory

func RegisterInboundConnectionHandlerFactory(name string, factory InboundConnectionHandlerFactory) error

func RegisterOutboundConnectionHandlerFactory

func RegisterOutboundConnectionHandlerFactory(name string, factory OutboundConnectionHandlerFactory) error

Types

type InboundConnectionHandler

type InboundConnectionHandler interface {
	// Listen starts a InboundConnectionHandler by listen on a specific port. This method is called
	// exactly once during runtime.
	Listen(port uint16) error
}

A InboundConnectionHandler handles inbound network connections to V2Ray.

type InboundConnectionHandlerFactory

type InboundConnectionHandlerFactory interface {
	// Create creates a new InboundConnectionHandler with given configuration.
	Create(dispatch app.PacketDispatcher, config interface{}) (InboundConnectionHandler, error)
}

A InboundConnectionHandlerFactory creates InboundConnectionHandler on demand.

func GetInboundConnectionHandlerFactory

func GetInboundConnectionHandlerFactory(name string) InboundConnectionHandlerFactory

type OutboundConnectionHandler

type OutboundConnectionHandler interface {
	// Dispatch sends one or more Packets to its destination.
	Dispatch(firstPacket v2net.Packet, ray ray.OutboundRay) error
}

An OutboundConnectionHandler handles outbound network connection for V2Ray.

type OutboundConnectionHandlerFactory

type OutboundConnectionHandlerFactory interface {
	// Create creates a new OutboundConnectionHandler with given config.
	Create(config interface{}) (OutboundConnectionHandler, error)
}

An OutboundConnectionHandlerFactory creates OutboundConnectionHandler on demand.

func GetOutboundConnectionHandlerFactory

func GetOutboundConnectionHandlerFactory(name string) OutboundConnectionHandlerFactory

Directories

Path Synopsis
protocol
Package vmess contains protocol definition, io lib for VMess.
Package vmess contains protocol definition, io lib for VMess.

Jump to

Keyboard shortcuts

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