Documentation ¶
Index ¶
- Variables
- func RegisterInboundConnectionHandlerFactory(name string, factory InboundConnectionHandlerFactory) error
- func RegisterOutboundConnectionHandlerFactory(name string, factory OutboundConnectionHandlerFactory) error
- type InboundConnectionHandler
- type InboundConnectionHandlerFactory
- type OutboundConnectionHandler
- type OutboundConnectionHandlerFactory
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InvalidAuthentication = errors.New("Invalid authentication.") InvalidProtocolVersion = errors.New("Invalid protocol version.") )
Functions ¶
func RegisterInboundConnectionHandlerFactory ¶ added in v0.9.1
func RegisterInboundConnectionHandlerFactory(name string, factory InboundConnectionHandlerFactory) error
func RegisterOutboundConnectionHandlerFactory ¶ added in v0.9.1
func RegisterOutboundConnectionHandlerFactory(name string, factory OutboundConnectionHandlerFactory) error
Types ¶
type InboundConnectionHandler ¶ added in v0.9.1
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 ¶ added in v0.9.1
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 ¶ added in v0.9.1
func GetInboundConnectionHandlerFactory(name string) InboundConnectionHandlerFactory
type OutboundConnectionHandler ¶ added in v0.9.1
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 ¶ added in v0.9.1
type OutboundConnectionHandlerFactory interface { // Create creates a new OutboundConnectionHandler with given config. Create(config interface{}) (OutboundConnectionHandler, error) }
An OutboundConnectionHandlerFactory creates OutboundConnectionHandler on demand.
func GetOutboundConnectionHandlerFactory ¶ added in v0.9.1
func GetOutboundConnectionHandlerFactory(name string) OutboundConnectionHandlerFactory
Source Files ¶
Click to show internal directories.
Click to hide internal directories.