Allow underscores in server addresses

This commit is contained in:
Jacob Gunther 2024-08-16 07:57:04 -05:00
parent 8b328f64f5
commit a568011462
No known key found for this signature in database
GPG Key ID: 3F72AFAF0F74E5FD

View File

@ -25,7 +25,7 @@ import (
var (
blockedServers *MutexArray[string] = nil
hostRegEx *regexp.Regexp = regexp.MustCompile(`^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)+(:\d{1,5})?$`)
hostRegEx *regexp.Regexp = regexp.MustCompile(`^[A-Za-z0-9-_]+(\.[A-Za-z0-9-_]+)+(:\d{1,5})?$`)
ipAddressRegEx *regexp.Regexp = regexp.MustCompile(`^\d{1,3}(\.\d{1,3}){3}$`)
)