diff --git a/crates/defguard_core/src/handlers/wireguard.rs b/crates/defguard_core/src/handlers/wireguard.rs index a2e8db69d2..7e8df02863 100644 --- a/crates/defguard_core/src/handlers/wireguard.rs +++ b/crates/defguard_core/src/handlers/wireguard.rs @@ -336,6 +336,8 @@ pub(crate) async fn modify_network( network.port = data.port; network.dns = data.dns; network.keepalive_interval = data.keepalive_interval; + network.mtu = data.mtu; + network.fwmark = data.fwmark; network.peer_disconnect_threshold = data.peer_disconnect_threshold; network.acl_enabled = data.acl_enabled; network.acl_default_allow = data.acl_default_allow; diff --git a/web/src/pages/AddLocationPage/AddLocationPage.tsx b/web/src/pages/AddLocationPage/AddLocationPage.tsx index 66adc18401..42695ccd6d 100644 --- a/web/src/pages/AddLocationPage/AddLocationPage.tsx +++ b/web/src/pages/AddLocationPage/AddLocationPage.tsx @@ -29,7 +29,7 @@ export const AddLocationPage = () => { internalVpnSettings: { id: AddLocationPageStep.InternalVpnSettings, order: 1, - label: 'Internal VPN ', + label: 'Internal VPN', description: 'Manage core details and connection parameters for your VPN location.', }, diff --git a/web/src/pages/AddLocationPage/steps/AddLocationNetworkStep.tsx b/web/src/pages/AddLocationPage/steps/AddLocationNetworkStep.tsx index 831c971200..9c480c6174 100644 --- a/web/src/pages/AddLocationPage/steps/AddLocationNetworkStep.tsx +++ b/web/src/pages/AddLocationPage/steps/AddLocationNetworkStep.tsx @@ -13,6 +13,8 @@ const formSchema = z.object({ keepalive_interval: z .number(m.form_error_required()) .max(65535, m.form_error_port_max()), + mtu: z.number().nullable(), + fwmark: z.number().nullable(), }); type FormFields = z.infer; @@ -22,6 +24,8 @@ export const AddLocationNetworkStep = () => { useShallow( (s): FormFields => ({ keepalive_interval: s.keepalive_interval, + mtu: s.mtu, + fwmark: s.fwmark, }), ), ); @@ -59,6 +63,14 @@ export const AddLocationNetworkStep = () => { /> )} + + {(field) => ( + + )} + + + {(field) => } + { dns: location.dns, endpoint: location.endpoint, keepalive_interval: location.keepalive_interval, + mtu: location.mtu, + fwmark: location.fwmark, location_mfa_mode: location.location_mfa_mode, peer_disconnect_threshold: location.peer_disconnect_threshold, port: location.port, @@ -217,6 +221,14 @@ const EditLocationForm = ({ location }: { location: NetworkLocation }) => { )} + + {(field) => ( + + )} + + + {(field) => } + diff --git a/web/src/shared/api/types.ts b/web/src/shared/api/types.ts index 029e7f1385..a4c1cb140f 100644 --- a/web/src/shared/api/types.ts +++ b/web/src/shared/api/types.ts @@ -486,6 +486,8 @@ export interface NetworkLocation { allowed_groups: string[]; dns: string | null; keepalive_interval: number; + mtu: number | null; + fwmark: number | null; peer_disconnect_threshold: number; acl_enabled: boolean; acl_default_allow: boolean;