linux: allow %d anywhere in the tun.dev template

This commit is contained in:
JackDoan
2025-10-02 16:18:34 -05:00
parent c1eea118f4
commit 57e1a9b6af
3 changed files with 170 additions and 5 deletions
+4
View File
@@ -242,6 +242,10 @@ tun:
# When tun is disabled, a lighthouse can be started without a local tun interface (and therefore without root)
disabled: false
# Name of the device. If not set, a default will be chosen by the OS.
# For Linux: a single `%d` anywhere in the name is treated as a template and replaced with the
# lowest number that yields an unused device name (e.g. `nebula%d` becomes `nebula0`, then `nebula1`, and so on, `neb%dprod` becomes `neb0prod`).
# Only on Linux: `nebula%d` is the default if tun.dev is unset.
# The resulting name must be shorter than the kernel limit of 16 characters.
# For macOS: if set, must be in the form `utun[0-9]+`.
# For NetBSD: Required to be set, must be in the form `tun[0-9]+`
dev: nebula1