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 ¶
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.