project/luci.git
23 months agoluci-app-pbr: initial commit 6127/head
Stan Grishin [Sat, 3 Dec 2022 02:32:45 +0000 (02:32 +0000)]
luci-app-pbr: initial commit

Depends on https://github.com/openwrt/packages/pull/20010

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit eb21c74b6f7c96226bdf3ca3601e628599041a45)

23 months agoMerge pull request #6122 from stangri/openwrt-22.03-luci-app-simple-adblock 6134/head
Stan Grishin [Fri, 2 Dec 2022 19:19:41 +0000 (12:19 -0700)]
Merge pull request #6122 from stangri/openwrt-22.03-luci-app-simple-adblock

[22.03] luci-app-simple-adblock: localizable error/warning messages

23 months agotimezone data: update to 2022g
Hannu Nyman [Thu, 1 Dec 2022 19:52:22 +0000 (21:52 +0200)]
timezone data: update to 2022g

Update timezone data to 2022g.

* https://mm.icann.org/pipermail/tz-announce/2022-November/000076.html

- In the Mexican state of Chihuahua, the border strip near the US
  will change to agree with nearby US locations on 2022-11-30.
  The strip's western part, represented by Ciudad Juárez, switches
  from -06 all year to -07/-06 with US DST rules, like El Paso, TX.
  The eastern part, represented by Ojinaga, will observe US DST next
  year, like Presidio, TX.
- A new Zone America/Ciudad_Juarez splits from America/Ojinaga.

- Much of Greenland, represented by America/Nuuk, stops observing
  winter time after March 2023, so its daylight saving time becomes
  standard time.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
[adapt the commit in master, lua instead of ucode]

23 months agoluci-app-simple-adblock: localizable error/warning messages 6122/head
Stan Grishin [Tue, 29 Nov 2022 22:42:59 +0000 (22:42 +0000)]
luci-app-simple-adblock: localizable error/warning messages

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 6a4251ff9ad5832e861f9582a88cfd053dcbc436)

2 years agoluci-proto-wireguard: fix generated AllowedIPs
Julien Cassette [Sun, 6 Nov 2022 22:42:31 +0000 (23:42 +0100)]
luci-proto-wireguard: fix generated AllowedIPs

This corrects the option `AllowedIPs` in generated peer configurations,
and allows to customize it via a dropdown list.

Fixes: #5956
Signed-off-by: Julien Cassette <julien.cassette@gmail.com>
[correct fixes tag, slightly adjust option description]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 73aca68b9e35857ec155f33ca1b1fb5358d69e52)

2 years agoMerge pull request #6097 from stangri/openwrt-22.03-luci-app-simple-adblock
Stan Grishin [Sun, 20 Nov 2022 05:26:08 +0000 (22:26 -0700)]
Merge pull request #6097 from stangri/openwrt-22.03-luci-app-simple-adblock

[22.03] luci-app-simple-adblock: update to 1.9.3-1

2 years agoluci-app-simple-adblock: update to 1.9.3-1 6097/head
Stan Grishin [Mon, 14 Nov 2022 19:26:17 +0000 (19:26 +0000)]
luci-app-simple-adblock: update to 1.9.3-1

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit ec31047e357afc19806b7f3d5781389769fada81)

2 years agotreewide: Backport translations from master
Hannu Nyman [Sat, 12 Nov 2022 21:10:27 +0000 (23:10 +0200)]
treewide: Backport translations from master

Backport translations from master and sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2 years agoMerge pull request #6087 from stangri/openwrt-22.03-luci-app-simple-adblock
Stan Grishin [Tue, 8 Nov 2022 18:39:02 +0000 (11:39 -0700)]
Merge pull request #6087 from stangri/openwrt-22.03-luci-app-simple-adblock

[22.03] luci-app-simple-adblock: bugfix: allow empty leds field

2 years agoluci-app-simple-adblock: bugfix: allow empty leds field 6087/head
Stan Grishin [Tue, 8 Nov 2022 18:06:06 +0000 (18:06 +0000)]
luci-app-simple-adblock: bugfix: allow empty leds field

* fixes error mentioned in https://github.com/openwrt/luci/pull/6075#issuecomment-1306581739

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 41fee33c20681d514377666515aad9d3bcbfb7f5)

2 years agoMerge pull request #6084 from stangri/openwrt-22.03-luci-app-simple-adblock
Stan Grishin [Tue, 8 Nov 2022 01:11:40 +0000 (17:11 -0800)]
Merge pull request #6084 from stangri/openwrt-22.03-luci-app-simple-adblock

[22.03] luci-app-simple-adblock: convert to js

2 years agoluci-app-simple-adblock: convert to js 6084/head
Stan Grishin [Fri, 4 Nov 2022 00:10:03 +0000 (00:10 +0000)]
luci-app-simple-adblock: convert to js

Thanks @dibdot, @jow-!

Signed-off-by: Stan Grishin <stangri@melmac.ca>
Update applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js

Co-authored-by: Vasili Sviridov <vsviridov@exceede.com>
Signed-off-by: Stan Grishin <stangri@melmac.ca>
Thanks @dibdot, @jow-, @vsviridov!

* this includes changes made during review

Co-authored-by: Vasili Sviridov <vsviridov@exceede.com>
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 0b895b17940089f854221b340fafae83bcbb2a99)

2 years agotimezone data: update to 2022f
Hannu Nyman [Mon, 31 Oct 2022 18:06:11 +0000 (20:06 +0200)]
timezone data: update to 2022f

Update timezone data to 2022f.
* http://mm.icann.org/pipermail/tz-announce/2022-October/000075.html

 -   Mexico will no longer observe DST after 2022, except for areas
     near the US border that continue to observe US DST rules.
     On 2022-10-30 at 02:00 the Mexican state of Chihuahua moves
     from -07 (-06 with DST) to year-round -06.
 -   Fiji will not observe DST in 2022/3.
     For now, assume DST is suspended indefinitely.
 -   Simplify four Ontario zones.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
[adapt the commit in master, lua instead of ucode]

2 years agoluci-mod-status: nftables.js: correct icmp display
Kevin Darbyshire-Bryant [Sun, 18 Sep 2022 08:09:42 +0000 (09:09 +0100)]
luci-mod-status: nftables.js: correct icmp display

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 6a03a884301f1acbc1cb1651a06b96ac92cc8596)

2 years agoluci-mod-network: gracefully handle empty channel lists
Jo-Philipp Wich [Thu, 27 Oct 2022 14:08:11 +0000 (16:08 +0200)]
luci-mod-network: gracefully handle empty channel lists

Avoid undefined value access when the channel list is empty.

Fixes: #5937, #5951
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9af8486517e87eea837fbce0ce787fc89ab46627)

2 years agoMerge pull request #6053 from stangri/openwrt-22.03-luci-app-simple-adblock
Stan Grishin [Mon, 24 Oct 2022 17:41:27 +0000 (10:41 -0700)]
Merge pull request #6053 from stangri/openwrt-22.03-luci-app-simple-adblock

[22.03] luci-app-simple-adblock: bugfix: identify nft set support

2 years agoluci-app-simple-adblock: bugfix: identify nft set support 6053/head
Stan Grishin [Mon, 24 Oct 2022 17:18:43 +0000 (17:18 +0000)]
luci-app-simple-adblock: bugfix: identify nft set support

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 4dc98fefcac468917227bd9037bf6a71cbed9b67)

2 years agotimezone data: update to 2022e
Hannu Nyman [Mon, 24 Oct 2022 16:00:38 +0000 (19:00 +0300)]
timezone data: update to 2022e

Update timezone data to 2022e.
* http://mm.icann.org/pipermail/tz-announce/2022-September/000073.html
* http://mm.icann.org/pipermail/tz-announce/2022-October/000074.html

 - Palestine transitions are now Saturdays at 02:00.
 - Simplify three Ukraine zones into one.
 - Jordan and Syria switch from +02/+03 with DST to year-round +03.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 10d762eab70a9bcd233cd8cb79e32742fb2c4038)

2 years agoMerge pull request #6036 from myrlyn/openwrt-22.03_dmfix
Jo-Philipp Wich [Tue, 18 Oct 2022 21:17:16 +0000 (23:17 +0200)]
Merge pull request #6036 from myrlyn/openwrt-22.03_dmfix

luci-app-dockerman: change default to nil if data.blkio_weight is not defined

2 years agoMerge pull request #6024 from stangri/openwrt-22.03-luci-proto-nebula
Stan Grishin [Tue, 18 Oct 2022 18:09:29 +0000 (11:09 -0700)]
Merge pull request #6024 from stangri/openwrt-22.03-luci-proto-nebula

[22.03] luci-proto-nebula: add nebula protocol support

2 years agoluci-app-adblock: sync with adblock 4.1.5
Dirk Brenken [Tue, 18 Oct 2022 16:59:52 +0000 (18:59 +0200)]
luci-app-adblock: sync with adblock 4.1.5

* add a new DNS report parameter to change the top statistics dynamically in the range of 10-50, see #19622 in the package repo for reference.
* sync translations

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 79cbbc01ce0271490ee8f66f7cf1a9a1ca56f64d)
Signed-off-by: Dirk Brenken <dev@brenken.org>
2 years agoluci-app-dockerman: change default to nil if data.blkio_weight is not defined 6036/head
myrlyn [Tue, 18 Oct 2022 16:04:35 +0000 (17:04 +0100)]
luci-app-dockerman: change default to nil if data.blkio_weight is not defined
Signed-off-by: Jonathon Walker <jonathon.l.walker@gmail.com>
2 years agosysauth: add autocomplete and id attributes to login inputs
Viktor Tsvetkov [Fri, 24 Dec 2021 11:36:35 +0000 (12:36 +0100)]
sysauth: add autocomplete and id attributes to login inputs

this let browser automatically fill according to HTML spec for input elements.
luci-theme-bootstrap and luci-base are affected.

Signed-off-by: Viktor Tsvetkov <zwetvik@gmail.com>
[indentation fix]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3e9d9a9dbb045c24eb93643838f8e8e3b9074e4b)

2 years agotreewide: resync and merge master translations
Jo-Philipp Wich [Sat, 15 Oct 2022 12:27:31 +0000 (14:27 +0200)]
treewide: resync and merge master translations

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2 years agoluci-app-nut: use filesystem dependencies for configuration files
Jo-Philipp Wich [Sat, 15 Oct 2022 12:18:57 +0000 (14:18 +0200)]
luci-app-nut: use filesystem dependencies for configuration files

Don't use uci dependencies for nut related config files as the nut packages
ship with completely commented out uci files. Such files do not satisfy the
uci menu dependencies as those expect at least one section within the file.

To solve this issue, use a regular file dependency on /etc/config/nut_*
instead.

Supersedes: #5964
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit bfc0fcfe6e97b1b39317f42d96debf3286c42696)

2 years agoMerge pull request #6027 from neheb/apple
Jo-Philipp Wich [Sat, 15 Oct 2022 12:13:17 +0000 (14:13 +0200)]
Merge pull request #6027 from neheb/apple

[22.03]backport iOS changes from master

2 years agoluci-theme-openwrt-2020: quantize png image 6027/head
Rosen Penev [Fri, 14 Oct 2022 20:22:42 +0000 (13:22 -0700)]
luci-theme-openwrt-2020: quantize png image

Small size reduction.

From: 5908
To:   3896

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 54664523996e03bf99b6e4006b113d5956ec75f8)

2 years agoluci-theme-openwrt-2020: add iOS webapp support
Rosen Penev [Tue, 11 Oct 2022 21:50:40 +0000 (14:50 -0700)]
luci-theme-openwrt-2020: add iOS webapp support

This way instead of opening a Safari tab, it opens in its own instance.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 28193247bcdd6e03ae2336f8f647f438f2713149)

2 years agoluci-theme-openwrt-2020: add iOS icon support
Rosen Penev [Mon, 10 Oct 2022 22:47:47 +0000 (15:47 -0700)]
luci-theme-openwrt-2020: add iOS icon support

Used when adding LuCI to Springboard. Image generated from logo.svg.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 1be885064e65f4c96189e7f63f29dcbb7040f3cb)

2 years agoluci-proto-nebula: add nebula protocol support 6024/head
Stan Grishin [Fri, 14 Oct 2022 12:02:56 +0000 (12:02 +0000)]
luci-proto-nebula: add nebula protocol support

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit d55913cfa44c81280111d093807c6830b3584d8d)

2 years agoMerge pull request #6018 from pymumu/master
Jo-Philipp Wich [Fri, 14 Oct 2022 10:53:53 +0000 (12:53 +0200)]
Merge pull request #6018 from pymumu/master

[openwrt-22.03] luci-app-smartdns: update to 1.2022.38

2 years agoluci-app-smartdns: update to 1.2022.38 6018/head
Nick Peng [Fri, 14 Oct 2022 09:46:16 +0000 (17:46 +0800)]
luci-app-smartdns: update to 1.2022.38

Signed-off-by: Nick Peng <pymumu@gmail.com>
2 years agoMerge pull request #6017 from jcassette/issue-4926-22.03
Florian Eckert [Wed, 12 Oct 2022 11:57:16 +0000 (13:57 +0200)]
Merge pull request #6017 from jcassette/issue-4926-22.03

[22.03] luci-app-ddns: fix creation of custom service (fix #4926)

2 years agoluci-app-ddns: fix creation of custom service (fix #4926) 6017/head
Julien Cassette [Sun, 2 Oct 2022 18:14:19 +0000 (20:14 +0200)]
luci-app-ddns: fix creation of custom service (fix #4926)

The `service_name` option must be empty for custom services,
otherwise an error is raised in `dynamic_dns_updater.sh`.

Signed-off-by: Julien Cassette <julien.cassette@gmail.com>
(cherry picked from commit 85ff9db2bffd3d2bf119300d9297f1b524608e1b)

2 years agoMerge pull request #6005 from stangri/openwrt-22.03-luci-app-https-dns-proxy
Stan Grishin [Wed, 5 Oct 2022 06:41:19 +0000 (23:41 -0700)]
Merge pull request #6005 from stangri/openwrt-22.03-luci-app-https-dns-proxy

[22.03] luci-app-https-dns-proxy: update to 2021-11-22-7 (settings for Canary…

2 years agoluci-app-https-dns-proxy: update to 2021-11-22-7 (settings for Canary Domains) 6005/head
Stan Grishin [Tue, 4 Oct 2022 22:23:28 +0000 (22:23 +0000)]
luci-app-https-dns-proxy: update to 2021-11-22-7 (settings for Canary Domains)

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 060e671c82f7d9abf3e581347a5162ef8b16f63c)

2 years agotreewide: Backport and sync translations
Hannu Nyman [Tue, 4 Oct 2022 20:02:08 +0000 (23:02 +0300)]
treewide: Backport and sync translations

Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2 years agoluci-app-opkg: relax dependency parsing
Jo-Philipp Wich [Fri, 30 Sep 2022 07:59:39 +0000 (09:59 +0200)]
luci-app-opkg: relax dependency parsing

Align depdendency parse logic with opkg to properly process certain
malformed dependency specifications. In particular do not require a
depdendency specification to end after the closing paren of a version
constraint and perform non-greedy matching in order to extract the
first version constraint only.

Fixes: #5997
Ref: https://forum.openwrt.org/t/x/138328
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 84ba6a5c36072f74721d535104735757b005c8d6)

2 years agoluci-mod-system: sshkeys.js: prevent XSS through pubkey comments
Jo-Philipp Wich [Wed, 21 Sep 2022 12:47:41 +0000 (14:47 +0200)]
luci-mod-system: sshkeys.js: prevent XSS through pubkey comments

Ensure to not display public key comments verbatim in order to prevent
injection of markup.

Reported-by: Eric McDonald <ericmcdonald@protonmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 944b55738e7f9685865d5298248b7fbd7380749e)

2 years agoluci-app-adblock: sync with adblock 4.1.4
Dirk Brenken [Sat, 10 Sep 2022 17:01:46 +0000 (19:01 +0200)]
luci-app-adblock: sync with adblock 4.1.4

* removed the unused 'adb_dnsinotify' parameter
* removed the 'adb_maxqueue' parameter,
  the queue size will be automatically set by the number of cpu cores

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit b3e1f956e60244200a1630964e83d33217cf0091)

2 years agoluci-app-upnp: make nftables compatible
Jo-Philipp Wich [Tue, 6 Sep 2022 21:51:19 +0000 (23:51 +0200)]
luci-app-upnp: make nftables compatible

Make luci.upnp rpcd backend plugin compatible with miniupnpd-nftables.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 82eec98944714c2b61f6e54291bc8f22983bb122)

2 years agotimezone data: update to 2022c
Hannu Nyman [Fri, 2 Sep 2022 21:29:20 +0000 (00:29 +0300)]
timezone data: update to 2022c

Update timezone data to 2022c.

http://mm.icann.org/pipermail/tz-announce/2022-August/000071.html
http://mm.icann.org/pipermail/tz-announce/2022-August/000072.html
* Iran no longer observes DST after 2022.
* Rename Europe/Kiev to Europe/Kyiv.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 10bcb228a7fc02a8e9ecb1ff584fd63b77a55afd)

2 years agoMerge pull request #5955 from brvphoenix/backport
Florian Eckert [Fri, 2 Sep 2022 11:22:24 +0000 (13:22 +0200)]
Merge pull request #5955 from brvphoenix/backport

[22.03] luci-app-frpc: backport

2 years agoluci-app-frpc: fix service status bar style 5955/head
ZiMing Mo [Sat, 30 Apr 2022 07:55:40 +0000 (15:55 +0800)]
luci-app-frpc: fix service status bar style

mod the service status bar to use normaly 'cbi-section' class style.

Signed-off-by: ZiMing Mo <msylgj@immortalwrt.org>
[squash commits, add balnk line between commit subject and message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit fbd3a40c3e364c91a9effc1193456c8b3303b880)

2 years agoluci-app-frpc: sync translations - i18n
Van Waholtz [Thu, 24 Mar 2022 03:40:04 +0000 (11:40 +0800)]
luci-app-frpc: sync translations - i18n

Signed-off-by: Van Waholtz <vanwaholtz@gmail.com>
2 years agoluci-mod-network: Offer ft-over-air by default for 802.11r
Hannu Nyman [Thu, 1 Sep 2022 15:08:56 +0000 (18:08 +0300)]
luci-mod-network: Offer ft-over-air by default for 802.11r

OpenWrt commit 2984a0420 (0588b124e in 22.03) changed the default 802.11r
Fast Transition method to be ft-over-air instead of ft-over-ds.

Offer ft-over-air as the first item in the drop-down list, so that
it gets selected by default when 802.11r option is enabled.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 2c3c7f5c50efd71bf87c068359cb0110a513186f)

2 years agoluci-app-frpc: add settings for log
Van Waholtz [Thu, 24 Mar 2022 03:40:04 +0000 (11:40 +0800)]
luci-app-frpc: add settings for log

Signed-off-by: Van Waholtz <vanwaholtz@gmail.com>
(cherry picked from commit 0dbe3198bfe1feda71efddb62d6c198a69e0dcc1)

2 years agoluci-app-frpc: Set the disable_log_color option to false by default
Ren Zongjia [Fri, 24 Dec 2021 07:14:14 +0000 (15:14 +0800)]
luci-app-frpc: Set the disable_log_color option to false by default

Signed-off-by: Ren Zongjia <acooler15@foxmail.com>
(cherry picked from commit 9f831e75e5764eb42a16b3ae5851b7524e1341c1)

2 years agoluci-app-frpc: use anonymous sections
Van Waholtz [Fri, 28 Jan 2022 11:32:20 +0000 (19:32 +0800)]
luci-app-frpc: use anonymous sections

1. Use anonymous sections and add name options to specify the proxy name
2. Add server name field for visitor mode

Signed-off-by: Van Waholtz <vanwaholtz@gmail.com>
(cherry picked from commit 973a4b5e679d22988671f7019103f0aa0833d4c6)

2 years agotreewide: Backport translations - i18n
Hannu Nyman [Sun, 28 Aug 2022 16:04:48 +0000 (19:04 +0300)]
treewide: Backport translations - i18n

Backport from master, sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2 years agoluci-base: use different cookie names for HTTP and HTTPS
Jo-Philipp Wich [Fri, 8 Jul 2022 13:38:53 +0000 (15:38 +0200)]
luci-base: use different cookie names for HTTP and HTTPS

Since HTTP cookies may not overwrite HTTPS ("secure") ones, users are
frequently unable to log into LuCI when a stale, "secure" `sysauth` cookie
is still present in the browser as it commonly happens after e.g. a
sysupgrade operation or when frequently jumping between HTTP and HTTPS
access.

Rework the dispatcher to set either a `sysauth_http` or `sysauth_https`
cookie, depending on the HTTPS state of the server connection and accept
both cookie names when verifying the session ID.

This allows users to log into a HTTP-only LuCI instance while a stale,
"secure" HTTPS cookie is still present.

Requires commit 2b0539ef9d ("lucihttp: update to latest Git HEAD") to
function properly.

Fixes: #5843
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e1932592c3e0804eec5d85fee989ceeed1e1050a)

2 years agoMerge pull request #5946 from stangri/openwrt-22.03-luci-app-simple-adblock-luci...
Stan Grishin [Wed, 24 Aug 2022 00:52:37 +0000 (03:52 +0300)]
Merge pull request #5946 from stangri/openwrt-22.03-luci-app-simple-adblock-luci-app-simple-adblock

[22.03] luci-app-simple-adblock: update to 1.9.0-1

2 years agoluci-app-simple-adblock: update to 1.9.0-1 5946/head
Stan Grishin [Fri, 19 Aug 2022 21:49:35 +0000 (21:49 +0000)]
luci-app-simple-adblock: update to 1.9.0-1

* Support for (upcoming) dnsmasq nftset

Depends on https://github.com/openwrt/packages/pull/19212

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 9b71a35428e0ddbf0347c8ba62da2f4168ddb21b)

2 years agoluci-app-travelmate: sync with travelmate 2.1.0
Dirk Brenken [Sat, 20 Aug 2022 16:56:02 +0000 (18:56 +0200)]
luci-app-travelmate: sync with travelmate 2.1.0

* expose new options to LuCI
* cosmetics

Signed-off-by: Dirk Brenken dev@brenken.org
Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit bcb046c488aad54b13ff20a93155ce3c0d0fd9af)

2 years agoMerge pull request #5921 from stangri/openwrt-22.03-luci-app-advanced-reboot
Stan Grishin [Tue, 2 Aug 2022 19:05:16 +0000 (13:05 -0600)]
Merge pull request #5921 from stangri/openwrt-22.03-luci-app-advanced-reboot

[22.03] luci-app-advanced-reboot: Fix Linksys EA4500 descriptor file

2 years agoluci-app-advanced-reboot: Fix Linksys EA4500 descriptor file 5921/head
Andy Bartolo [Fri, 15 Jul 2022 00:57:11 +0000 (18:57 -0600)]
luci-app-advanced-reboot: Fix Linksys EA4500 descriptor file

Signed-off-by: Andy Bartolo <andrew.bartolo@gmail.com>
(cherry picked from commit 5d7446e1be05baef6463c29dc00587e5952db9fc)

2 years agoluci-proto-wireguard: handle multiple peers in imported configuration
Jo-Philipp Wich [Mon, 1 Aug 2022 11:00:31 +0000 (13:00 +0200)]
luci-proto-wireguard: handle multiple peers in imported configuration

When importing a fully configuration, import all peer entries from it
instead of non-deterministically merging all peer keys into one.

When importing a remote configuration as peer, only use the setting from
the peer section matching our local interface pubkey.

Also relabel the `Import peer configuration` button to
`Import configuration as peer` in order to be more explicit.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 94bfa33452ad7db683e9f47ea9921e92b5175558)

2 years agoluci-base: sys.lua: make timeout optional when parsing conntrack entries
Jo-Philipp Wich [Mon, 1 Aug 2022 09:57:03 +0000 (11:57 +0200)]
luci-base: sys.lua: make timeout optional when parsing conntrack entries

Fixes: #5909
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit abd9125fbf5e2fadc0c5ae293496680df08e6e1b)

2 years agoluci-proto-wireguard: configuration import improvements
Jo-Philipp Wich [Sat, 23 Jul 2022 18:24:09 +0000 (20:24 +0200)]
luci-proto-wireguard: configuration import improvements

 - Reword texts in import dialogs for better clarity, use different
   descriptions for full import and peer import

 - Allow importing configurations without [Peer] section

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2ae74b909b4acf35b72142d913f9e61090febf6d)

2 years agoluci-proto-wireguard: gracefully deal with missing uci configs
Jo-Philipp Wich [Mon, 20 Jun 2022 22:07:04 +0000 (00:07 +0200)]
luci-proto-wireguard: gracefully deal with missing uci configs

The /etc/config/ddns in particular might not be present on the system,
don't fail if it is absent.

Fixes: #5838
Fixes: 9ba20645b0 ("luci-proto-wireguard: rewrite protocol handler")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 340183786e5441197141efaf7d8cf0e682047bfe)

2 years agoluci-proto-wireguard: grant uci read access to system and ddns config
Jo-Philipp Wich [Mon, 20 Jun 2022 21:56:58 +0000 (23:56 +0200)]
luci-proto-wireguard: grant uci read access to system and ddns config

The configuration export requires access to /e/c/system and /e/c/ddns for
external hostname hints.

Fixes: #5838
Fixes: 9ba20645b0 ("luci-proto-wireguard: rewrite protocol handler")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4769bf11aa5d33cda4785faec8046c67cb51a606)

2 years agoluci-proto-wireguard: rewrite protocol handler
Jo-Philipp Wich [Tue, 17 May 2022 13:45:20 +0000 (15:45 +0200)]
luci-proto-wireguard: rewrite protocol handler

This commit rewrites large chunks of the WireGuard protocol handler in order
to simplify the process of importing and exporting configuration. The major
changes are:

1) The wireguard interface configuration tab (General Settings) gained an
   import assistant which allows dragging or pasting a native WireGuard
   configuration file in order to import required settrings into uci

2) The peer configuration tab gained a similar import assistant which allows
   importing the settings for a WireGuard peer from an existing native
   WireGuard configuration file

3) The QR code export feature has been rewritten to make the resulting codes
   actually useful for importing into a WireGuard client application.
   Additionally the plaintext native WireGuard configuration is displayed
   to allow copy-pasting it for use on a Linux or OS X system

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9ba20645b01aacb391ab8c69f57b3da60db8f630)

2 years agoluci-proto-wireguard: add generate psk button
Lukas Voegl [Fri, 18 Mar 2022 13:47:44 +0000 (14:47 +0100)]
luci-proto-wireguard: add generate psk button

Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
(cherry picked from commit b6925a12277224b4a02dc1febb58de8d4d6fdbe0)

2 years agoluci-base: form.js: save parent map on opening nested modal map
Jo-Philipp Wich [Mon, 16 May 2022 11:10:20 +0000 (13:10 +0200)]
luci-base: form.js: save parent map on opening nested modal map

Before opening (rendering) a nested modal map, make sure to save the parent
modal map in order to persist any structural uci changes, such as newly added
anonymous sections to prevent the nested map from operating on stale values
or ephemeral config section IDs.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3be479446bdeaf446468c5e7ac3b9bc49da023da)

2 years agoluci-base: form.js: handle SectionValue objects in GridSection modals
Jo-Philipp Wich [Mon, 16 May 2022 09:55:11 +0000 (11:55 +0200)]
luci-base: form.js: handle SectionValue objects in GridSection modals

The existing logic for cloning section options into the modal form section
container did not properly handle SectionValue objects. Introduce a new
`cloneOptions()` helper to recursively traverse and properly clowning
such nested sections.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f24606b1ffd59cc82c7251243a18f4cfdc4f78d5)

2 years agoluci-base: form.js: reset parent maps on returning from nested section modal
Jo-Philipp Wich [Mon, 16 May 2022 09:49:28 +0000 (11:49 +0200)]
luci-base: form.js: reset parent maps on returning from nested section modal

The nested section modal might have changed values also covered/displayed by
the parent map, so ensure to reload all parent maps in the current modal
view stack to ensure that no stale values are shown on return.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0c81e25faa9ff9cb6edec477d56145d70be87cf3)

2 years agoluci-base: form.js: rework stacked modal CBI map logic
Jo-Philipp Wich [Thu, 5 May 2022 21:07:13 +0000 (23:07 +0200)]
luci-base: form.js: rework stacked modal CBI map logic

Only stack a new modal CBI map on top of the currently displayed modal one
if the related map or section differs. This prevents misbehavior when
switching the protocol of interfaces.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f2fa59e89af3d4bdae9b12471184425b307ad5d6)

2 years agoluci-app-attendedsysupgrade: s/res/response/
Paul Spooren [Fri, 29 Jul 2022 14:16:48 +0000 (16:16 +0200)]
luci-app-attendedsysupgrade: s/res/response/

The variable was party called `res` or `response`, always call it
`response` from now on. This also solves a typo where
`data.request_hash` is never set to a correct value.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit af23d0dfc3176511ada5fb3d081f1b0a287a11bc)

2 years agoluci-app-attendedsysupgrade: request filesystem
Paul Spooren [Mon, 21 Mar 2022 11:44:11 +0000 (11:44 +0000)]
luci-app-attendedsysupgrade: request filesystem

It is possible to request a specific filesystem so no other filesystems
are used. This speeds up the build process and may prevent failures in
edge cases.

A recent edge case is installing more packages than ext4 can handle
while squashfs works fine due to compression.

Since  `rootfs_type` is now always available via `procd`, remove the
hack of reading `/proc/mounts`.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 8936e3c386e77c2dc090dbbd5a87907196f9149b)

2 years agoluci-app-attendedsysugprade: allow to reinstall image
Paul Spooren [Tue, 7 Jun 2022 12:23:59 +0000 (14:23 +0200)]
luci-app-attendedsysugprade: allow to reinstall image

Now it's possible to re-install the currently running version in
advanced mode. This can be useful when installing packages via `opkg`
and then requesting the firmware with the packages stored in squashfs.

FIXES: https://github.com/openwrt/luci/issues/5809

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit fd72e1c23ef1569fd8f8ab71bdcb4a94f802435a)

2 years agoluci-app-attendedsysupgrade: report used client version
Paul Spooren [Thu, 28 Jul 2022 20:43:46 +0000 (22:43 +0200)]
luci-app-attendedsysupgrade: report used client version

This allows the backend to track popular app versions and drop support for
unsed version in case of API changes.

Specifically the app sends a version string in the format "luci/GIT_HASH" to
the backend.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit f368faf6789a43c2e1a26b721f8115473672eb29)

2 years agoluci-app-watchcat: add support for run_script mode
John Kohl [Sun, 5 Jun 2022 01:16:27 +0000 (21:16 -0400)]
luci-app-watchcat: add support for run_script mode

Signed-off-by: John Kohl <jtk.git@bostonpog.org>
(cherry picked from commit ae5677b8c24b7be5cbca5dbef00178b88a1161ac)

2 years agoluci-app-watchcat: add support for IP family selection
John Kohl [Sun, 5 Jun 2022 01:13:56 +0000 (21:13 -0400)]
luci-app-watchcat: add support for IP family selection

Signed-off-by: John Kohl <jtk.git@bostonpog.org>
(cherry picked from commit 20fdd8dd9d0c90c9fb157c6314d6ae32e7f4d39c)

2 years agotreewide: Backport translations - sync
Hannu Nyman [Thu, 28 Jul 2022 17:15:05 +0000 (20:15 +0300)]
treewide: Backport translations - sync

Backport from master and sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2 years agoluci-base: form.js: allow overriding section placeholder of TableSections
Jo-Philipp Wich [Mon, 16 May 2022 09:47:45 +0000 (11:47 +0200)]
luci-base: form.js: allow overriding section placeholder of TableSections

The existing implementation was hardcoding the empty TableSection placeholder
instead of invoking `renderSectionPlaceholder()` which might be overridden by
various forms.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 818776451d96e8f1a187eafca4a5ebbf0770fbde)

2 years agoluci-base: form.js: remove stray `<br>` elements from section placeholder
Jo-Philipp Wich [Mon, 16 May 2022 14:03:14 +0000 (16:03 +0200)]
luci-base: form.js: remove stray `<br>` elements from section placeholder

Theme CSS styles shoudl take care of introducing padding as needed.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e4e001b59657e4cd0f333a3f43ce66b8f789deb2)

2 years agoluci-base: form.js: trim option description
Jo-Philipp Wich [Mon, 16 May 2022 14:12:01 +0000 (16:12 +0200)]
luci-base: form.js: trim option description

If a whitespace-only description is set on an element, the CSS :empty
selector will not match, causing description icons to be shown when
there's no actual content.

To avoid that, trim the description string when building the element.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b6ae1d4f4aec94b38e59b11e5fd9c28799dae05b)

2 years agoluci-base: form.js: minor tweaks for mobile styling
Jo-Philipp Wich [Tue, 17 May 2022 13:07:48 +0000 (15:07 +0200)]
luci-base: form.js: minor tweaks for mobile styling

 - Annotate gridsection textvalue cells as CBI.DummyValue widgets
 - Replace `<br>` elements with newlines in `stripTags()`

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9c136c9beaa7639aecc351c5725de33cfe4d2e5c)

2 years agoluci-proto-ncm: rename `service` option to `mode`
Jo-Philipp Wich [Mon, 11 Jul 2022 09:23:57 +0000 (11:23 +0200)]
luci-proto-ncm: rename `service` option to `mode`

Package luci-proto-ncm depends on comgt-ncm which uses an option
called 'mode' to set the radiomode of the modem. There is no option
'service' in the comgt-ncm scripts.

Suggested-by: breenstorm <49235337+breenstorm@users.noreply.github.com>
[fix commit subject, add commit message, rebase onto master branch]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4d6642b636a9feaa173c568c99f4129c440ed8b8)

2 years agoluci-base: form.js: fix removing just created named GridSection
Jo-Philipp Wich [Fri, 22 Jul 2022 21:41:05 +0000 (23:41 +0200)]
luci-base: form.js: fix removing just created named GridSection

Since the `handleModalSave()` handler of the GridSection class invokes
`handleModalCancel()` after saving the data but before removing the
`addedSection` property, the `handleModalCancel` handler incorrectly
removed the uci section that has just been created.

This bug didn't affect anonymous GridSections because after saving the
id of the created section changes, causing the remove command to fail,
but for named ones with stable section IDs, the bug manifested.

Solve the issue by passing a flag to `handleModalCancel()` indicating
whether the method was called from a safe operation and use it do
decide whether to delete the new staged uci section or not.

Fixes: #5760
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2771360108cb3e2011c7c9cb4921a9047ea70910)

2 years agoluci-base: uci.js: prevent sending empty uci set operations
Jo-Philipp Wich [Fri, 22 Jul 2022 22:10:17 +0000 (00:10 +0200)]
luci-base: uci.js: prevent sending empty uci set operations

Under certain circumstances, a staged uci option value might get unset
again before saving the config, leaving an empty section change set
behind, causing the save call to send an empty uci set request via rpc,
triggering an ubus code 4 (Resource not found) error.

In particular this prevented bridge VLANs from getting saved properly.

Fixes: #5876
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 25dcd0b77c4450b83cd8b8307397e58c34ebfcd1)

2 years agoluci.mk: ignore language directories not explicitly mentioned
Jo-Philipp Wich [Fri, 22 Jul 2022 14:11:42 +0000 (16:11 +0200)]
luci.mk: ignore language directories not explicitly mentioned

Only create translation packages for languages mentioned in luci.mk

Fixes: #5886
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2 years agoluci-mod-network: demote WPA-PSK to "low" security in the choice list
Jo-Philipp Wich [Tue, 12 Jul 2022 14:12:30 +0000 (16:12 +0200)]
luci-mod-network: demote WPA-PSK to "low" security in the choice list

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ef7fe79ffc4a0725d51eb554db02fd8e3e73534d)

2 years agoluci-app-ddns: fix broken translation call
Jo-Philipp Wich [Tue, 12 Jul 2022 13:43:34 +0000 (15:43 +0200)]
luci-app-ddns: fix broken translation call

Fixes: #5874
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 57b88211c14dd71da44b537ac9062f99e1efbe80)

2 years agolucihttp: update to latest Git HEAD
Jo-Philipp Wich [Fri, 8 Jul 2022 13:26:23 +0000 (15:26 +0200)]
lucihttp: update to latest Git HEAD

6e68a10 utils: also compare attribute name length in lh_header_attribute()
7b721af testcases: adjust urldecode tests

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2b0539ef9d1849b42fae206f0647bc647323c75d)

2 years agorpcd-mod-luci: update filter for rpc_luci_get_network_devices
Markus Stockhausen [Tue, 28 Jun 2022 08:54:48 +0000 (10:54 +0200)]
rpcd-mod-luci: update filter for rpc_luci_get_network_devices

When kernel bonding module is loaded it will create a special
file /sys/class/net/bonding_masters. This is no network device.
Filter it out for getNetworkDevices() call.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
(cherry picked from commit 77d29c9dc0226faa9374ca25fba8dc642c99f303)

2 years agoluci-mod-status: nftables.js: fix OOM on big nftables IP sets
Alexander Georgievskiy [Tue, 5 Jul 2022 11:13:50 +0000 (14:13 +0300)]
luci-mod-status: nftables.js: fix OOM on big nftables IP sets

Signed-off-by: Alexander Georgievskiy <galeksandrp@gmail.com>
(cherry picked from commit 88c62fe2187ebf28937cb49f880dada09937b194)

2 years agotreewide: backport and sync tranlations
Hannu Nyman [Sun, 3 Jul 2022 10:37:08 +0000 (13:37 +0300)]
treewide: backport and sync tranlations

Backport translations from master.
(also remove the erronenous Portuguese translations from English)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2 years agotreewide: sync with master translations
Jo-Philipp Wich [Tue, 21 Jun 2022 21:58:54 +0000 (23:58 +0200)]
treewide: sync with master translations

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2 years agoluci-mod-network: wireless.js: fix typo in description string
Jo-Philipp Wich [Tue, 21 Jun 2022 21:54:12 +0000 (23:54 +0200)]
luci-mod-network: wireless.js: fix typo in description string

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 53a998895b81ac393d1a9d62e4c3ae0e8708515b)

2 years agotreewide: sync with master translations
Jo-Philipp Wich [Tue, 21 Jun 2022 10:30:45 +0000 (12:30 +0200)]
treewide: sync with master translations

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2 years agoluci-mod-network: wireless.js: expose wifi-iface macaddr option
Jo-Philipp Wich [Tue, 21 Jun 2022 06:52:50 +0000 (08:52 +0200)]
luci-mod-network: wireless.js: expose wifi-iface macaddr option

Fixes: #5845
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f039069ac52e0da00ce9f3486926fbddd29a6ea0)

2 years agoluci-base: remove redundant english translations
Jo-Philipp Wich [Mon, 20 Jun 2022 08:56:26 +0000 (10:56 +0200)]
luci-base: remove redundant english translations

Drop translations that match the msgid as well as stry, misplaced spanish
ones.

Ref: https://forum.openwrt.org/t/openwrt-22-03-0-rc4/129874/50
Ref: https://forum.openwrt.org/t/openwrt-22-03-0-rc4/129874/60
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit cc3d97ccecec041128462d44d85f9393a502f60e)

2 years agoluci-base: network.js: consider uci config for Device.getType()/getParent()
Jo-Philipp Wich [Thu, 16 Jun 2022 07:47:47 +0000 (09:47 +0200)]
luci-base: network.js: consider uci config for Device.getType()/getParent()

For network devices declared in uci but not yet created by netifd, the
runtime status information will be unavailable, causing methods such as
`getType()` to assume plain ethernet interfaces and `getParent()` to fail
resolving parent devices.

Fall back to infer the information from uci configuration settings in such
cases to give accurate type hints to callers.

In particular, this prevents LuCI from turning wireless target networks
containing a to-be-created bridge device into bridges themselves.

Fixes: https://github.com/openwrt/packages/issues/18768
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8effea58d7281fd4f2b6c31d534195dba27a850b)

2 years agotreewide: Backport translations and sync
Hannu Nyman [Sun, 12 Jun 2022 16:51:16 +0000 (19:51 +0300)]
treewide: Backport translations and sync

Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2 years agoluci-app-opkg: fix parsing package dependencies with version constraints
Jo-Philipp Wich [Fri, 3 Jun 2022 11:36:02 +0000 (13:36 +0200)]
luci-app-opkg: fix parsing package dependencies with version constraints

Due to improper ordering of regexp alternatives, version constraint operators
might get undermatched.

Fixes: https://github.com/openwrt/openwrt/issues/9982
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b84791bd029c2aaa67cbc06a15d23828f62f4608)

2 years ago luci-app-banip: mark as broken
Dirk Brenken [Fri, 27 May 2022 19:31:21 +0000 (21:31 +0200)]
 luci-app-banip: mark as broken

banIP 0.7.x is not compatible with new nft firewall (default in master and 22.03).
Mark the package as BROKEN for now.

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 8837f7608adf770ff33249821d28da097324c54d)

2 years agoluci-theme-bootstrap: restore initramfs warning
Jo-Philipp Wich [Thu, 12 May 2022 07:32:02 +0000 (09:32 +0200)]
luci-theme-bootstrap: restore initramfs warning

Restore accidentally removed the initramfs boot warning banner.

Ref: https://github.com/openwrt/luci/commit/8055acc9be89f0bed31b6692ad08e6196611d478#commitcomment-73447330
Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 56fab648caa78422aac47ab8cec168e8a0999316)

2 years agoluci-base: ui.js: warn about connectivity loss on changing iface settings
Jo-Philipp Wich [Fri, 6 May 2022 11:39:36 +0000 (13:39 +0200)]
luci-base: ui.js: warn about connectivity loss on changing iface settings

If specific settings such as the protocol, IP address or netmask of an
interface the user is connected to are changed, the apply/rollback
mechanism might interfere. Display an additional warning dialog in this
case, instructing the user to manually reconnect and offering to continue
with a less safe unchecked apply mechanism.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 733ee9a7b6312e9b5fe2a4aa8107baf5379602ab)

2 years agoluci-base: ui.js: make "Apply unchecked" available from the changes dialog
Jo-Philipp Wich [Thu, 5 May 2022 21:50:25 +0000 (23:50 +0200)]
luci-base: ui.js: make "Apply unchecked" available from the changes dialog

Previously, "Apply unchecked" was only possible from the save action of CBI
maps, allow to invoke it from the configuration change dialog as well.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8583efb5a92785fd56ff4abb0ce56a142eb6602f)