mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-02 08:20:25 +00:00
rename InboundConnectionHandler to InboundHandler
This commit is contained in:
@@ -175,7 +175,7 @@ func handleOutput(request *protocol.VMessRequest, writer io.Writer, output <-cha
|
||||
|
||||
func init() {
|
||||
internal.MustRegisterInboundConnectionHandlerCreator("vmess",
|
||||
func(space app.Space, rawConfig interface{}) (proxy.InboundConnectionHandler, error) {
|
||||
func(space app.Space, rawConfig interface{}) (proxy.InboundHandler, error) {
|
||||
config := rawConfig.(*Config)
|
||||
|
||||
allowedClients := protocol.NewTimedUserSet()
|
||||
|
||||
@@ -191,7 +191,7 @@ func (this *VMessOutboundHandler) handleResponse(conn net.Conn, request *protoco
|
||||
|
||||
func init() {
|
||||
internal.MustRegisterOutboundConnectionHandlerCreator("vmess",
|
||||
func(space app.Space, rawConfig interface{}) (proxy.OutboundConnectionHandler, error) {
|
||||
func(space app.Space, rawConfig interface{}) (proxy.OutboundHandler, error) {
|
||||
vOutConfig := rawConfig.(*Config)
|
||||
return &VMessOutboundHandler{
|
||||
space: space,
|
||||
|
||||
@@ -37,7 +37,7 @@ func TestVMessInAndOut(t *testing.T) {
|
||||
ConnOutput: ichConnOutput,
|
||||
}
|
||||
|
||||
protocol, err := proxytesting.RegisterInboundConnectionHandlerCreator("mock_och", func(space app.Space, config interface{}) (proxy.InboundConnectionHandler, error) {
|
||||
protocol, err := proxytesting.RegisterInboundConnectionHandlerCreator("mock_och", func(space app.Space, config interface{}) (proxy.InboundHandler, error) {
|
||||
ich.Space = space
|
||||
return ich, nil
|
||||
})
|
||||
@@ -78,7 +78,7 @@ func TestVMessInAndOut(t *testing.T) {
|
||||
ConnOutput: ochConnOutput,
|
||||
}
|
||||
|
||||
protocol, err = proxytesting.RegisterOutboundConnectionHandlerCreator("mock_och", func(space app.Space, config interface{}) (proxy.OutboundConnectionHandler, error) {
|
||||
protocol, err = proxytesting.RegisterOutboundConnectionHandlerCreator("mock_och", func(space app.Space, config interface{}) (proxy.OutboundHandler, error) {
|
||||
return och, nil
|
||||
})
|
||||
assert.Error(err).IsNil()
|
||||
|
||||
Reference in New Issue
Block a user