Browse Source

allow underscore in domain name. fixes #917

Darien Raymond 7 years ago
parent
commit
a52eb8f82b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      common/protocol/address.go

+ 1 - 1
common/protocol/address.go

@@ -61,7 +61,7 @@ func maybeIPPrefix(b byte) bool {
 
 
 func isValidDomain(d string) bool {
 func isValidDomain(d string) bool {
 	for _, c := range d {
 	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
 			return false
 		}
 		}
 	}
 	}