feat(amneziawg): support persistent keepalive ranges (#6881)

AmneziaWG clients accept a randomised PersistentKeepalive range such as 15-25,
which makes keepalive timing harder to fingerprint; the panel only stored a
single number. A client's keepalive may now be a range, validated the way
AmneziaWG parses it. The downloadable .conf and vpn:// profile carry the range,
Clash/Mihomo output gets its lower bound, and plain WireGuard stays scalar-only.
The range lives in an additive wg_keep_alive_range column, so the integer
column and an older panel binary keep working after a rollback.
This commit is contained in:
YoungReckless4 authored and GitHub committed 2026-10-24 06:36:49 +02:00
1 parent 207c705300
commit 35e09191de
59 files changed
+1871 -146

No files matched your search

+6
View File
@@ -110,6 +110,12 @@ func (g *schemaGen) typeSchema(t TypeRef) map[string]any {
return map[string]any{"type": "array", "items": g.typeSchema(*t.Element)}
case KindMap:
return map[string]any{"type": "object", "additionalProperties": g.typeSchema(*t.Value)}
case KindUnion:
variants := make([]any, 0, len(t.Variants))
for _, variant := range t.Variants {
variants = append(variants, g.typeSchema(variant))
}
return map[string]any{"oneOf": variants}
case KindAny, KindUnknown, KindRaw:
return map[string]any{}
case KindRef: