Documentation ¶
Overview ¶
Package proxy contains all proxies used by V2Ray.
To implement an inbound or outbound proxy, one needs to do the following: 1. Implement the interface(s) below. 2. Register a config creator through common.RegisterConfig.
Index ¶
- func ContextWithInboundEntryPoint(ctx context.Context, dest net.Destination) context.Context
- func ContextWithInboundTag(ctx context.Context, tag string) context.Context
- func ContextWithOriginalTarget(ctx context.Context, dest net.Destination) context.Context
- func ContextWithResolveIPs(ctx context.Context, ips []net.Address) context.Context
- func ContextWithSource(ctx context.Context, src net.Destination) context.Context
- func ContextWithTarget(ctx context.Context, dest net.Destination) context.Context
- func InboundEntryPointFromContext(ctx context.Context) (net.Destination, bool)
- func InboundTagFromContext(ctx context.Context) (string, bool)
- func OriginalTargetFromContext(ctx context.Context) (net.Destination, bool)
- func ResolvedIPsFromContext(ctx context.Context) ([]net.Address, bool)
- func SourceFromContext(ctx context.Context) (net.Destination, bool)
- func TargetFromContext(ctx context.Context) (net.Destination, bool)
- type Dialer
- type Inbound
- type Outbound
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithInboundTag ¶
func ContextWithResolveIPs ¶
func ContextWithSource ¶
func ContextWithTarget ¶
func InboundEntryPointFromContext ¶
func InboundEntryPointFromContext(ctx context.Context) (net.Destination, bool)
func OriginalTargetFromContext ¶
func OriginalTargetFromContext(ctx context.Context) (net.Destination, bool)
func ResolvedIPsFromContext ¶
func SourceFromContext ¶
func SourceFromContext(ctx context.Context) (net.Destination, bool)
func TargetFromContext ¶
func TargetFromContext(ctx context.Context) (net.Destination, bool)
Types ¶
type Dialer ¶
type Dialer interface { // Dial dials a system connection to the given destination. Dial(ctx context.Context, destination net.Destination) (internet.Connection, error) }
Dialer is used by OutboundHandler for creating outbound connections.
type Inbound ¶
type Inbound interface { // Network returns a list of network that this inbound supports. Connections with not-supported networks will not be passed into Process(). Network() net.NetworkList // Process processes a connection of given network. If necessary, the Inbound can dispatch the connection to an Outbound. Process(context.Context, net.Network, internet.Connection, dispatcher.Interface) error }
An Inbound processes inbound connections.
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.