[PATCH] Added space to allowedNameFormat

[email protected] Tue, 12 May 2026 14:50:53 +0000
Newsgroups com.zx2c4.lists.wireguard
Message-ID <[email protected]>
From: Konstantine <[email protected]>

Commit message:

fix(windows): support adapter names containing spaces

WireGuardNT permits NIC names with spaces (e.g., WireGuardCreateAdapter(L"D=
ata Center", ...)),
but the Windows implementation previously rejected them.
This update removes that limitation and enables full compatibility.

Signed-off-by: Konstantine <[email protected]>
---
 conf/name.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/conf/name.go b/conf/name.go
index c34db900..3f5c680e 100644
--- a/conf/name.go
+++ b/conf/name.go
@@ -24,7 +24,7 @@ const (
 =09specialChars         =3D "/\\<>:\"|?*\x01\x02\x03\x04\x05\x06\x07\x08\x=
09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\=
x1c\x1d\x1e\x1f\x00"
 )
=20
-var allowedNameFormat =3D regexp.MustCompile("^[a-zA-Z0-9_=3D+.-]{1,32}$")
+var allowedNameFormat =3D regexp.MustCompile("^[a-zA-Z0-9_=3D+. -]{1,32}$"=
)
=20
 func isReserved(name string) bool {
 =09if len(name) =3D=3D 0 {
--=20
2.50.1.windows.1