Commit Graph

402 Commits

Author SHA1 Message Date
Paul Donald b5e99ae0b4 luci-proto-yggdrasil: correctness fixes
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:47 +03:00
Paul Donald 27ab16d89c luci-proto-wireguard: correctness fixes
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:47 +03:00
Paul Donald 04063aed3a luci-proto-vxlan: correctness fixes
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:47 +03:00
Paul Donald 1c26902888 luci-proto-openfortivpn: correctness fixes
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:47 +03:00
Paul Donald ef94e6827f luci-proto-openconnect: correctness fixes
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:46 +03:00
Paul Donald f4b13f51ef luci-proto-modemmanager: correctness fixes
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:46 +03:00
Paul Donald bd19e6b868 luci-proto-mbim: correctness fixes
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:46 +03:00
Paul Donald 46587bb1e8 luci-proto-batman-adv: corrected function name
follow-up to d81b7fa81d

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:45 +03:00
Paul Donald adf5f6d492 luci-proto-ipv6: 6to4 fix
This hasn't knowingly caused problems before now, an indicator
that it goes lesser or unused hitherto.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:44 +03:00
Paul Donald 014c74ce88 luci-proto-xfrm: ensure stub function getDevices() returns null
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:44 +03:00
Paul Donald a78dc22451 luci-proto-openvpn: remove duplicate entries
harmless

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:44 +03:00
Xing-Kai Wang f6bbde5f8a luci-proto-openfortivpn: add realm parameter support
Add a 'realm' field in the advanced tab so users can easily pass this
parameter to the underlying netifd handler.

Signed-off-by: Xing-Kai Wang <my@xkwang.org>
2026-05-25 11:52:27 +03:00
Bastiaan Stougie d81b7fa81d luci-proto-batman-adv: protocol batadv_vlan
A batman-adv VLAN interface has protocol 'batadv_vlan' and allows
configuration of option 'ap_isolation' for a batman-adv VLAN device.

This adds support for configuration of such an interface to LuCI.

Signed-off-by: Bastiaan Stougie <wififreedom2026@protonmail.com>
2026-05-14 17:13:22 +03:00
Paul Donald 47c8d27826 luci-proto-openvpn: align askpass parameter with proto handler
the proto handlers look for `askpass` which is a file type param.

Closes #8630

Signed-off-by: David Perez <d4v1dp3@gmail.com>
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-14 13:34:01 +03:00
Paul Donald 40d4619474 luci-proto-openvpn: add server_ipv6 parameter
Closes #8558

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-04-20 14:57:38 +02:00
Tim Nordell 122839294a luci-proto-modemmanager: fix ACL command injection
The ACL permissions were originally authored to support just a single
set of modem interfaces, at the numbers 0-9.  Eventually this was
adjusted to support from 0 to 999 avoiding command injection.

However, as new commands were added, this was reverted again
unfortunately. Language like "regex" has been used in the commit history
for this ACL, and likely the core of the issue is confusion on how these
are parsed.  These are all parsed [1] with fnmatch(...), and not regex(..).

A future useful change could be for rpcd to set the FNM_EXTMATCH option
for fnmatch(...) to simplify this particular match statement, but that's
not considered here since that's a much broader change that needs a
longer discussion.

[1] https://github.com/openwrt/rpcd/blob/a4a5a298588960638a2e1713eb8fb858e1dbedeb/session.c#L143-L147

Fixes: 54aa70112c ("luci-proto-modemmanager: add status page")
Signed-off-by: Tim Nordell <tnordell@airgain.com>
2026-03-17 08:34:07 +01:00
Paul Donald 8fa4744ebe luci-proto-openvpn: fix permissions and write promise
structure the promise so uci.set functions properly.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-12 17:46:33 +01:00
Paul Donald d08ae634a8 luci-proto-openvpn: sync with proto script updates
make push(_reset) independent of server

The manual notes that push is a legal option in a client
context, i.e. the client can set these also.
Add also push_remove.

fix also the datatype for 'remote' to allow various combos.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-12 05:06:06 +01:00
Paul Donald ec799109e5 luci-proto-wireguard: add download link for peer config
Ease download of the generated config.

Closes #8389

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-05 16:09:43 +01:00
Paul Donald cf718e675c luci-proto-openvpn: create parent directory for config files
To store the configs, the parent directory shall exist first.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-04 18:37:58 +01:00
Florian Eckert 8c2ddb68e1 luci-proto-openvpn: fix formating of openvpn template option
Add missing ',' in new option formating.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-03-03 13:59:39 +01:00
Florian Eckert b7ad8af90b luci-proto-openvpn: format openvpn options
OpenVPN does have many options. To make it manageable, these options
are created by using a generic template. The necessary information for
the template is  defined for each OpenVpn option in a single line.

This is very confusing and has the following disadvantages.

* Difficult to read, as the lines are very long with line breaks.
* A change in the option causes the entire line to be marked as changed.
  This complicates the review process, as it is not immediately apparent
  what has been changed.

The current format offers no advantage during development, as the code
will be minimised later anyway.

Therefore, this commit reformats the OpenVPN template option to make
the individual elements of the template easier to recognise.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-03-03 13:53:51 +01:00
Paul Donald 399b25c07e luci-proto-openvpn: fix literal values for properties
So they do not get coerced to integers.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-02 16:14:19 +01:00
Paul Donald 11b9fafc0d luci-proto-openvpn: fix 'remote' error check
remote can also take [ip|host]/port/proto

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-02 16:01:47 +01:00
Paul Donald 5306e00765 luci-proto-openvpn: add protocol handler
migrate away from the old luci-app lua control system.

See: https://github.com/openwrt/luci/issues/7310

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-22 17:04:25 +01:00
Paul Donald 50a8d5325d luci-base: js linting fixes / ES6 treatment
prevent global variable bleed and reduce size somewhat

-cbi
-network
-protocol/static
-rpc
-tools/widgets
-tools/views
-uci

protocols

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-16 01:42:57 +01:00
Paul Donald b8c049a1ed luci-proto-wireguard: fix i18n compile error
Message contains an embedded URL.
Better move it out of the translatable string

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-03 06:59:25 +01:00
Andy Chiang fb3b96ec65 luci-proto-ppp: add ac_mac and IPv6-PD options
add ac_mac and IPv6-PD options

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-11-11 19:50:30 +01:00
Paul Donald f52d047e2f luci-proto-wireguard: Display times which account for the timezone also
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-28 20:50:51 +01:00
Paul Donald 80a0abb54f luci-proto-wireguard: Hide the QR code parent dialogue button row via styling
Previously, the render code attempted to add the class "hidden" to the button
row, the button row which can have a persistent visibility style applied via CSS
so the "hidden" class attribute was overridden. Set the style.display of the row
instead which now hides the button row.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-28 17:36:53 +01:00
Martin Schiller 87375a5cf0 protocols: l2tp: add option hostname
This adds the possibility to set our own L2TP hostname in the advanced
tab. It's needed if the peer only allows certain hostnames to connect.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2025-10-27 17:54:16 +01:00
Alexander Ivanov f48999cb7a luci-proto-yggdrasil: fix interface selection
Package `yggdrasil` doesn't support network names and aliases.

Signed-off-by: Alexander Ivanov <saiv46.dev@gmail.com>
2025-09-23 20:08:10 +02:00
Arayuki Mago 183ab68aef luci-proto-ipv6: map: allow /128 IPv6 prefix length
IPv6 prefix length is normally valid in the range 0–64.
Additionally, /128 is a special case that needs to be supported.

Signed-off-by: Arayuki Mago <ms@missing233.com>
2025-09-04 14:29:25 +02:00
Paul Donald 58575727e5 luci-proto-openconnect: bug fixes for cert read and write methods
follow-up to: aa955d6465

Minor refactor of ucode, and some GUI fixes to ensure certificates are
written properly.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-07-25 20:55:49 +02:00
Paul Donald 1352d75f1a luci-proto-vxlan: peers -> peer spelling fix
follow-up to cbd37919ae

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-07-16 16:08:57 +02:00
Florian Eckert 2ea7e7fb41 Merge pull request #7785 from TDT-AG/pr/20250527-luci-proto-modemmanager
luci-proto-modemmanager: fix username and password show if allowedauth is configured
2025-06-23 10:58:40 +02:00
Florian Eckert cdd36410fd luci-proto-modemmanager: fix when to show username and password
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-06-23 10:27:17 +02:00
Jan Pazdziora 2604b5532f luci-proto-wireguard: Add the option for setting ip6prefix.
Signed-off-by: Jan Pazdziora <jan.pazdziora@code.adelton.com>
2025-06-16 13:24:57 +02:00
Paul Donald fa6ca8a618 treewide: vectorise iconography
follow-up to ae5d91da90

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-14 00:13:52 +02:00
Paul Donald 85fde70cd2 treewide: vectorise iconography
follow-up to ae5d91da90

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-13 15:55:41 +02:00
Paul Donald ae5d91da90 treewide: vectorise iconography
Clear, crisp, resolution independent vector graphics replace the trusty
microscopic PNG. Some minor CSS changes were needed to constrain images
in some locations to make sure they don't consume too much space.

Iconography taken from Mate desktop theme with minor adjustments:

https://github.com/mate-desktop/mate-icon-theme/

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-12 18:55:53 +02:00
Paul Donald 610ccdbcfe luci-proto-openfortivpn: make PEM key+CA optional
Fixes #7812

Some authentications schemes using username+password might already be
sufficient.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-10 15:02:25 +02:00
this-username-has-been-taken 8bff54dc47 luci-proto-wireguard: fixed incorrect peer name detection
Added the legacy peer name detection algorithm. If the new algorithm
fails to find a peer's name (e.g. when the IP address has been changed)
then the legacy value will be used.

Signed-off-by: Tom Haley <this_username_has_been_taken2@proton.me>
2025-04-13 16:17:02 +02:00
Paul Donald 4207c2c5d5 luci-proto-wireguard: add extra checks for hostname when building qr
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-03-26 22:41:23 +01:00
Ivan Chashkin ca9761370a luci-proto-yggdrasil: update yggdrasil.js for 0.5.7+ version
rename latency_ms and add new protocols to validate functions
https://yggdrasil-network.github.io/configurationref.html

Signed-off-by: Ivan Chashkin <mail@cupivan.ru>
2025-02-25 14:01:24 -06:00
Sergey Ponomarev cbd37919ae luci-proto-vxlan: fix option name: vxlan_peers to vxlan_peer
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2025-02-22 23:19:10 -06:00
Florian Eckert 9c3be817ad luci-proto-modemmanager: change string for 'Own Numbers' to 'Mobile Number'
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-02-13 14:09:05 +01:00
Paul Donald 920795afc7 luci-base, luci-proto-yggdrasil: grammar fix
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-01-13 17:57:45 +01:00
Paul Donald fec079db36 luci-base, luci-proto-wireguard: grammar fix
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-01-13 17:57:42 +01:00
Paul Donald e98eab06a2 luci-base, luci-proto-vxlan: grammar fix
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-01-13 17:57:42 +01:00