fix(vpn): backport VPN fixes from production debugging
- Fix _commit_and_sync infinite recursion - Use admin session for subnet_index allocation (bypass RLS) - Auto-set VPN endpoint from CORS_ORIGINS hostname - Remove server address field from VPN setup UI - Add DELETE endpoint and button for VPN config removal - Add wg-reload watcher for reliable config hot-reload via wg syncconf - Add wg_status.json writer for live peer handshake status in UI - Per-tenant SNAT for poller-to-device routing through VPN - Restrict VPN→eth0 forwarding to Docker networks only (block exit node abuse) - Use 10.10.0.0/16 allowed-address in RouterOS commands - Fix structlog event= conflict (use audit=True) - Export backup_scheduler proxy for firmware/upgrade imports
This commit is contained in:
@@ -1136,6 +1136,9 @@ export const vpnApi = {
|
||||
updateConfig: (tenantId: string, data: { endpoint?: string; is_enabled?: boolean }) =>
|
||||
api.patch<VpnConfigResponse>(`/api/tenants/${tenantId}/vpn`, data).then((r) => r.data),
|
||||
|
||||
deleteConfig: (tenantId: string) =>
|
||||
api.delete(`/api/tenants/${tenantId}/vpn`),
|
||||
|
||||
listPeers: (tenantId: string) =>
|
||||
api.get<VpnPeerResponse[]>(`/api/tenants/${tenantId}/vpn/peers`).then((r) => r.data),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user