2015-10-14 08:51:19 -04:00
|
|
|
package proxy
|
|
|
|
|
|
|
|
import (
|
|
|
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
|
|
|
"github.com/v2ray/v2ray-core/transport/ray"
|
|
|
|
)
|
|
|
|
|
2015-10-15 07:15:59 -04:00
|
|
|
// An OutboundConnectionHandlerFactory creates OutboundConnectionHandler on demand.
|
2015-10-14 08:51:19 -04:00
|
|
|
type OutboundConnectionHandlerFactory interface {
|
2015-10-15 07:15:59 -04:00
|
|
|
// Create creates a new OutboundConnectionHandler with given config.
|
2015-10-14 08:51:19 -04:00
|
|
|
Create(config interface{}) (OutboundConnectionHandler, error)
|
|
|
|
}
|
|
|
|
|
2015-10-15 07:15:59 -04:00
|
|
|
// An OutboundConnectionHandler handles outbound network connection for V2Ray.
|
2015-10-14 08:51:19 -04:00
|
|
|
type OutboundConnectionHandler interface {
|
2015-10-15 07:15:59 -04:00
|
|
|
// Dispatch sends one or more Packets to its destination.
|
2015-10-14 08:51:19 -04:00
|
|
|
Dispatch(firstPacket v2net.Packet, ray ray.OutboundRay) error
|
|
|
|
}
|