Documentation ¶
Overview ¶
Package proxy contains all proxies used by V2Ray.
Index ¶
- Variables
- func AllowPassiveConnectionFromContext(ctx context.Context) (bool, bool)
- func ContextWithAllowPassiveConnection(ctx context.Context, allowPassiveConnection bool) context.Context
- func ContextWithDestination(ctx context.Context, dest net.Destination) context.Context
- func ContextWithDialer(ctx context.Context, dialer Dialer) context.Context
- func ContextWithInboundDestination(ctx context.Context, dest net.Destination) context.Context
- func ContextWithInboundTag(ctx context.Context, tag string) context.Context
- func ContextWithOriginalDestination(ctx context.Context, dest net.Destination) context.Context
- func ContextWithOutboundTag(ctx context.Context, tag string) context.Context
- func ContextWithResolveIPs(ctx context.Context, ips []net.Address) context.Context
- func ContextWithSource(ctx context.Context, src net.Destination) context.Context
- func DestinationFromContext(ctx context.Context) net.Destination
- func InboundDestinationFromContext(ctx context.Context) net.Destination
- func InboundTagFromContext(ctx context.Context) string
- func OriginalDestinationFromContext(ctx context.Context) net.Destination
- func OutboundTagFromContext(ctx context.Context) string
- func ResolvedIPsFromContext(ctx context.Context) ([]net.Address, bool)
- func SourceFromContext(ctx context.Context) net.Destination
- type Dialer
- type Inbound
- type Outbound
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidProtocolVersion = errors.New("Invalid protocol version.") ErrAlreadyListening = errors.New("Already listening on another port.") )
Functions ¶
func ContextWithDestination ¶
func ContextWithInboundTag ¶
func ContextWithOutboundTag ¶
func ContextWithResolveIPs ¶
func ContextWithSource ¶
func DestinationFromContext ¶
func DestinationFromContext(ctx context.Context) net.Destination
func InboundDestinationFromContext ¶
func InboundDestinationFromContext(ctx context.Context) net.Destination
func InboundTagFromContext ¶
func OriginalDestinationFromContext ¶
func OriginalDestinationFromContext(ctx context.Context) net.Destination
func OutboundTagFromContext ¶
func ResolvedIPsFromContext ¶
func SourceFromContext ¶
func SourceFromContext(ctx context.Context) net.Destination
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.
func DialerFromContext ¶
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.