1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-25 17:05:23 +00:00
v2fly/proxy/proxy.go

29 lines
726 B
Go
Raw Normal View History

// Package proxy contains all proxies used by V2Ray.
2016-08-19 15:05:15 +00:00
package proxy
import (
2017-01-14 23:17:06 +00:00
"context"
"v2ray.com/core/app/dispatcher"
2017-01-13 23:27:45 +00:00
"v2ray.com/core/common/net"
2016-08-20 18:55:45 +00:00
"v2ray.com/core/transport/internet"
"v2ray.com/core/transport/ray"
)
2017-01-26 19:57:18 +00:00
// An Inbound processes inbound connections.
type Inbound interface {
2017-01-14 23:57:06 +00:00
Network() net.NetworkList
Process(context.Context, net.Network, internet.Connection, dispatcher.Interface) error
}
2017-01-26 19:57:18 +00:00
// An Outbound process outbound connections.
type Outbound interface {
Process(context.Context, ray.OutboundRay, Dialer) error
}
2017-01-14 23:17:06 +00:00
// Dialer is used by OutboundHandler for creating outbound connections.
type Dialer interface {
Dial(ctx context.Context, destination net.Destination) (internet.Connection, error)
}