414 Commits
Author SHA1 Message Date
Erik Conijn 1a36248ef9 luci-proto-wireguard: add tunlink option
The WireGuard protocol handler passes the tunlink option to netifd as
the interface to create the host routes to the peer endpoints on
(proto_add_host_dependency). Without it, netifd uses the interface with
the most specific route to the endpoint, which is not always the
intended uplink, e.g. with several WAN interfaces or other VPNs.

LuCI has no field for it, so it can only be set with uci. Add it as
"Underlying interface", next to "No Host Routes".

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Erik Conijn <egc112@msn.com>
2026-10-11 09:19:56 +03:00
Michael Pfeifroth af2c89c911 luci-proto-modemmanager: rework initial EPS bearer modes
Follow the rework of the 'init_epsbearer' modes in the modemmanager
package:

- modem:      Leave unchanged (stored on modem), the new default
- network:    Network-assigned
- connection: Same as connection (was 'default')
- custom:     Custom

The LuCI value 'none' was stored as an empty option, which since
modemmanager commit 246506690f2d clears the initial EPS bearer instead
of leaving it untouched as described. Store 'modem' explicitly instead.

The legacy values 'none' and 'default' are shown as 'modem' and
'connection'.

Link: https://github.com/openwrt/packages/issues/30299
Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
2026-10-05 11:12:37 +02:00
Daniel F. Dickinson 7dda604a39 protocols: remove myself as maintainer for vpnc
I  have not had touched this in years, and was
added as maintainer during treewide
PKG_MAINTAINER additions. I do not
have anything to test this against. Therefore,
removing myself as maintainer.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
2026-09-07 07:01:51 +03:00
Michael Pfeifroth 4beb8db7d6 luci-proto-modemmanager: fix iptype default value
The 'iptype' and 'init_iptype' ListValue options declared 'ipv4v6' as
the default in LuCI, while the modemmanager package itself defaults to
'ipv4' (see net/modemmanager README.md).

Since LuCI omits writing a UCI option when the selected value matches
the field's declared default, selecting 'IPv4/IPv6 (both)' in the UI
never actually saved 'option iptype ipv4v6' to /etc/config/network.
On the next apply, modemmanager fell back to its own default ('ipv4'),
silently downgrading the connection to IPv4-only and making the
'ipv4v6' option effectively unusable through LuCI.

Align both defaults with the modemmanager package default ('ipv4') and
drop the now-inaccurate '- defaults to IPv4' hint from the 'ipv4v6'
label. The dropdown entries are also reordered so the new default
('ipv4') is listed first, matching the convention used by other
ListValue fields in this file.

Reported-by: moawut <https://forum.openwrt.org/u/moawut>
Ref: https://forum.openwrt.org/t/luci-proto-modemmanager-support-thread/23696/120

Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
2026-08-18 12:04:11 +02:00
Hauke Mehrtens 4a78eccd90 luci-proto-ipv6: dhcpv6: add option to select the DHCPv6 client ID
OpenWrt gained a per-interface "sendclientid" option which overrides the
preferred DUID used for DHCPv6 requests. Expose it in the advanced
settings of the DHCPv6 client protocol:

- "auto" (default) uses the explicitly configured client ID, or falls
  back to the global default DUID and finally a DUID-LL derived from the
  interface MAC address
- "global" always uses the global default DUID
- "hardware" passes no client ID to odhcp6c, so a type 3 DUID-LL is used

Unlike DHCPv4 there is no "none" mode, as odhcp6c always sends a client
identifier. The explicit client ID is only evaluated in "auto" mode,
hence it now depends on that setting.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-07-21 23:02:15 +02:00
Erik Conijn ebb64fad89 luci-proto-openvpn: fix auth_user_pass option, clarify label
Maintainer: @systemcrash

CC: @feckert

Version: Main
Compile tested: X86-64
Run tested: X86-64

Description:
The push_opt tab incorrectly registered a server-side auth_user_pass
Value option.
So move it to the client-side FileUpload option on the general tab.

auth_user_pass is a client-only option; the corresponding server-side
directive is auth-user-pass-verify, which is already correctly
defined under the scripts tab as auth_user_pass_verify.

Also update the general-tab auth_user_pass label to a clearer description
of the expected file format (username and password on separate lines).

Signed-off-by: Erik Conijn <egc112@msn.com>
2026-07-19 09:21:34 +02:00
Florian Eckert 21818b3a0d luci-proto-xfrm: replace ifid datatype check with range check
According to the documentation, values from '1' to '4294967295' are allowed
values for the 'ifid' option. The value ‘0’ is excluded, as '0' is treated
as the default ID or an unassigned ID.

While we’re at it, mark the option as non-optional.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-07-07 16:35:36 +02:00
Jo-Philipp Wich e4ff45ecbc luci-proto-openvpn: fix shell code injection through gerateKey arg
Ensure to quote the `cl_meta` argument of the `gerateKey` procedure.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2026-06-28 01:34:39 +02:00
Hannu Nyman 176a487523 luci-proto-wireguard: escape slash in regex in javascript
Escape slash. Enables proper parsing of javascript by gettext tools.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2026-06-26 14:16:00 +03:00
Hannu Nyman c653c94a02 treewide: escape slash chars in regex strings in .js files
Properly escape the slash '/' chars that are included in the regex
strings in javascript files. Slash is used as a regex delimiter in
javascript, so an un-escaped slash may cause parsing errors in some
tools like xgettext used with .po translation manipulation.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2026-06-25 23:14:58 +03:00
Andy Chiang a14734f7d4 luci-proto-openfortivpn: fix typo
fix typo

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2026-06-24 17:59:44 +03:00
David Han 47eb454587 luci-proto-openvpn: i18n fix typo in TLS cert profile label
Fix a typo in the cryptography tab where 'TLS cert profile' was
accidentally written as 'TLS cet profile'.

Signed-off-by: David Han <h96643864@gmail.com>
2026-06-12 08:24:39 +02:00
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