deploy

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSecretHostname

func GenerateSecretHostname(baseDomain string) string

GenerateSecretHostname produces a random subdomain like "a3f9c2.mgmt.attacker.com".

Types

type Config added in v0.3.0

type Config struct {
	// SSH connection
	Host       string // e.g. "203.0.113.5" or "203.0.113.5:22"
	SSHUser    string
	SSHKeyPath string // path to private key file on the operator's machine

	// miraged config values written to the remote config file
	Domain       string
	ExternalIPv4 string
	HTTPSPort    int
	DNSPort      int
	DataDir      string // data directory on remote host

	// Remote paths
	RemoteBinaryPath string
	RemoteConfigDir  string

	// Local binary to upload (defaults to the running binary if empty)
	LocalBinaryPath string

	// SecretHostname is the Host header value that routes traffic to the
	// management API. It prevents casual discovery of the management endpoint
	// via DNS enumeration. If empty, the CLI auto-generates one.
	SecretHostname string

	// Force deployment even if miraged is already running.
	Force bool
}

Config holds all parameters needed to provision a remote miraged instance.

type Result added in v0.3.0

type Result struct {
	SecretHostname string // the API secret hostname on the remote server
	StatusURL      string // https://<SecretHostname>/api/status
}

Result contains the outcomes of a successful deployment.

type Service added in v0.3.0

type Service struct {
	// Progress is called after each step completes. May be nil.
	Progress func(step int, total int, name string)
}

Service provisions remote miraged instances over SSH.

func (*Service) Deploy added in v0.3.0

func (s *Service) Deploy(ctx context.Context, cfg Config) (*Result, error)

Deploy executes the full provisioning sequence against the remote host described by cfg. It returns a Result on success or a descriptive error on any step failure.

Jump to

Keyboard shortcuts

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