server

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2025 License: BSD-3-Clause Imports: 52 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrServiceNotUp = errors.New("service is not up")

Functions

func ParseLogLevel

func ParseLogLevel(level string) proto.LogLevel

Types

type Server

type Server struct {
	proto.UnimplementedDaemonServiceServer
	// contains filtered or unexported fields
}

Server for service control.

func New

func New(ctx context.Context, logFile string, configFile string, profilesDisabled bool, updateSettingsDisabled bool) *Server

New server instance constructor.

func (*Server) AddProfile

AddProfile adds a new profile to the daemon.

func (*Server) CleanState

CleanState handles cleaning of states (performing cleanup operations)

func (*Server) DebugBundle

func (s *Server) DebugBundle(_ context.Context, req *proto.DebugBundleRequest) (resp *proto.DebugBundleResponse, err error)

DebugBundle creates a debug bundle and returns the location.

func (*Server) DeleteState

DeleteState handles deletion of states without cleanup

func (*Server) DeselectNetworks

DeselectNetworks deselects specific networks based on the client request.

func (*Server) Down

Down engine work in the daemon.

func (*Server) ForwardingRules

func (*Server) GetActiveProfile

GetActiveProfile returns the active profile in the daemon.

func (*Server) GetConfig

GetConfig of the daemon.

func (*Server) GetEvents

func (*Server) GetFeatures

GetFeatures returns the features supported by the daemon.

func (*Server) GetLogLevel

GetLogLevel gets the current logging level for the server.

func (*Server) GetPeerSSHHostKey

GetPeerSSHHostKey retrieves SSH host key for a specific peer

func (*Server) ListNetworks

ListNetworks returns a list of all available networks.

func (*Server) ListProfiles

ListProfiles lists all profiles in the daemon.

func (*Server) ListStates

ListStates returns a list of all saved states

func (*Server) Login

func (s *Server) Login(callerCtx context.Context, msg *proto.LoginRequest) (*proto.LoginResponse, error)

Login uses setup key to prepare configuration for the daemon.

func (*Server) Logout

func (*Server) RemoveProfile

RemoveProfile removes a profile from the daemon.

func (*Server) RequestJWTAuth

func (s *Server) RequestJWTAuth(
	ctx context.Context,
	msg *proto.RequestJWTAuthRequest,
) (*proto.RequestJWTAuthResponse, error)

RequestJWTAuth initiates JWT authentication flow for SSH

func (*Server) SelectNetworks

SelectNetworks selects specific networks based on the client request.

func (*Server) SetConfig

func (s *Server) SetConfig(callerCtx context.Context, msg *proto.SetConfigRequest) (*proto.SetConfigResponse, error)

Login uses setup key to prepare configuration for the daemon.

func (*Server) SetLogLevel

SetLogLevel sets the logging level for the server.

func (*Server) SetSyncResponsePersistence

SetSyncResponsePersistence sets the sync response persistence for the server.

func (*Server) Start

func (s *Server) Start() error

func (*Server) Status

func (s *Server) Status(
	ctx context.Context,
	msg *proto.StatusRequest,
) (*proto.StatusResponse, error)

Status returns the daemon status

func (*Server) SubscribeEvents

func (*Server) SwitchProfile

func (s *Server) SwitchProfile(callerCtx context.Context, msg *proto.SwitchProfileRequest) (*proto.SwitchProfileResponse, error)

SwitchProfile switches the active profile in the daemon.

func (*Server) TracePacket

func (*Server) Up

func (s *Server) Up(callerCtx context.Context, msg *proto.UpRequest) (*proto.UpResponse, error)

Up starts engine work in the daemon.

func (*Server) WaitJWTToken

func (s *Server) WaitJWTToken(
	ctx context.Context,
	req *proto.WaitJWTTokenRequest,
) (*proto.WaitJWTTokenResponse, error)

WaitJWTToken waits for JWT authentication completion

func (*Server) WaitSSOLogin

func (s *Server) WaitSSOLogin(callerCtx context.Context, msg *proto.WaitSSOLoginRequest) (*proto.WaitSSOLoginResponse, error)

WaitSSOLogin uses the userCode to validate the TokenInfo and waits for the user to continue with the login on a browser

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL