@@ -20,6 +20,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@components/Tabs";
2020import { Textarea } from "@components/Textarea" ;
2121import { DomainsTooltip } from "@components/ui/DomainListBadge" ;
2222import { getOperatingSystem } from "@hooks/useOperatingSystem" ;
23+ import { IconDirectionSign } from "@tabler/icons-react" ;
2324import { cn } from "@utils/helpers" ;
2425import { uniqBy } from "lodash" ;
2526import {
@@ -193,6 +194,7 @@ function RouteUpdateModalContent({ onSuccess, route, cell }: ModalProps) {
193194 const [ masquerade , setMasquerade ] = useState < boolean > (
194195 route ?. masquerade ?? true ,
195196 ) ;
197+ const [ isForced , setIsForced ] = useState < boolean > ( route ?. skip_auto_apply === false ) ;
196198
197199 // Refs to manage focus on tab change
198200 const networkRangeRef = useRef < HTMLInputElement > ( null ) ;
@@ -257,6 +259,7 @@ function RouteUpdateModalContent({ onSuccess, route, cell }: ModalProps) {
257259 masquerade : useSinglePeer && isNonLinuxRoutingPeer ? true : masquerade ,
258260 groups : groupIds ,
259261 access_control_groups : accessControlGroupIds || undefined ,
262+ skip_auto_apply : ! isForced ,
260263 } ,
261264 ( r ) => {
262265 onSuccess && onSuccess ( r ) ;
@@ -456,6 +459,21 @@ function RouteUpdateModalContent({ onSuccess, route, cell }: ModalProps) {
456459 }
457460 helpText = { "Use this switch to enable or disable the route." }
458461 />
462+
463+ { isExitNode && (
464+ < FancyToggleSwitch
465+ value = { isForced }
466+ onChange = { setIsForced }
467+ label = {
468+ < >
469+ < IconDirectionSign size = { 15 } />
470+ Auto Apply Route
471+ </ >
472+ }
473+ helpText = { "Automatically apply this exit node to your distribution groups. This requires NetBird client v0.55.0 or higher." }
474+ />
475+ ) }
476+
459477 { ! isExitNode && (
460478 < RoutingPeerMasqueradeSwitch
461479 value = { masquerade }
0 commit comments