chore!(amneziawg): refactor to be separate from wireguard

- amneziawg is now a VPN protocol and no longer a Wireguard implementation
- Use it with VPN_TYPE=amneziawg
- document AMNEZIAWG_* options in Dockerfile
- document amneziawg support in readme
- separate amneziawg settings and code from wireguard
- re-use code from wireguard whenever possible
This commit is contained in:
Quentin McGaw
2026-03-11 16:35:18 +00:00
parent efea169495
commit b04529c380
54 changed files with 1608 additions and 741 deletions
+2 -5
View File
@@ -46,11 +46,8 @@ type Settings struct {
// It defaults to false if left unset.
IPv6 *bool
// Implementation is the implementation to use.
// It can be auto, kernelspace, userspace or amneziawg,
// and defaults to auto.
// It can be auto, kernelspace or userspace, and defaults to auto.
Implementation string
// AmneziaWG settings are extra obfuscation parameters
AmneziaWG AmneziaSettings
}
func (s *Settings) SetDefaults() {
@@ -181,7 +178,7 @@ func (s *Settings) Check() (err error) {
}
switch s.Implementation {
case "auto", "kernelspace", "userspace", "amneziawg":
case "auto", "kernelspace", "userspace":
default:
return fmt.Errorf("%w: %s", ErrImplementationInvalid, s.Implementation)
}