system

package
v0.59.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: BSD-3-Clause Imports: 21 Imported by: 3

Documentation

Index

Constants

View Source
const DeviceNameCtxKey = "deviceName"

DeviceNameCtxKey context key for device name

View Source
const OsNameCtxKey = "OsName"

OsNameCtxKey context key for operating system name

View Source
const OsVersionCtxKey = "OsVersion"

OsVersionCtxKey context key for operating system version

View Source
const UiVersionCtxKey = "user-agent"

UiVersionCtxKey context key for user UI version

Variables

This section is empty.

Functions

func UpdateStaticInfoAsync added in v0.59.0

func UpdateStaticInfoAsync()

UpdateStaticInfoAsync is a no-op on JS as there is no static info to update

Types

type Environment added in v0.26.0

type Environment struct {
	Cloud    string
	Platform string
}

type File added in v0.28.0

type File struct {
	Path             string
	Exist            bool
	ProcessIsRunning bool
}

type Info

type Info struct {
	GoOS               string
	Kernel             string
	Platform           string
	OS                 string
	OSVersion          string
	Hostname           string
	CPUs               int
	NetbirdVersion     string
	UIVersion          string
	KernelVersion      string
	NetworkAddresses   []NetworkAddress
	SystemSerialNumber string
	SystemProductName  string
	SystemManufacturer string
	Environment        Environment
	Files              []File // for posture checks

	RosenpassEnabled    bool
	RosenpassPermissive bool
	ServerSSHAllowed    bool

	DisableClientRoutes bool
	DisableServerRoutes bool
	DisableDNS          bool
	DisableFirewall     bool
	BlockLANAccess      bool
	BlockInbound        bool

	LazyConnectionEnabled bool
}

Info is an object that contains machine information Most of the code is taken from https://github.com/matishsiao/goInfo

func GetInfo added in v0.59.0

func GetInfo(_ context.Context) *Info

GetInfo retrieves system information for WASM environment

func GetInfoWithChecks added in v0.28.0

func GetInfoWithChecks(ctx context.Context, checks []*proto.Checks) (*Info, error)

GetInfoWithChecks retrieves and parses the system information with applied checks.

func (*Info) SetFlags added in v0.36.0

func (i *Info) SetFlags(
	rosenpassEnabled, rosenpassPermissive bool,
	serverSSHAllowed *bool,
	disableClientRoutes, disableServerRoutes,
	disableDNS, disableFirewall, blockLANAccess, blockInbound, lazyConnectionEnabled bool,
)

type NetworkAddress added in v0.26.0

type NetworkAddress struct {
	NetIP netip.Prefix
	Mac   string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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