fix(wg): Use private_key instead of private_key_file (unsupported)

OpenWrt's WireGuard proto handler doesn't support private_key_file —
it auto-generates a new key, causing mismatch with the heartbeat pubkey.
Read key from file and set as inline private_key instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-12 12:13:47 +00:00
parent 29c383bb2f
commit 2e7107a78a
2 changed files with 2 additions and 2 deletions

View File

@@ -241,7 +241,7 @@ set network.wan.proto='dhcp'
# --- VPS gateway WireGuard (disabled until heartbeat activates it) ---
set network.vps_gateway=interface
set network.vps_gateway.proto='wireguard'
set network.vps_gateway.private_key_file='/etc/parahub/wg_vps_private.key'
set network.vps_gateway.private_key='$(cat /etc/parahub/wg_vps_private.key)'
set network.vps_gateway.mtu='1420'
set network.vps_gateway.ip4table='100'
set network.vps_gateway.auto='0'

View File

@@ -36,7 +36,7 @@ if ! uci -q get network.vps_gateway >/dev/null 2>&1; then
uci batch <<-BOOTSTRAP_NET
set network.vps_gateway=interface
set network.vps_gateway.proto='wireguard'
set network.vps_gateway.private_key_file='/etc/parahub/wg_vps_private.key'
set network.vps_gateway.private_key='$(cat /etc/parahub/wg_vps_private.key)'
set network.vps_gateway.mtu='1420'
set network.vps_gateway.ip4table='100'
BOOTSTRAP_NET