[client] Add more advanced settings to UI (#3941)

This commit is contained in:
Viktor Liu
2025-06-10 14:27:06 +02:00
committed by GitHub
parent 6127a01196
commit e002a2e6e8
5 changed files with 749 additions and 577 deletions

View File

@ -750,7 +750,6 @@ func (s *Server) GetConfig(_ context.Context, _ *proto.GetConfigRequest) (*proto
if preSharedKey != "" {
preSharedKey = "**********"
}
}
disableNotifications := true
@ -758,6 +757,16 @@ func (s *Server) GetConfig(_ context.Context, _ *proto.GetConfigRequest) (*proto
disableNotifications = *s.config.DisableNotifications
}
networkMonitor := false
if s.config.NetworkMonitor != nil {
networkMonitor = *s.config.NetworkMonitor
}
disableDNS := s.config.DisableDNS
disableClientRoutes := s.config.DisableClientRoutes
disableServerRoutes := s.config.DisableServerRoutes
blockLANAccess := s.config.BlockLANAccess
return &proto.GetConfigResponse{
ManagementUrl: managementURL,
ConfigFile: s.latestConfigInput.ConfigPath,
@ -773,6 +782,11 @@ func (s *Server) GetConfig(_ context.Context, _ *proto.GetConfigRequest) (*proto
LazyConnectionEnabled: s.config.LazyConnectionEnabled,
BlockInbound: s.config.BlockInbound,
DisableNotifications: disableNotifications,
NetworkMonitor: networkMonitor,
DisableDns: disableDNS,
DisableClientRoutes: disableClientRoutes,
DisableServerRoutes: disableServerRoutes,
BlockLanAccess: blockLANAccess,
}, nil
}