feat: enhance AWG2 protocol handling by adding config directory management and fixing empty peer block in install script

This commit is contained in:
infosave2007
2026-04-04 16:02:11 +03:00
parent 51d5d13c41
commit 1574f54bef
4 changed files with 36 additions and 24 deletions
@@ -0,0 +1,14 @@
-- Remove invalid empty peer block from AWG2 install script.
-- The old script generated wg0.conf with:
-- [Peer]
-- PublicKey =
-- which causes awg setconf parse errors and restart loops.
UPDATE protocols
SET install_script = REPLACE(
install_script,
'\n[Peer]\nPublicKey = \nPresharedKey = $PRESHARED_KEY\nAllowedIPs = 10.8.1.2/32\n',
'\n'
)
WHERE slug = 'awg2'
AND install_script LIKE '%[Peer]%PublicKey = %PresharedKey = $PRESHARED_KEY%AllowedIPs = 10.8.1.2/32%';