Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions client/internal/conn_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,42 +125,6 @@ func (e *ConnMgr) UpdatedRemoteFeatureFlag(ctx context.Context, enabled bool) er
}
}

// SetLocalLazyConn applies a local lazy connection override (UI / CLI / env).
// While the local override pins the setting (force != lazyForceNone),
// UpdatedRemoteFeatureFlag (management sync) is a no-op, so the local setting
// wins until it is turned off again, which returns control to management.
func (e *ConnMgr) SetLocalLazyConn(ctx context.Context, enabled bool) error {
if enabled {
e.force = lazyForceOn
} else {
e.force = lazyForceNone
}

if enabled {
if e.lazyConnMgr != nil {
return nil
}

if e.rosenpassEnabled {
log.Warnf("rosenpass connection manager is enabled, lazy connection manager will not be started")
return nil
}

log.Infof("lazy connection manager is enabled locally")
e.initLazyManager(ctx)
e.statusRecorder.UpdateLazyConnection(true)
return e.addPeersToLazyConnManager()
}

if e.lazyConnMgr == nil {
return nil
}
log.Infof("lazy connection manager is disabled locally")
e.closeManager(ctx)
e.statusRecorder.UpdateLazyConnection(false)
return nil
}

// UpdateRouteHAMap updates the route HA mappings in the lazy connection manager
func (e *ConnMgr) UpdateRouteHAMap(haMap route.HAMap) {
if !e.isStartedWithLazyMgr() {
Expand Down
19 changes: 0 additions & 19 deletions client/internal/engine_lazyconn.go

This file was deleted.

10 changes: 0 additions & 10 deletions client/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,16 +421,6 @@ func (s *Server) SetConfig(callerCtx context.Context, msg *proto.SetConfigReques
return nil, fmt.Errorf("failed to update profile config: %w", err)
}

// Apply the lazy connection toggle to the running engine so it takes
// effect without a down/up. s.mutex is already held.
if msg.LazyConnectionEnabled != nil && s.connectClient != nil {
if engine := s.connectClient.Engine(); engine != nil {
if err := engine.SetLazyConnEnabled(msg.GetLazyConnectionEnabled()); err != nil {
log.Errorf("failed to apply lazy connection change at runtime: %v", err)
}
}
}

return &proto.SetConfigResponse{}, nil
}

Expand Down
6 changes: 0 additions & 6 deletions client/ui/frontend/src/modules/settings/SettingsNetwork.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ export function SettingsNetwork() {
return (
<>
<SectionGroup title={t("settings.network.section.connectivity")}>
<FancyToggleSwitch
value={config.lazyConnectionEnabled}
onChange={(v) => setField("lazyConnectionEnabled", v)}
label={t("settings.network.lazy.label")}
helpText={t("settings.network.lazy.help")}
/>
<FancyToggleSwitch
value={config.networkMonitor}
onChange={(v) => setField("networkMonitor", v)}
Expand Down
6 changes: 0 additions & 6 deletions client/ui/i18n/locales/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,6 @@
"settings.network.section.routingDns": {
"message": "Routing & DNS"
},
"settings.network.lazy.label": {
"message": "Lazy-Verbindungen"
},
"settings.network.lazy.help": {
"message": "Statt durchgehend aktive Verbindungen zu halten, aktiviert NetBird sie bei Bedarf anhand von Aktivität oder Signalisierung."
},
"settings.network.monitor.label": {
"message": "Bei Netzwerkwechsel neu verbinden"
},
Expand Down
8 changes: 0 additions & 8 deletions client/ui/i18n/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -799,14 +799,6 @@
"message": "Routing & DNS",
"description": "Section heading for routing and DNS options. 'DNS' is an acronym — keep it."
},
"settings.network.lazy.label": {
"message": "Lazy Connections",
"description": "Toggle label: Lazy Connections (on-demand connections)."
},
"settings.network.lazy.help": {
"message": "Instead of maintaining always-on connections, NetBird activates them on-demand based on activity or signaling.",
"description": "Helper text for lazy connections."
},
"settings.network.monitor.label": {
"message": "Reconnect on Network Change",
"description": "Toggle label: reconnect automatically on network change."
Expand Down
6 changes: 0 additions & 6 deletions client/ui/i18n/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,6 @@
"settings.network.section.routingDns": {
"message": "Enrutamiento y DNS"
},
"settings.network.lazy.label": {
"message": "Conexiones bajo demanda"
},
"settings.network.lazy.help": {
"message": "En lugar de mantener conexiones permanentes, NetBird las activa bajo demanda según la actividad o la señalización."
},
"settings.network.monitor.label": {
"message": "Reconectar al cambiar de red"
},
Expand Down
6 changes: 0 additions & 6 deletions client/ui/i18n/locales/fr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,6 @@
"settings.network.section.routingDns": {
"message": "Routage et DNS"
},
"settings.network.lazy.label": {
"message": "Connexions à la demande"
},
"settings.network.lazy.help": {
"message": "Au lieu de maintenir des connexions permanentes, NetBird les active à la demande en fonction de l’activité ou de la signalisation."
},
"settings.network.monitor.label": {
"message": "Reconnecter en cas de changement de réseau"
},
Expand Down
6 changes: 0 additions & 6 deletions client/ui/i18n/locales/hu/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,6 @@
"settings.network.section.routingDns": {
"message": "Útválasztás és DNS"
},
"settings.network.lazy.label": {
"message": "Igény szerinti kapcsolatok"
},
"settings.network.lazy.help": {
"message": "Állandó kapcsolatok fenntartása helyett a NetBird igény szerint, aktivitás vagy jelzés alapján aktiválja azokat."
},
"settings.network.monitor.label": {
"message": "Újracsatlakozás hálózatváltáskor"
},
Expand Down
6 changes: 0 additions & 6 deletions client/ui/i18n/locales/it/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,6 @@
"settings.network.section.routingDns": {
"message": "Routing e DNS"
},
"settings.network.lazy.label": {
"message": "Connessioni lazy"
},
"settings.network.lazy.help": {
"message": "Invece di mantenere connessioni sempre attive, NetBird le attiva su richiesta in base all'attività o al signaling."
},
"settings.network.monitor.label": {
"message": "Riconnetti al cambio di rete"
},
Expand Down
6 changes: 0 additions & 6 deletions client/ui/i18n/locales/pt/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,6 @@
"settings.network.section.routingDns": {
"message": "Roteamento e DNS"
},
"settings.network.lazy.label": {
"message": "Conexões sob demanda"
},
"settings.network.lazy.help": {
"message": "Em vez de manter conexões sempre ativas, o NetBird as ativa sob demanda com base na atividade ou na sinalização."
},
"settings.network.monitor.label": {
"message": "Reconectar ao mudar de rede"
},
Expand Down
6 changes: 0 additions & 6 deletions client/ui/i18n/locales/ru/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,6 @@
"settings.network.section.routingDns": {
"message": "Маршрутизация и DNS"
},
"settings.network.lazy.label": {
"message": "Подключения по требованию"
},
"settings.network.lazy.help": {
"message": "Вместо постоянно активных подключений NetBird активирует их по требованию — на основе активности или сигналинга."
},
"settings.network.monitor.label": {
"message": "Переподключаться при смене сети"
},
Expand Down
6 changes: 0 additions & 6 deletions client/ui/i18n/locales/zh-CN/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,6 @@
"settings.network.section.routingDns": {
"message": "路由与 DNS"
},
"settings.network.lazy.label": {
"message": "懒连接"
},
"settings.network.lazy.help": {
"message": "NetBird 不会维持始终在线的连接,而是根据活动或信令按需激活连接。"
},
"settings.network.monitor.label": {
"message": "网络变化时重新连接"
},
Expand Down
4 changes: 0 additions & 4 deletions client/ui/services/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ type Config struct {
RosenpassEnabled bool `json:"rosenpassEnabled"`
RosenpassPermissive bool `json:"rosenpassPermissive"`
DisableNotifications bool `json:"disableNotifications"`
LazyConnectionEnabled bool `json:"lazyConnectionEnabled"`
BlockInbound bool `json:"blockInbound"`
NetworkMonitor bool `json:"networkMonitor"`
DisableClientRoutes bool `json:"disableClientRoutes"`
Expand Down Expand Up @@ -89,7 +88,6 @@ type SetConfigParams struct {
RosenpassEnabled *bool `json:"rosenpassEnabled,omitempty"`
RosenpassPermissive *bool `json:"rosenpassPermissive,omitempty"`
DisableNotifications *bool `json:"disableNotifications,omitempty"`
LazyConnectionEnabled *bool `json:"lazyConnectionEnabled,omitempty"`
BlockInbound *bool `json:"blockInbound,omitempty"`
NetworkMonitor *bool `json:"networkMonitor,omitempty"`
DisableClientRoutes *bool `json:"disableClientRoutes,omitempty"`
Expand Down Expand Up @@ -140,7 +138,6 @@ func (s *Settings) GetConfig(ctx context.Context, p ConfigParams) (Config, error
RosenpassEnabled: resp.GetRosenpassEnabled(),
RosenpassPermissive: resp.GetRosenpassPermissive(),
DisableNotifications: resp.GetDisableNotifications(),
LazyConnectionEnabled: resp.GetLazyConnectionEnabled(),
BlockInbound: resp.GetBlockInbound(),
NetworkMonitor: resp.GetNetworkMonitor(),
DisableClientRoutes: resp.GetDisableClientRoutes(),
Expand Down Expand Up @@ -176,7 +173,6 @@ func (s *Settings) SetConfig(ctx context.Context, p SetConfigParams) error {
RosenpassEnabled: p.RosenpassEnabled,
RosenpassPermissive: p.RosenpassPermissive,
DisableNotifications: p.DisableNotifications,
LazyConnectionEnabled: p.LazyConnectionEnabled,
BlockInbound: p.BlockInbound,
NetworkMonitor: p.NetworkMonitor,
DisableClientRoutes: p.DisableClientRoutes,
Expand Down
Loading