luci-app-openvpn: add possibility to set param "compress" without algorithm
authorMartin Schiller <[email protected]>
Mon, 30 Mar 2020 08:16:11 +0000 (10:16 +0200)
committerMartin Schiller <[email protected]>
Thu, 3 Nov 2022 08:47:22 +0000 (09:47 +0100)
In some situations you need to set the compress param without an
algorithm. Compression will be turned off, but the packet framing for
compression will still be enabled, allowing a different setting to be
pushed later.

As it is not possible to have options with optional values at the
moment, I've introduced a pseudo value "frames_only" which will be
removed in the init script.

Signed-off-by: Martin Schiller <[email protected]>
applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua

index c8a83d21f7683554a54c1dd961539569e8eda182..03ce38e9d2457f776d97952fe3035794db5a4a20 100644 (file)
@@ -161,7 +161,7 @@ local knownParams = {
                        translate("Policy level over usage of external programs and scripts") },
                { ListValue,
                        "compress",
-                       { "lzo", "lz4", "stub-v2"},
+                       { "frames_only", "lzo", "lz4", "stub-v2"},
                        translate("Security recommendation: It is recommended to not enable compression and set this parameter to `stub-v2`") },
        } },