Bläddra i källkod

Stop at '?' when reading HTTP PATH before shunting

RPRX 4 år sedan
förälder
incheckning
100edc370b
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. 1 1
      proxy/trojan/server.go
  2. 1 1
      proxy/vless/inbound/inbound.go

+ 1 - 1
proxy/trojan/server.go

@@ -458,7 +458,7 @@ func (s *Server) fallback(ctx context.Context, sid errors.ExportOption, err erro
 						if k == '\r' || k == '\n' { // avoid logging \r or \n
 							break
 						}
-						if k == ' ' {
+						if k == '?' || k == ' ' {
 							path = string(firstBytes[i:j])
 							newError("realPath = " + path).AtInfo().WriteToLog(sid)
 							if pfb[path] == nil {

+ 1 - 1
proxy/vless/inbound/inbound.go

@@ -293,7 +293,7 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i
 								if k == '\r' || k == '\n' { // avoid logging \r or \n
 									break
 								}
-								if k == ' ' {
+								if k == '?' || k == ' ' {
 									path = string(firstBytes[i:j])
 									newError("realPath = " + path).AtInfo().WriteToLog(sid)
 									if pfb[path] == nil {