# SPDX-FileCopyrightText: 2023-2025 Steffen Vogel # SPDX-License-Identifier: Apache-2.0 # yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema --- $schema: https://json-schema.org/draft/2020-12/schema title: Schema of cunīcu configuration file allOf: - $ref: "#/$defs/GlobalSettings" - $ref: "#/$defs/InterfaceSettings" - type: object properties: interfaces: title: Interface specific settings / overwrites description: | Most of the top-level settings of this configuration file can be customized for specific interfaces. The keys of the 'interfaces' dictionary are [glob(7)](https://manpages.debian.org/bookworm/manpages/glob.7.en.html) patterns which will be matched against the interface names. Settings are overlayed in the order in which the keys are provided in the interface map. Multiple patterns are supported and evaluated in the order they a defined in the configuration file. Keys which are not a [glob(7)](https://manpages.debian.org/bookworm/manpages/glob.7.en.html) pattern, will be created as new interfaces if they do not exist already in the system. type: object additionalProperties: $ref: "#/$defs/InterfaceSettings" $defs: Duration: type: string description: | Parsed by [`time.ParseDuration`](https://pkg.go.dev/time#ParseDuration). pattern: "(\\d+(\\.\\d)?(ns|us|µs|ms|s|m|h))+" examples: - 300ms - 1.5h - 2h45m Base64Key: type: string pattern: "[^-A-Za-z0-9+/=]|=[^=]|={3,}$" examples: - zu86NBVsWOU3cx4UKOQ6MgNj3gv8GXsV9ATzSemdqlI= IPv4Address: title: IPv4 Address type: string format: ipv4 examples: - 1.1.1.1 IPv6Address: title: IPv6 Address type: string format: ipv6 examples: - fe80::760f:aa34:275e:57cd%utun1 Address: title: IP Address oneOf: - "#/$defs/IPv4Address" - "#/$defs/IPv6Address" CIDR: title: IPv4 / IPv6 Prefix type: string examples: - fc2f:9a4d::/32 - 2001:DB8::/32 - 10.237.0.0/16 - 192.0.2.0/24 GlobalSettings: type: object properties: watch_interval: type: string title: Watch Interval description: | An interval at which cunīcu will periodically check for added, removed or modified WireGuard interfaces. $ref: "#/$defs/Duration" backends: title: Signaling backends description: | These backends are used for exchanging control-plane messages between the peers. Examples of the exchanged information are ICE candidates or peer information. type: array items: type: string format: uri default: - grpc://signal.cunicu.li:443 rpc: title: RPC Settings description: | Settings for controlling cunīcu via the CLI. type: object properties: socket: title: Unix Domain Socket Path description: | Path to a Unix socket for management and monitoring of the cunīcu daemon. type: string default: /run/cunicu.sock wait: description: | Start of cunīcu daemon will block until its unblocked via the control socket. Mostly useful for test automation. type: boolean default: false log: title: Logging Settings description: | Settings of logging system. type: object properties: banner: title: Banner description: | Show a banner during start of daemon. type: boolean default: true color: title: Colorize log output description: | Use one of: - `auto` only colorize log output on TTYs - `never` never colorize log output - `always` always colorize log output type: string enum: - auto - never - always file: title: Log File description: A path to a custom log file. type: string examples: - /var/log/cunicu.log level: title: The standard log level type: string default: info enum: - debug2 - debug1 - debug - info - warn - error - fatal - panic rules: title: Additional logging rules description: | Rule syntax: RULE: LEVELS:NAMESPACES LEVELS: LEVEL[,LEVELS] LEVEL: one of - SEVERITY for matching all levels with equal or higher severity - >SEVERITY for matching all levels with higher severity - =SEVERITY for matching all levels with equal severity -