WireGuard: Implement UDP FullCone NAT (#5833)

Fixes https://github.com/XTLS/Xray-core/issues/5601

---------

Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
This commit is contained in:
LjhAUMEM
2026-03-23 01:42:40 +08:00
committed by GitHub
parent ce66db7032
commit 67a71adad1
9 changed files with 317 additions and 119 deletions

View File

@@ -130,7 +130,7 @@ func ParseWireGuardKey(str string) (string, error) {
return "", errors.New("key must not be empty")
}
if len(str)%2 == 0 {
if len(str) == 64 {
_, err = hex.DecodeString(str)
if err == nil {
return str, nil