agent

package
v0.0.0-...-16aca47 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: GPL-2.0, GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AgentID            = "UNSET"
	SecretHex          = "UNSET"
	ServerURL          = "UNSET"
	CertFingerprintHex = "UNSET"
	SleepSecondsStr    = "30"
	DNSDomainStr       = ""
)

These vars are injected at build time via -ldflags. Defaults are obviously invalid to fail fast if not injected.

Functions

func Run

func Run(cfg *Config)

Run starts the beacon loop. It blocks until a kill task is received or the process exits.

Types

type Config

type Config struct {
	AgentID         string
	Secret          []byte
	ServerURL       string
	CertFingerprint []byte
	SleepSeconds    int
	DNSDomain       string
}

Config holds the decoded runtime config for the agent.

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig decodes the ldflags-injected hex values into a Config. Returns an error if any required value is missing or malformed.

Jump to

Keyboard shortcuts

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