Converted router configuration file from .conf to JSON.
This commit is contained in:
1 parent
c423ea9347
commit
b18947ed9b
18 files changed
+285
-396
No files matched your search
@@ -28,7 +28,7 @@ Description: Linux VPN router with IPSec, road-warrior and WireGuard support
|
||||
optional WireGuard, and the routing, NAT, MSS clamping and firewall rules a
|
||||
router needs. Nothing in the package is specific to a cloud provider.
|
||||
.
|
||||
Settings live in /etc/vpn-router/vpn-router.conf, which is created on first
|
||||
Settings live in /etc/vpn-router/vpn-router.json, which is created on first
|
||||
install and owned by the administrator afterwards. Editing it and restarting
|
||||
vpn-router-setup applies the change; the same service reconciles the system
|
||||
at every boot. It is built on two inputs, the external and internal interface
|
||||
|
||||
@@ -6,4 +6,4 @@ src/usr/lib/vpn-router/setup usr/lib/vpn-router/
|
||||
src/usr/lib/vpn-router/generate-config usr/lib/vpn-router/
|
||||
src/usr/lib/vpn-router/vpnrouter_platforms/*.py usr/lib/vpn-router/vpnrouter_platforms/
|
||||
src/usr/share/vpn-router/templates/* usr/share/vpn-router/templates/
|
||||
src/usr/share/doc/vpn-router/vpn-router.conf.example usr/share/doc/vpn-router/
|
||||
src/usr/share/doc/vpn-router/vpn-router.json.example usr/share/doc/vpn-router/
|
||||
@@ -42,9 +42,9 @@ case "$1" in
|
||||
# This is what makes dpkg-reconfigure apply without destroying edits.
|
||||
CANDIDATE="$(mktemp)"
|
||||
/usr/lib/vpn-router/generate-config "$CANDIDATE"
|
||||
ucf --three-way --debconf-ok "$CANDIDATE" /etc/vpn-router/vpn-router.conf
|
||||
ucfr vpn-router /etc/vpn-router/vpn-router.conf
|
||||
chmod 0600 /etc/vpn-router/vpn-router.conf
|
||||
ucf --three-way --debconf-ok "$CANDIDATE" /etc/vpn-router/vpn-router.json
|
||||
ucfr vpn-router /etc/vpn-router/vpn-router.json
|
||||
chmod 0600 /etc/vpn-router/vpn-router.json
|
||||
rm -f "$CANDIDATE"
|
||||
|
||||
# The key now lives in the configuration file; do not keep a copy. An
|
||||
|
||||
@@ -37,17 +37,17 @@ case "$1" in
|
||||
# Let ucf forget the file before it is removed, or a reinstall finds a
|
||||
# stale hash and declines to lay the file down again.
|
||||
if command -v ucf >/dev/null 2>&1; then
|
||||
ucf --purge /etc/vpn-router/vpn-router.conf
|
||||
ucf --purge /etc/vpn-router/vpn-router.json
|
||||
fi
|
||||
if command -v ucfr >/dev/null 2>&1; then
|
||||
ucfr --purge vpn-router /etc/vpn-router/vpn-router.conf
|
||||
ucfr --purge vpn-router /etc/vpn-router/vpn-router.json
|
||||
fi
|
||||
|
||||
rm -f /etc/swanctl/conf.d/remote-site.conf \
|
||||
/etc/swanctl/conf.d/road-warrior.conf \
|
||||
/etc/systemd/resolved.conf.d/p2s-forwarder.conf \
|
||||
/etc/wireguard/wg0.conf \
|
||||
/etc/vpn-router/vpn-router.conf
|
||||
/etc/vpn-router/vpn-router.json
|
||||
|
||||
# Key material is not package state: /etc/vpn-router/pki, the WireGuard
|
||||
# key pair and everything under /etc/swanctl are left in place.
|
||||
|
||||
@@ -9,7 +9,7 @@ Description: Platform:
|
||||
none defers configuration entirely: the package installs its files and
|
||||
changes nothing on the machine. Choose it when the router will be configured
|
||||
later by hand or by a configuration-management tool, then set the platform in
|
||||
/etc/vpn-router/vpn-router.conf when you are ready.
|
||||
/etc/vpn-router/vpn-router.json when you are ready.
|
||||
.
|
||||
generic configures the router with no platform-specific additions.
|
||||
|
||||
@@ -113,8 +113,8 @@ Template: vpn-router/psk
|
||||
Type: password
|
||||
Description: Pre-shared key (PSK):
|
||||
Pre-shared key for the site-to-site IKEv2 tunnel. Must match the value
|
||||
configured on the remote peer. Stored base64-encoded in the configuration
|
||||
file and cleared from the debconf database after installation.
|
||||
configured on the remote peer. Stored in the configuration file and cleared
|
||||
from the debconf database after installation.
|
||||
|
||||
Template: vpn-router/p2s_enabled
|
||||
Type: boolean
|
||||
|
||||
Reference in new issue
Block a user