feature: vpn-config-edit shows and changes the router's configuration.
Release / release (push) Successful in 19s

This commit is contained in:
slawek committed 2026-10-25 13:29:12 +01:00
1 parent 650896131d
commit 83c1c50d8d
4 files changed
+161

No files matched your search

+18
View File
@@ -240,6 +240,24 @@ vpn-router-setup` applies a changed configuration while Docker runs. With `docke
`on`, the service fails when Docker is not installed or its daemon is not running; with
`off` it removes the rules.
## Editing the configuration
`vpn-config-edit`, run as root, shows and changes `/etc/vpn-router/vpn-router.json`:
```sh
vpn-config-edit show
vpn-config-edit set web.status_content standard
vpn-config-edit set web.port 7082
vpn-config-edit set web.trusted_proxies 127.0.0.1,10.0.0.4
```
`show` prints the file as indented JSON and does not change it. `set` takes a setting as
`section.option` and converts the value to the setting's type: a whole number, `true` or
`false`, a list separated by commas (an empty value is an empty list), or a string; an unknown
setting is refused. It checks the whole configuration as `vpn-router-setup` does, and only then
writes the file, indented, with mode 0600, and reminds that `vpn-router-setup` applies it. A
refused request exits with status 2, any other failure with 1.
## Applying changes
```sh