@@ -190,11 +190,11 @@ func (self *socks5Server) Valid(username string, password string, userAddr strin
190190
191191 addrPort , err := netip .ParseAddrPort (userAddr )
192192 if err != nil {
193- glog .Infof ("[socks]user address %s err=%s\n " , userAddr , err )
193+ glog .V ( 1 ). Infof ("[socks]user address %s err=%s\n " , userAddr , err )
194194 return false
195195 }
196196
197- glog .Infof ("[socks]user valid %s (%s)\n " , proxyId , addrPort )
197+ glog .V ( 1 ). Infof ("[socks]user valid %s (%s)\n " , proxyId , addrPort )
198198
199199 return self .proxyDeviceManager .ValidCaller (proxyId , addrPort .Addr ())
200200 }, func () bool {
@@ -312,7 +312,9 @@ func (self *httpServer) run() {
312312 }
313313
314314 httpProxy := goproxy .NewProxyHttpServer ()
315+ httpProxy .Logger = self
315316 httpProxy .ConnectDialWithReq = connectDialContext
317+ httpProxy .AllowHTTP2 = true
316318 httpProxy .Tr = & http.Transport {
317319 TLSHandshakeTimeout : self .settings .TlsHandshakeTimeout ,
318320 ResponseHeaderTimeout : self .settings .ResponseHeaderTimeout ,
@@ -366,3 +368,8 @@ func (self *httpServer) run() {
366368 case <- self .ctx .Done ():
367369 }
368370}
371+
372+ // goproxy.Logger
373+ func (self * httpServer ) Printf (format string , v ... any ) {
374+ glog .Infof ("[http]" + format , v ... )
375+ }
0 commit comments