You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v2ray-core/proxy/proxy.go

29 lines
726 B

// Package proxy contains all proxies used by V2Ray.
package proxy
import (
"context"
"v2ray.com/core/app/dispatcher"
"v2ray.com/core/common/net"
"v2ray.com/core/transport/internet"
"v2ray.com/core/transport/ray"
)
// An Inbound processes inbound connections.
type Inbound interface {
Network() net.NetworkList
Process(context.Context, net.Network, internet.Connection, dispatcher.Interface) error
}
// An Outbound process outbound connections.
type Outbound interface {
Process(context.Context, ray.OutboundRay, Dialer) error
}
// Dialer is used by OutboundHandler for creating outbound connections.
type Dialer interface {
Dial(ctx context.Context, destination net.Destination) (internet.Connection, error)
}