From 9ae258de3de74971d0134ea032fd937f14f34253 Mon Sep 17 00:00:00 2001 From: v2ray Date: Mon, 25 Jan 2016 17:29:26 +0100 Subject: [PATCH] rename --- proxy/blackhole/blackhole.go | 2 +- proxy/dokodemo/dokodemo_factory.go | 2 +- proxy/freedom/freedomfactory.go | 2 +- proxy/http/http_factory.go | 2 +- proxy/internal/handler_cache.go | 4 ++-- proxy/socks/socksfactory.go | 2 +- proxy/vmess/inbound/inbound.go | 2 +- proxy/vmess/outbound/outbound.go | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/proxy/blackhole/blackhole.go b/proxy/blackhole/blackhole.go index e10ebacc2..35a6097c9 100644 --- a/proxy/blackhole/blackhole.go +++ b/proxy/blackhole/blackhole.go @@ -31,7 +31,7 @@ func (this *BlackHole) Dispatch(firstPacket v2net.Packet, ray ray.OutboundRay) e } func init() { - internal.MustRegisterOutboundConnectionHandlerCreator("blackhole", + internal.MustRegisterOutboundHandlerCreator("blackhole", func(space app.Space, config interface{}) (proxy.OutboundHandler, error) { return NewBlackHole(), nil }) diff --git a/proxy/dokodemo/dokodemo_factory.go b/proxy/dokodemo/dokodemo_factory.go index 299e3e2a9..03f1eb67a 100644 --- a/proxy/dokodemo/dokodemo_factory.go +++ b/proxy/dokodemo/dokodemo_factory.go @@ -7,7 +7,7 @@ import ( ) func init() { - internal.MustRegisterInboundConnectionHandlerCreator("dokodemo-door", + internal.MustRegisterInboundHandlerCreator("dokodemo-door", func(space app.Space, rawConfig interface{}) (proxy.InboundHandler, error) { config := rawConfig.(*Config) return NewDokodemoDoor(space, config), nil diff --git a/proxy/freedom/freedomfactory.go b/proxy/freedom/freedomfactory.go index e9142d550..64a521aa9 100644 --- a/proxy/freedom/freedomfactory.go +++ b/proxy/freedom/freedomfactory.go @@ -7,7 +7,7 @@ import ( ) func init() { - internal.MustRegisterOutboundConnectionHandlerCreator("freedom", + internal.MustRegisterOutboundHandlerCreator("freedom", func(space app.Space, config interface{}) (proxy.OutboundHandler, error) { return &FreedomConnection{space: space}, nil }) diff --git a/proxy/http/http_factory.go b/proxy/http/http_factory.go index cfd6b5cdf..4b4b37775 100644 --- a/proxy/http/http_factory.go +++ b/proxy/http/http_factory.go @@ -7,7 +7,7 @@ import ( ) func init() { - internal.MustRegisterInboundConnectionHandlerCreator("http", + internal.MustRegisterInboundHandlerCreator("http", func(space app.Space, rawConfig interface{}) (proxy.InboundHandler, error) { return NewHttpProxyServer(space, rawConfig.(*Config)), nil }) diff --git a/proxy/internal/handler_cache.go b/proxy/internal/handler_cache.go index 358bf0293..d9755eecc 100644 --- a/proxy/internal/handler_cache.go +++ b/proxy/internal/handler_cache.go @@ -25,7 +25,7 @@ func RegisterInboundHandlerCreator(name string, creator InboundHandlerCreator) e return nil } -func MustRegisterInboundConnectionHandlerCreator(name string, creator InboundHandlerCreator) { +func MustRegisterInboundHandlerCreator(name string, creator InboundHandlerCreator) { if err := RegisterInboundHandlerCreator(name, creator); err != nil { panic(err) } @@ -39,7 +39,7 @@ func RegisterOutboundHandlerCreator(name string, creator OutboundHandlerCreator) return nil } -func MustRegisterOutboundConnectionHandlerCreator(name string, creator OutboundHandlerCreator) { +func MustRegisterOutboundHandlerCreator(name string, creator OutboundHandlerCreator) { if err := RegisterOutboundHandlerCreator(name, creator); err != nil { panic(err) } diff --git a/proxy/socks/socksfactory.go b/proxy/socks/socksfactory.go index d6e10d7af..89e6c681b 100644 --- a/proxy/socks/socksfactory.go +++ b/proxy/socks/socksfactory.go @@ -7,7 +7,7 @@ import ( ) func init() { - internal.MustRegisterInboundConnectionHandlerCreator("socks", + internal.MustRegisterInboundHandlerCreator("socks", func(space app.Space, rawConfig interface{}) (proxy.InboundHandler, error) { return NewSocksServer(space, rawConfig.(*Config)), nil }) diff --git a/proxy/vmess/inbound/inbound.go b/proxy/vmess/inbound/inbound.go index b3c4697bb..bbcc6a1ae 100644 --- a/proxy/vmess/inbound/inbound.go +++ b/proxy/vmess/inbound/inbound.go @@ -174,7 +174,7 @@ func handleOutput(request *protocol.VMessRequest, writer io.Writer, output <-cha } func init() { - internal.MustRegisterInboundConnectionHandlerCreator("vmess", + internal.MustRegisterInboundHandlerCreator("vmess", func(space app.Space, rawConfig interface{}) (proxy.InboundHandler, error) { config := rawConfig.(*Config) diff --git a/proxy/vmess/outbound/outbound.go b/proxy/vmess/outbound/outbound.go index 01a0353be..74b5fd9a4 100644 --- a/proxy/vmess/outbound/outbound.go +++ b/proxy/vmess/outbound/outbound.go @@ -190,7 +190,7 @@ func (this *VMessOutboundHandler) handleResponse(conn net.Conn, request *protoco } func init() { - internal.MustRegisterOutboundConnectionHandlerCreator("vmess", + internal.MustRegisterOutboundHandlerCreator("vmess", func(space app.Space, rawConfig interface{}) (proxy.OutboundHandler, error) { vOutConfig := rawConfig.(*Config) return &VMessOutboundHandler{