Commit graph

57 commits

Author SHA1 Message Date
Jo-Philipp Wich
18b1130711 luci-app-openvpn: fix stray uci permission warning
The OpenVPN file view uses a dummy Map() instance to render the breadcrumb
template which triggers a uci permission error since the view is being
rendered by a form() action which does not set up the expected permission
flags. CBI Map() instances should only be used for cbi() dispatch targets.

Solve the issue by appending the breadcrumb template directly to the
SimpleForm() instance and by removing the redundant dummy Map() instance.

Fixes: #4370
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-01-25 22:43:17 +01:00
Florian Eckert
5160f1c6ba luci-app-openvpn: add security hint for compress
See https://community.openvpn.net/openvpn/wiki/VORACLE

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-03-03 10:13:56 +01:00
Florian Eckert
33db8d9e7a luci-app-openvpn: add compress option stub-v2
See https://community.openvpn.net/openvpn/wiki/VORACLE

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-03-03 10:13:56 +01:00
Florian Eckert
3691c65d1a luci-app-openvpn: add security hint for comp-lzo
See https://community.openvpn.net/openvpn/wiki/VORACLE

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-03-03 10:13:56 +01:00
Martin Schiller
c029f2dc09 luci-app-openvpn: update tls_cipher list
Update the list of selectable TLS cipher suites.

The previous list consisted mostly of unsupported ciphers and the IANA
names should be used.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2020-05-05 11:05:41 +02:00
Dirk Brenken
f32978674b
luci-app-openvpn: parse extended 'remote' syntax as well
* parse special 'remote' syntax (remote <host> <port> <proto> as well
  (removed in last commit by accident)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2020-04-18 09:31:39 +02:00
Dirk Brenken
d4fef2cc64
luci-app-openvpn: relax port/protocol parser
* relax port/protocol parser for ovpn files
* limit protocol to 'udp' or 'tcp'

Signed-off-by: Dirk Brenken <dev@brenken.org>
2020-04-18 08:57:36 +02:00
Anton Kikin
cac2248bcf luci-app-openvpn: fix advanced mode page switcher translation
Translation of page titles in the advanced configuration mode is done
in such a way that the strings to be translated are not visible for
'i18n-scan.pl' script. This commit fixes this and makes page titles
visible for the 'i18n-scan.pl'.

Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2020-01-25 01:14:12 +03:00
Jo-Philipp Wich
cc01770fa1 luci-app-openvpn: allow and restrict file uploads to /etc/openvpn/
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-20 19:40:46 +01:00
Balázs Úr
947e024ff0 luci-app-openvpn: fix typo
Signed-off-by: Balázs Úr <balazs@urbalazs.hu>
2020-01-17 23:57:09 +01:00
Balázs Úr
fb2589cc04 luci-app-openvpn: fix typos
Signed-off-by: Balázs Úr <balazs@urbalazs.hu>
2020-01-09 00:32:47 +01:00
Jo-Philipp Wich
6496ed88a6 luci-app-openvpn: do not make "remote" option dependent on client mode
Fixes: #3279
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-08 16:03:09 +01:00
Florian Eckert
18037444b5 luci-app-openvpn: add missing proto param for ipv6
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-10-14 10:44:25 +02:00
Florian Eckert
a63b465adb luci-app-openvpn: move to new vpn menu section
Move the app openvpn to the new vpn menu section.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-08-06 16:22:44 +02:00
Florian Eckert
6a847fea04 luci-app-openvpn: use DynamicList for tls_ciphersuites
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-08-02 15:49:00 +02:00
Florian Eckert
7880a9276b luci-app-openvpn: use DynamicList for tls_cipher
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-08-02 15:48:56 +02:00
Martin Schiller
9f22543b5b luci-app-openvpn: add new tls_ciphersuites option
This is used to configure ciphers for TLS 1.3 or newer.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2019-07-18 12:38:06 +02:00
jose1711
c48fccc310 luci-app-openvpn: fix client_disconnect OpenVPN option
This option is not a flag.

Signed-off-by: Jose Riha <jose1711@gmail.com>
[Changed commit message and add missing Singed-off-by]
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-07-17 09:32:09 +02:00
Martin Schiller
ab234df3df luci-app-openvpn: re-add options comp_lzo and comp_noadapt
* re-add config option comp_lzo according to
  openwrt/openwrt@3850b41
* re-add config option comp_noadapt. This has never been removed
  from openwrt

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2018-12-13 08:08:24 +01:00
Florian Eckert
34482625ec luci-app-openvpn: add missing ncp_ciphers option
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-27 10:09:57 +01:00
Florian Eckert
78cc310cf4 luci-app-openvpn: add missing verify_client_cert option
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-27 10:09:57 +01:00
Florian Eckert
4fd92b1f52 luci-app-openvpn: add missing compress option
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-27 10:05:28 +01:00
Florian Eckert
6f90546bd8 luci-app-openvpn: predefining the dropdown for the cipher option
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-27 10:05:28 +01:00
Florian Eckert
8911f4f87b luci-app-openvpn: add missing ncp_disable option
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-27 10:05:28 +01:00
Florian Eckert
0f3e1a81e9 luci-app-openvpn: add missing allow_recursive_routing option
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-27 10:05:28 +01:00
Dirk Brenken
0f8e36f214 luci-app-openvpn: "final" changeset
* add 'auth-user-pass' edit section in file mode (see screenshot)
* add port & protocol detection in file mode (see screenshot)
* don't mix file & normal edit modes any longer
* add CC compatibility fix (for turris devices)
* fix/refine JS instance name filter
* remove needless CSS rules
* unlink ovpn/auth files on section removal
* commit changes instantly (Add/Upload/Delete)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-11-26 13:19:52 +01:00
Florian Eckert
1987b38011 luci-app-openvpn: do not show all boolean option by default
If a new instance is edit then all boolean option are shown on the LuCI.
This is confusing. To fix this hide all boolean ellements on the config
page which are not enabled by default. They must be add first.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-22 11:29:44 +01:00
Florian Eckert
1986dc2751 luci-app-openvpn: On apply/save redirect to OpenVPN overview page
This change will redirect on apply/save to the OpenVPN overview page.
This is the default behaviour on LuCI.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-22 08:18:17 +01:00
Florian Eckert
9881ad5a6b luci-app-openvpn: sync code style with openvpn-advanced
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-22 08:18:14 +01:00
Florian Eckert
95f02e9d84 luci-app-openvpn: fix whitespaces in openvpn-basic
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-11-22 08:18:12 +01:00
Dirk Brenken
e222003f5d luci-app-openvpn: more changes & fixes
* fix possible exception in template based ovpn creation
* remove needless shellquote function in controller,
  the filename will be checked on client side with JS
* enhance FileUpload behaviour in basic/advanced mode:
  - change "auth_user_pass" to FileUpload
  - cfg entries (even with default values) will be shown
  - existing entries are now removable (incl. file unlink),
    simply clear the appropriate textbox
* change "key_direction" option to boolean ListValue
* add "config" option to basic/advanced edit,
  to make it possible to change the upload path in LuCI

Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-11-21 15:21:37 +01:00
Dirk Brenken
0b04912f8d luci-app-openvpn: add ovpn upload support & more
* add the ability to upload ovpn files directly,
  incl. appropriate uci entry in openvpn config
* add the ability to edit ovpn files directly ('file' mode),
  beside the 'basic' and 'advanced' modes for normal setups
* client side checks to validate instance name & template selection,
  incl. online error reporting
* automatically remove non-ascii characters & windows line endings
  from transfered ovpn file
* change from after_commit to after_apply hook
* remove misleading default values for Port & Protocol in Overview

Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-10-23 21:17:22 +02:00
Dirk Brenken
c2656a7220 luci-app-openvpn: remove obsolete config options
* remove obsolete config options according to
  openwrt/openwrt@89b8ba9, fix for #2135
* whitespace/intendation fixes
* replace fieldset leftover with div
* fix finally recipe options transfer to regular config with "Add"

Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-09-17 14:22:14 +02:00
Dirk Brenken
1eb3f734c7 luci-app-openvpn: fix template based config creation
* minimal fix to bring back openvpn config creation based on
openvpn_recipes template, fix for #2146

Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-09-14 08:57:06 +02:00
Jo-Philipp Wich
c181699bf7
Merge pull request #1481 from TDT-AG/luci-app-openvpn-fixes
luci-app-openvpn: several fixes
2018-05-25 07:22:27 +02:00
Jo-Philipp Wich
9f327a3d02 luci-app-openvpn: properly parse low PIDs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-13 14:45:28 +02:00
Jo-Philipp Wich
83a59dc0f7 luci-app-openvpn: quote grep expression in getPID()
Fixes c0d9c4f3c ("treewide: filter shell arguments through shellquote() where applicable")

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-06 23:38:38 +02:00
Jo-Philipp Wich
c0d9c4f3ce treewide: filter shell arguments through shellquote() where applicable
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05 09:37:43 +02:00
Martin Schiller
e88a95ca29 luci-app-openvpn: run '/etc/init.d/openvpn reload' after commit
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2018-02-15 06:14:24 +01:00
Martin Schiller
7c643558a3 luci-app-openvpn: fix validity check for new instance input field
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2018-02-15 06:14:24 +01:00
Martin Schiller
bab9c12e20 luci-app-openvpn: use initscript to stop instances
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2018-02-15 06:14:24 +01:00
Vladimir Ulrich
bd7eff9a63 [luci-app-openvpn] Added support for tls-crypt option.
Closes #1340

Signed-off-by: Vladimir Ulrich <admin@evl.su>
2017-10-10 02:40:21 +03:00
Florian Eckert
ffcd81aa15 luci-app-openvpn: fix proto param selection in basic
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2017-05-04 14:01:03 +02:00
Vladimir Ulrich
f45d8767a6 [luci-app-openvpn] Fixed ivalid checks for parameters in VPN tab.
closes #887

Signed-off-by: Vladimir Ulrich <admin@evl.su>
2017-04-25 19:40:41 +03:00
Martin Schiller
91daed4530 luci-app-openvpn: Fix default value for remote_random flag
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2017-04-12 06:26:10 +02:00
Florian Eckert
82885cd9ed luci-app-openvpn: fix prettify refactoring
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2017-03-14 09:11:45 +01:00
Florian Eckert
b92ac48bc8 luci-app-openvpn: prettify openvpn-advanced parameter set
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2017-03-09 16:15:36 +01:00
Vladimir Ulrich
52de960bb5 luci-app-openvpn: various fixes and optimizations
Closes #628 as suggestion was implemented and tested.
Added PID handling function (Fixes https://dev.openwrt.org/ticket/21506).

Signed-off-by: Vladimir Ulrich <admin@evl.su>
2016-06-28 16:40:23 +02:00
Vladimir Ulrich
af5c9d4fb4 [luci-app-openvpn] Optimized code and added suggested fix from #650
Signed-off-by: Vladimir Ulrich <admin@evl.su>
2016-03-25 19:28:35 +03:00
Jo-Philipp Wich
23df4ffaf7 Merge pull request #437 from fkooman/issue-436
introduce tls_version_min and tls_version_max, add key_direction and …
2015-12-17 02:37:55 +01:00