feat(wg): Push-Routes (Client-Routes) für WireGuard-Server-Interfaces
Neues Feld 'client_routes' auf wireguard_interfaces: der Operator trägt dort kommagetrennte Netzwerke ein (z. B. 10.0.10.0/24 für ein LAN hinter der Box). Der Peer-Config-Download fügt diese automatisch als zusätzliche AllowedIPs in den [Peer]-Block der Client-Config ein. Bisher wurde nur das Server-Tunnel-Subnetz (ifc.address_cidr) als AllowedIPs exportiert — Peers konnten so keine anderen Netze über den Tunnel erreichen ohne die Config manuell anzupassen. Migration: 0026_wg_client_routes.sql Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,7 @@ interface ServerForm {
|
||||
address_cidr: string
|
||||
listen_port: number
|
||||
mtu?: number
|
||||
client_routes?: string
|
||||
role: string
|
||||
active: boolean
|
||||
description?: string
|
||||
@@ -153,6 +154,7 @@ export default function ServersTab() {
|
||||
address_cidr: row.address_cidr,
|
||||
listen_port: row.listen_port ?? 51820,
|
||||
mtu: row.mtu ?? undefined,
|
||||
client_routes: row.client_routes ?? undefined,
|
||||
role: row.role,
|
||||
active: row.active,
|
||||
description: row.description ?? undefined,
|
||||
@@ -263,6 +265,12 @@ export default function ServersTab() {
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
<Form.Item
|
||||
label={t('wg.iface.clientRoutes')} name="client_routes"
|
||||
extra={t('wg.iface.clientRoutesExtra')}
|
||||
>
|
||||
<Input placeholder="10.0.10.0/24, 192.168.1.0/24" />
|
||||
</Form.Item>
|
||||
<Form.Item label={t('wg.iface.description')} name="description">
|
||||
<Input.TextArea rows={2} />
|
||||
</Form.Item>
|
||||
|
||||
@@ -12,6 +12,7 @@ export interface WGInterface {
|
||||
allowed_ips?: string | null
|
||||
persistent_keepalive?: number | null
|
||||
mtu?: number | null
|
||||
client_routes?: string | null
|
||||
role: string
|
||||
active: boolean
|
||||
description?: string | null
|
||||
|
||||
Reference in New Issue
Block a user