configuration

package
v0.0.0-...-b318bcb Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSecrets

func LoadSecrets(preSharedKeyDirectory string) ([][]byte, error)

LoadSecrets processes all files within the specified directory and attempts to convert the file contents to secrets to by used by hypd

Types

type HypdConfiguration

type HypdConfiguration struct {
	NetworkInterface      string `json:"networkInterface"`      // The network interface that the eBPF program attaches to
	PreSharedKeyDirectory string `json:"preSharedKeyDirectory"` // hypd will load all *.secret files from this directory
	SuccessAction         string `json:"successAction"`         // The action to take for a successful knock, each argument is a separate string
	TimeoutSeconds        int    `json:"timeoutSeconds"`        // If > 0, once a knock sequence has been successful this value will count down and when it reaches 0, it will perform the TimeoutAction on the client
	TimeoutAction         string `json:"timeoutAction"`         // The action to take after TimeoutSeconds has elapsed.  only applicable if TimeoutSeconds is > 0, each argument is a separate string
}

func DefaultConfig

func DefaultConfig() *HypdConfiguration

func LoadConfiguration

func LoadConfiguration(configFilePath string) (*HypdConfiguration, error)

LoadConfiguration opens and parses the configuration file into a HypdConfiguration struct If a configFilePath is not specified, it will search in common locations

Jump to

Keyboard shortcuts

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