Jelajahi Sumber

fix config in http

v2ray 9 tahun lalu
induk
melakukan
48f1d34ca5
2 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 2 2
      proxy/http/http.go
  2. 1 1
      proxy/http/http_factory.go

+ 2 - 2
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,

+ 1 - 1
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
 		})
 }