mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 11:29:36 +03:00
Convert domain names to lowercase before matching (#195)
Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
This commit is contained in:
@ -412,6 +412,8 @@ func (s *Server) fallback(ctx context.Context, sid errors.ExportOption, err erro
|
||||
newError("realName = " + name).AtInfo().WriteToLog(sid)
|
||||
newError("realAlpn = " + alpn).AtInfo().WriteToLog(sid)
|
||||
}
|
||||
name = strings.ToLower(name)
|
||||
alpn = strings.ToLower(alpn)
|
||||
|
||||
if len(napfb) > 1 || napfb[""] == nil {
|
||||
if name != "" && napfb[name] == nil {
|
||||
|
@ -232,6 +232,8 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i
|
||||
newError("realName = " + name).AtInfo().WriteToLog(sid)
|
||||
newError("realAlpn = " + alpn).AtInfo().WriteToLog(sid)
|
||||
}
|
||||
name = strings.ToLower(name)
|
||||
alpn = strings.ToLower(alpn)
|
||||
|
||||
if len(napfb) > 1 || napfb[""] == nil {
|
||||
if name != "" && napfb[name] == nil {
|
||||
|
Reference in New Issue
Block a user