2015-10-14 08:51:19 -04:00
|
|
|
package proxy
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/v2ray/v2ray-core/app"
|
|
|
|
)
|
|
|
|
|
2015-10-15 07:15:59 -04:00
|
|
|
// A InboundConnectionHandlerFactory creates InboundConnectionHandler on demand.
|
2015-10-14 08:51:19 -04:00
|
|
|
type InboundConnectionHandlerFactory interface {
|
2015-10-15 07:15:59 -04:00
|
|
|
// Create creates a new InboundConnectionHandler with given configuration.
|
2015-10-14 08:51:19 -04:00
|
|
|
Create(dispatch app.PacketDispatcher, config interface{}) (InboundConnectionHandler, error)
|
|
|
|
}
|
|
|
|
|
2015-10-15 07:15:59 -04:00
|
|
|
// A InboundConnectionHandler handles inbound network connections to V2Ray.
|
2015-10-14 08:51:19 -04:00
|
|
|
type InboundConnectionHandler interface {
|
2015-10-15 07:15:59 -04:00
|
|
|
// Listen starts a InboundConnectionHandler by listen on a specific port. This method is called
|
|
|
|
// exactly once during runtime.
|
2015-10-14 08:51:19 -04:00
|
|
|
Listen(port uint16) error
|
|
|
|
}
|