policyfile

package
v0.40.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 6 Imported by: 0

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.

Jump to

Keyboard shortcuts

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