Documentation ¶
Overview ¶
Package proxy contains all proxies used by V2Ray.
Index ¶
- Constants
- Variables
- func ContextWithDialer(ctx context.Context, dialer Dialer) context.Context
- func ContextWithInboundMeta(ctx context.Context, meta *InboundHandlerMeta) context.Context
- func ContextWithOutboundMeta(ctx context.Context, meta *OutboundHandlerMeta) context.Context
- type Dialer
- type HandlerState
- type InboundHandler
- type InboundHandlerMeta
- type OutboundHandler
- type OutboundHandlerMeta
- type SessionInfo
Constants ¶
View Source
const ( HandlerStateStopped = HandlerState(0) HandlerStateRunning = HandlerState(1) )
Variables ¶
Functions ¶
Types ¶
type Dialer ¶
type Dialer interface {
Dial(ctx context.Context, destination net.Destination) (internet.Connection, error)
}
Dialer is used by OutboundHandler for creating outbound connections.
type InboundHandler ¶ added in v1.9.1
type InboundHandler interface { // Listen starts a InboundHandler. Start() error // Close stops the handler to accepting anymore inbound connections. Close() // Port returns the port that the handler is listening on. Port() net.Port Network() net.NetworkList }
An InboundHandler handles inbound network connections to V2Ray.
func CreateInboundHandler ¶
func CreateInboundHandler(ctx context.Context, config interface{}) (InboundHandler, error)
type InboundHandlerMeta ¶ added in v1.17.1
type InboundHandlerMeta struct { Tag string Address net.Address Port net.Port AllowPassiveConnection bool StreamSettings *internet.StreamConfig }
func InboundMetaFromContext ¶
func InboundMetaFromContext(ctx context.Context) *InboundHandlerMeta
type OutboundHandler ¶ added in v1.9.1
type OutboundHandler interface { // Dispatch sends one or more Packets to its destination. Dispatch(destination net.Destination, ray ray.OutboundRay) }
An OutboundHandler handles outbound network connection for V2Ray.
func CreateOutboundHandler ¶
func CreateOutboundHandler(ctx context.Context, config interface{}) (OutboundHandler, error)
type OutboundHandlerMeta ¶ added in v1.17.1
type OutboundHandlerMeta struct { Tag string Address net.Address StreamSettings *internet.StreamConfig ProxySettings *internet.ProxyConfig }
func OutboundMetaFromContext ¶
func OutboundMetaFromContext(ctx context.Context) *OutboundHandlerMeta
func (*OutboundHandlerMeta) GetDialerOptions ¶
func (v *OutboundHandlerMeta) GetDialerOptions() internet.DialerOptions
type SessionInfo ¶ added in v1.24.1
type SessionInfo struct { Source net.Destination Destination net.Destination User *protocol.User Inbound *InboundHandlerMeta }
Directories ¶
Path | Synopsis |
---|---|
Package blackhole is an outbound handler that blocks all connections.
|
Package blackhole is an outbound handler that blocks all connections. |
Package shadowsocks provides compatible functionality to Shadowsocks.
|
Package shadowsocks provides compatible functionality to Shadowsocks. |
Package socks provides implements of Socks protocol 4, 4a and 5.
|
Package socks provides implements of Socks protocol 4, 4a and 5. |
Package vmess contains the implementation of VMess protocol and transportation.
|
Package vmess contains the implementation of VMess protocol and transportation. |
Click to show internal directories.
Click to hide internal directories.