Documentation
¶
Overview ¶
Package policyfile loads a netsecurity network policy from a TOML file. It is separate from netsecurity so the network libraries, which all import netsecurity, do not link a TOML parser: only an application that reads policy files (such as the scriptling CLI) imports this package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func LoadConfig(path string) (*netsecurity.Config, error)
LoadConfig reads a TOML policy file. Every key is optional, for example:
https_only = true allow_hosts = ["api.example.com", ".internal.corp"] allow_cidrs = ["10.1.0.0/16"] dns_servers = ["1.1.1.1", "8.8.8.8:53"] client_timeout = "30s"
The file must parse and compile: an invalid policy is an error, never an open policy.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.