From 48f1d34ca5cce9e11f419090968f75c385c32448 Mon Sep 17 00:00:00 2001 From: v2ray Date: Sat, 16 Jan 2016 13:08:50 +0100 Subject: [PATCH] fix config in http --- proxy/http/http.go | 4 ++-- proxy/http/http_factory.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/proxy/http/http.go b/proxy/http/http.go index c4066f6a..c191e1b1 100644 --- a/proxy/http/http.go +++ b/proxy/http/http.go @@ -21,11 +21,11 @@ type HttpProxyServer struct { sync.Mutex accepting bool space app.Space - config Config + config *Config tcpListener *net.TCPListener } -func NewHttpProxyServer(space app.Space, config Config) *HttpProxyServer { +func NewHttpProxyServer(space app.Space, config *Config) *HttpProxyServer { return &HttpProxyServer{ space: space, config: config, diff --git a/proxy/http/http_factory.go b/proxy/http/http_factory.go index 0f4e810b..565845bd 100644 --- a/proxy/http/http_factory.go +++ b/proxy/http/http_factory.go @@ -9,6 +9,6 @@ import ( func init() { internal.MustRegisterInboundConnectionHandlerCreator("http", func(space app.Space, rawConfig interface{}) (proxy.InboundConnectionHandler, error) { - return NewHttpProxyServer(space, rawConfig.(Config)), nil + return NewHttpProxyServer(space, rawConfig.(*Config)), nil }) }