Skip to content
Snippets Groups Projects
Commit 2b162578 authored by Ruben Barkow's avatar Ruben Barkow Committed by Andreas Ziegler
Browse files

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

parent f6dee438
No related branches found
No related tags found
No related merge requests found
...@@ -32,8 +32,9 @@ increase throughput, although in practice the gain is minimal. ...@@ -32,8 +32,9 @@ increase throughput, although in practice the gain is minimal.
**Site configuration:** **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`` 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:** **Gateway configuration:**
...@@ -54,4 +55,3 @@ socket can be interrogated, after installing for example `socat`. ...@@ -54,4 +55,3 @@ socket can be interrogated, after installing for example `socat`.
opkg update opkg update
opkg install socat opkg install socat
socat - UNIX-CONNECT:/var/run/fastd.mesh_vpn.socket socat - UNIX-CONNECT:/var/run/fastd.mesh_vpn.socket
...@@ -11,6 +11,7 @@ mode.template = "mesh-vpn-fastd" ...@@ -11,6 +11,7 @@ mode.template = "mesh-vpn-fastd"
local methods = uci:get('fastd', 'mesh_vpn', 'method') local methods = uci:get('fastd', 'mesh_vpn', 'method')
if util.contains(methods, 'null') then 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' mode.default = 'performance'
else else
mode.default = 'security' mode.default = 'security'
...@@ -19,6 +20,8 @@ end ...@@ -19,6 +20,8 @@ end
function mode:write(data) function mode:write(data)
local site = require 'gluon.site' 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 = {} local methods = {}
if data == 'performance' then if data == 'performance' then
table.insert(methods, 'null') table.insert(methods, 'null')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment