gluon-web-mesh-vpn-fastd: clarify config of default crypto method (#1502)

This commit is contained in:
Ruben Barkow 2018-08-06 21:36:05 +02:00 committed by Andreas Ziegler
parent f6dee4386c
commit 2b16257896
2 changed files with 5 additions and 2 deletions

View File

@ -32,8 +32,9 @@ increase throughput, although in practice the gain is minimal.
**Site configuration:**
1) Install ``gluon-web-mesh-vpn-fastd`` in ``site.mk``
1) Add the feature ``web-mesh-vpn-fastd`` in ``site.mk``
2) Set ``mesh_vpn.fastd.configurable = true`` in ``site.conf``
3) Optionally add ``null`` to the ``mesh_vpn.fastd.methods`` table if you want "Performance mode" as default (not recommended)
**Gateway configuration:**
@ -54,4 +55,3 @@ socket can be interrogated, after installing for example `socat`.
opkg update
opkg install socat
socat - UNIX-CONNECT:/var/run/fastd.mesh_vpn.socket

View File

@ -11,6 +11,7 @@ mode.template = "mesh-vpn-fastd"
local methods = uci:get('fastd', 'mesh_vpn', 'method')
if util.contains(methods, 'null') then
-- performance mode will only be used as default, if it is present in site.mesh_vpn.fastd.methods
mode.default = 'performance'
else
mode.default = 'security'
@ -19,6 +20,8 @@ end
function mode:write(data)
local site = require 'gluon.site'
-- methods will be recreated and filled with the original values from site.mesh_vpn.fastd.methods
-- if performance mode was selected, and the method 'null' was not present in the original table, it will be added
local methods = {}
if data == 'performance' then
table.insert(methods, 'null')