Browse Source

Stop at '?' when reading HTTP PATH before shunting

pull/368/head
RPRX 4 years ago committed by GitHub
parent
commit
100edc370b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      proxy/trojan/server.go
  2. 2
      proxy/vless/inbound/inbound.go

2
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 {

2
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 {

Loading…
Cancel
Save