1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 10:08:15 -05:00

allow underscore in domain name. fixes #917

This commit is contained in:
Darien Raymond 2018-03-04 17:08:58 +01:00
parent 6b4272d8d2
commit a52eb8f82b
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -61,7 +61,7 @@ func maybeIPPrefix(b byte) bool {
func isValidDomain(d string) bool {
for _, c := range d {
if !((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '-' || c == '.') {
if !((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '-' || c == '.' || c == '_') {
return false
}
}