mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 19:33:32 +02:00
7086d286be
* 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
16 lines
269 B
Go
16 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
|
|
}
|