config

package
v0.0.8-beta Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USAGE_EAMPLES = `` /* 403-byte string literal not displayed */

	DEFAULT_E2E_CIPHER = "SRP-AES-GCM-256-E2E (Prime: 4096)"
)

Variables

View Source
var (
	ForwardAddrRgx = regexp.MustCompile(`([0-9]{1,5}:|)(?:[0-9]{1,3}\.){3}[0-9]{1,3}:[0-9]{1,5}`)
	Version        = "?"
)

Functions

func HelpPrompt

func HelpPrompt(options kong.HelpOptions, ctx *kong.Context) error

Types

type Options

type Options struct {
	Secret          string   `help:"Secret (e.g. password)." name:"secret" short:"s"`
	Execute         string   `help:"Execute command [e.g. \"bash -il\" or \"cmd.exe\"]" name:"exec" short:"e"`
	ForwardAddr     string   `help:"IP:PORT for traffic forwarding." name:"forward" short:"f"`
	SocksAddr       string   `help:"User socks proxy address for connecting QSRN." name:"socks" short:"x"`
	CertFingerprint string   `help:"Hex encoded TLS certificate fingerprint for validation." name:"cert-fp"`
	ProbeInterval   int      `help:"Probe interval for connecting QSRN." name:"probe" short:"n" default:"5"`
	DisableEnc      bool     `help:"Disable all encryption." name:"plain" short:"C"`
	End2End         bool     `help:"Use E2E encryption. (default:true)" name:"e2e" default:"true"`
	Interactive     bool     `help:"Execute with a PTY shell." name:"interactive" short:"i"`
	Listen          bool     `help:"Server mode. (listen for connections)" name:"listen" short:"l"`
	RandomSecret    bool     `help:"Generate a Secret. (random)" name:"generate" short:"g"`
	CertPinning     bool     `help:"Enable certificate pinning on TLS connections." name:"pin" short:"K"`
	Quiet           bool     `help:"Quiet mode. (no stdout)" name:"quiet" short:"q"`
	UseTor          bool     `help:"Use TOR for connecting QSRN." name:"tor" short:"T"`
	GenerateQR      bool     `help:"Generate a QR code with given stdin and print on the terminal." name:"qr"`
	Verbose         bool     `help:"Verbose mode." name:"verbose" short:"v"`
	InPipe          *os.File `kong:"-"`
	OutPipe         *os.File `kong:"-"`
	Version         kong.VersionFlag
}

Main config struct for parsing the TOML file

func ConfigureOptions

func ConfigureOptions() (*Options, error)

ConfigureOptions accepts a flag set and augments it with agentgo-server specific flags. On success, an options structure is returned configured based on the selected flags.

func (*Options) IsPiped

func (opts *Options) IsPiped() bool

func (*Options) Summarize

func (opts *Options) Summarize()

Jump to

Keyboard shortcuts

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