1
0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-03-14 02:20:44 +00:00
Kobe Arthur Scofield 7086d286be
Remove legacy code ()
* Add feature migration notice

* Remove legacy code of transport processing

* Clear legacy proto field

* Fix missing

* Unify protocolname

* Test remove

* Supressor

* Weird code

* Remove errorgen related comments
2024-09-23 11:28:19 -04:00

17 lines
269 B
Go

package internet
import (
"net"
"strings"
)
func IsValidHTTPHost(request string, config string) bool {
r := strings.ToLower(request)
c := strings.ToLower(config)
if strings.Contains(r, ":") {
h, _, _ := net.SplitHostPort(r)
return h == c
}
return r == c
}