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
-22
View File
@@ -40,24 +40,6 @@ func Test_buildWireguardSettings(t *testing.T) {
PersistentKeepaliveInterval: ptrTo(time.Hour),
Interface: "wg1",
MTU: ptrTo(uint32(1000)),
AmneziaWG: settings.AmneziaWg{
JunkPacketCount: ptrTo(uint16(1)),
JunkPacketMin: ptrTo(uint16(0)),
JunkPacketMax: ptrTo(uint16(0)),
PaddingS1: ptrTo(uint16(0)),
PaddingS2: ptrTo(uint16(0)),
PaddingS3: ptrTo(uint16(0)),
PaddingS4: ptrTo(uint16(0)),
HeaderH1: ptrTo("x"),
HeaderH2: ptrTo(""),
HeaderH3: ptrTo(""),
HeaderH4: ptrTo(""),
InitPacketI1: ptrTo(""),
InitPacketI2: ptrTo(""),
InitPacketI3: ptrTo(""),
InitPacketI4: ptrTo(""),
InitPacketI5: ptrTo(""),
},
},
ipv6Supported: false,
settings: wireguard.Settings{
@@ -76,10 +58,6 @@ func Test_buildWireguardSettings(t *testing.T) {
RulePriority: 101,
IPv6: ptrTo(false),
MTU: 1000,
AmneziaWG: wireguard.AmneziaSettings{
JunkPacketCount: 1,
HeaderH1: "x",
},
},
},
}