From a568011462b0f3a097aa799fd4df712591eb1829 Mon Sep 17 00:00:00 2001 From: Jacob Gunther Date: Fri, 16 Aug 2024 07:57:04 -0500 Subject: [PATCH] Allow underscores in server addresses --- src/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.go b/src/util.go index c35586a..9555c34 100644 --- a/src/util.go +++ b/src/util.go @@ -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}$`) )