luci icon indicating copy to clipboard operation
luci copied to clipboard

convert outstanding LUA apps to JS

Open systemcrash opened this issue 1 year ago • 40 comments

Who is up for the task?

Key:

  • [ ] ~~do not convert~~
  • [ ] unassigned
  • [ ] 🗑️ ~~deprecate or remove~~
  • [x] 🗑️ ~~removed~~ ( commit hash )
  • [ ] not yet assigned with last known maintainer(s) tagged @octocat
  • [x] assigned or accepted by @octocat
  • [x] ~~done~~ @octocat ( commit hash )
  • [x] ~~done~~ ( commit hash )

@stokito @dannil @Ramon00 ?

  • [x] 🗑️ ~~luci-app-ahcp/luasrc @jow-~~ ( 8265e370dbf8bce748d7f506834ab18a5b3c6f41 )
  • [x] ~~luci-app-clamav/luasrc~~ ~~@ratkaj @lperkov~~ @systemcrash ( 780a84e8bead3cbbdda09c479ab793081ecf9903 )
  • [x] ~~luci-app-coovachilli/luasrc @sbyx @jow-~~ @systemcrash ( 09a1a58b13263500a71dea4fbb62b4ad572569c3 )
  • [x] 🗑️ ~~luci-app-cshark/luasrc @lperkov~~ @systemcrash ( 9442cd51ea908e9b2e16b63986f4b915a521c70b )
  • [x] ~~luci-app-dcwapd/luasrc @csonsino~~ @systemcrash ( 82e5c888408a9728576f584088432289809fa293 )
  • [x] ~~luci-app-ddns/root/usr/libexec/rpcd/luci.ddns @Ansuel~~ @systemcrash ( 22fcc720ec5d2ad1426509136447172281d345a0 )
  • [x] 🗑️ ~~luci-app-dnscrypt-proxy/luasrc @dibdot~~ ( 148863ed8e0566b1ae953fa409e2ef2e9fbb1f9f )
  • [ ] luci-app-dockerman/luasrc ~~@lisaac @feckert~~ @itay-sho
  • [x] ~~luci-app-dump1090/luasrc @Noltari~~ @systemcrash ( 2ef9ef41909dbb69c7a4823be249fad194d528b8 )
  • [x] 🗑️ ~luci-app-dynapoint/luasrc @ascob~ @systemcrash ( 5130e2270d8cd712dca6c56d3a39870e016d88d6 )
  • [x] 🗑️ ~luci-app-ltqtapi/luasrc @blogic~ @systemcrash ( fad6b8767c5dd43241b178a7088d088d59a8344b )
  • [ ] luci-app-lxc/luasrc @dibdot
  • [x] ~luci-app-mosquitto/luasrc~ ~@karlp~ @systemcrash ( f6e6b055d514595941db4a4cc11c3d9902eabefb )
  • [ ] luci-app-nft-qos/luasrc @rosysong
  • [x] ~~luci-app-nut/luasrc @danielfdickinson~~ @systemcrash ( 84c04c3707b992ba8aa1c66ee876d46eaeeb47ef )
  • [ ] luci-app-ocserv/luasrc @nmav
  • [ ] luci-app-openvpn/luasrc @sbyx @jow-
  • [x] ~luci-app-privoxy/luasrc~ @systemcrash ( 93dad92afbbd2988f2c44a5a759fd4c8fe417ad1 )
  • [x] 🗑️ ~luci-app-radicale/luasrc @chris5560~ @systemcrash ( 1173f245fde87011610790b06839aae12b911538 )
  • [ ] luci-app-radicale2/luasrc @danielfdickinson
  • [x] 🗑️ ~~luci-app-siitwizard/luasrc @sbyx @jow-~~ @systemcrash ( dfcd69dd54ac0a14b7f1a420a5c90f74667d8a3b )
  • [ ] luci-app-splash/luasrc @mmunz
  • [x] ~~luci-app-squid/luasrc @ratkaj~~ @dannil ( 5c6b08cf89f5dd4dd0bc0ee4d0c643a19a34c9b8 )
  • [x] ~~luci-app-tinyproxy/luasrc ~~@jow- @sbyx~~ @Ramon00~~ ( bbb08197c51daa388633437bf14fc15f91227e34 )
  • [x] ~luci-app-unbound/luasrc @EricLuehrsen~ @systemcrash ( 5780be0beba6b0ccde07fc333c8f2868467a11e6 )
  • [x] ~luci-app-vnstat/luasrc @jow-~ @systemcrash ( 7c582f150e05b612b68633b349af62ed1f4a6589 )
  • [x] ~luci-app-wifischedule/luasrc ~~@newkit~~ @Ramon00~
  • [x] ~luci-proto-openconnect @systemcrash~ ( aa955d6465b4d0f00cc713904e2de7bfb0cbd062 )
  • [x] ~luci-proto-openfortivpn @systemcrash~ ( 0060e431742bca744bed6960bac302ab995d6660 )

See #3378

Some of these might not make sense to convert. Some may have no users whatsoever - only download statistics will reveal info there, but those statistics are currently unavailable. At least a few of the maintainers likely have no time or desire to undertake such a conversion.

I think at least one app could be cut loose - siitwizard. Since we have native IPv4 over IPv6 now, and that's progressing nicely.

systemcrash avatar Oct 08 '24 13:10 systemcrash

I may participate in this only in two-three months. My priority is to fix my PR to luci-app-acme and finish the luci-app-setup-wizard. The only app listed here that is quite important is dockerman. See https://github.com/openwrt/luci/issues/7313

stokito avatar Oct 08 '24 19:10 stokito

I'm not sure if the dcwapd feature ever had any users and I haven't looked at that project in a long time, but if I can get it up and running again I'll see if I can migrate the luci lua code.

Do you happen to have any useful links regarding this migration (developer notes, how-to's, etc)? My apologies, but I'm not very active in luci development and this is the first I'm hearing about lua being on the outs.

This looks like my starting point https://github.com/openwrt/luci/tree/master/applications/luci-app-example ?

csonsino avatar Oct 08 '24 19:10 csonsino

Hi @csonsino

That's not a bad idea. You could also review some of the recent conversions and do a side-by-side comparison ( e.g. luci-app-qos and luci-app-rp-pppoe-server ).

systemcrash avatar Oct 08 '24 21:10 systemcrash

I've started to convert luci-app-squid so you can assign me on that one.

dannil avatar Oct 08 '24 21:10 dannil

If unbound itself (the principal package) is still dependent on lua, maybe it's less of a priority to convert the luci-app-unbound from lua to javascript? Just my 0.02.

stangri avatar Oct 08 '24 23:10 stangri

Not sure how I ended up being the maintainer for luci-app-lxc/luasrc which I have never used. I used to co-maintain luci-app-wiregaurd and wireguard, but haven't been active for a while. Maybe a mix-up?

danrl avatar Oct 09 '24 00:10 danrl

There's also luci-app-ddns. While the web frontend has been ported to JS, the underlying rpcd plugin has not.

To move away from lua, the rpcd lua plugin found at: applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns needs to be ported to an rpcd ucode plugin.

Please add that to the list

dhewg avatar Oct 09 '24 05:10 dhewg

If unbound itself (the principal package) is still dependent on lua, maybe it's less of a priority to convert the luci-app-unbound from lua to javascript? Just my 0.02.

What did you have in mind here @stangri ? I looked in the packages repo and unbound is a compiled C program, and a mish-mash of sh scripts. All the LUA appears to be MVC code on the luci side.

systemcrash avatar Oct 09 '24 12:10 systemcrash

I'm unlikely to have time for converting mosquitto in the near future. I'm no longer employed on this, and I'd hoped to find enough free time to keep up with maintennance, but it's not really working out so far. Seeing as paul donald has already committed a change to this, maybe they can just take over that package :)

karlp avatar Oct 09 '24 13:10 karlp

I dont use any of these packages, but i had a quick look at luci-app-tinyproxy. I think I should be able to manage to translate that

Ramon00 avatar Oct 09 '24 16:10 Ramon00

If unbound itself (the principal package) is still dependent on lua, maybe it's less of a priority to convert the luci-app-unbound from lua to javascript? Just my 0.02.

What did you have in mind here @stangri ? I looked in the packages repo and unbound is a compiled C program, and a mish-mash of sh scripts. All the LUA appears to be MVC code on the luci side.

Oh, I might be wrong here and it's a kresd which is dependent on lua, I remember looking into the resolvers in the past and at least one of them was lua-dependent.

stangri avatar Oct 09 '24 17:10 stangri

I dont use any of these packages, but i had a quick look at luci-app-tinyproxy. I think I should be able to manage to translate that

Shall I write you up for tinyproxy, @Ramon00 ?

systemcrash avatar Oct 09 '24 22:10 systemcrash

I think I will just remove cshark. It appears unmaintained. ( There's also the security aspect of dumping raw network frames to an external party who potentially has network breaches where this data gets exfiltrated. )

See github . com / cloudshark / cshark

Just run an ssh tap from wireshark. Infinitely more configurable. Great GUI with live view.

systemcrash avatar Oct 09 '24 22:10 systemcrash

I'm not sure if the dcwapd feature ever had any users and I haven't looked at that project in a long time, but if I can get it up and running again I'll see if I can migrate the luci lua code.

Perhaps @neheb has a better understanding of dcwapd? It looks like some feature that never really gained popularity. I can't tell if it requires special hardware. Is it like bonding two separate wifi channels into a single data-path for greater throughput or something?

https://github.com/ewsi/dcwapd https://edgewaterwireless.com/dual-channel-wi-fi-tutorial/

systemcrash avatar Oct 09 '24 23:10 systemcrash

I have no idea what it is. It was placed in packages.

ping @csonsino

neheb avatar Oct 09 '24 23:10 neheb

ahcp doesn't seem like it's actively used. It reached a draft RFC about 14 years ago. And its origin page has broken links, and the most recent info indicates it is replaced by hnetd or shncpd, both of which are older and have a similar story.

https://www.irif.fr/~jch/software/ahcp/ https://github.com/jech/ahcpd

Looks like a candidate for the chop.

systemcrash avatar Oct 09 '24 23:10 systemcrash

I don't know if I will be able to dig through luci-app-unbound. My time availability is different than it was. Notes: The zone lists are complex, but less clear documentation, are probably straight forward. The relationships to odhcpd and dnsmasq were implemented with some liberties in LUA environment that maybe are a problem here.

I haven't contributed to luci-app-tinyproxy so I shouldn't be listed there. I am not sure how I would test it.

EricLuehrsen avatar Oct 10 '24 01:10 EricLuehrsen

I think I will just remove cshark. It appears unmaintained. ( There's also the security aspect of dumping raw network frames to an external party who potentially has network breaches where this data gets exfiltrated. )

See github . com / cloudshark / cshark

Just run an ssh tap from wireshark. Infinitely more configurable. Great GUI with live view.

ahcp doesn't seem like it's actively used. It reached a draft RFC about 14 years ago. And its origin page has broken links, and the most recent info indicates it is replaced by hnetd or shncpd, both of which are older and have a similar story.

https://www.irif.fr/~jch/software/ahcp/ https://github.com/jech/ahcpd

Looks like a candidate for the chop.

If you're thinking of removing them, maybe they should be dropped from the packages repo first for the sake of completeness?

dannil avatar Oct 10 '24 17:10 dannil

I am not overly happy hearing about the move to JS given my limited time. What time frame are we talking about here?

For what it's worth - there must be some users of luci-app-wifischedule - at least there are some issues / PRs every now and then.

newkit avatar Oct 10 '24 18:10 newkit

Shall I write you up for tinyproxy, @Ramon00 ?

yeah go for it

Ramon00 avatar Oct 10 '24 19:10 Ramon00

I am not overly happy hearing about the move to JS given my limited time. What time frame are we talking about here?

For what it's worth - there must be some users of luci-app-wifischedule - at least there are some issues / PRs every now and then.

There's no set time frame but for what it's worth this has been a goal since December 2019 so might as well get some traction on it, it's one of the pinned issues.

dannil avatar Oct 10 '24 19:10 dannil

luci-app-dnscrypt-proxy should be removed, it's outdated and I haven't used it for years. Same applies to luci-app-lxc. If someone else wants to migrate this, then please do. I'm not going to do it.

dibdot avatar Oct 12 '24 07:10 dibdot

luci-app-dnscrypt-proxy should be removed, it's outdated and I haven't used it for years. Same applies to luci-app-lxc. If someone else wants to migrate this, then please do. I'm not going to do it.

@dibdot Could you take care of the deletion for the proxy app itself? DoH seems to be the 'better' solution, given that HTTP is ubiquitous and encryption there is largely a handled problem.

systemcrash avatar Oct 14 '24 20:10 systemcrash

would love to give a shot on dockerman

itay-sho avatar Oct 15 '24 11:10 itay-sho

would love to give a shot on dockerman

Go for it.

systemcrash avatar Oct 15 '24 12:10 systemcrash

I'm not sure if the dcwapd feature ever had any users and I haven't looked at that project in a long time, but if I can get it up and running again I'll see if I can migrate the luci lua code.

@csonsino dcwapd is now converted (as of 82e5c888408a9728576f584088432289809fa293 ).

systemcrash avatar Oct 18 '24 03:10 systemcrash

I'm not sure if the dcwapd feature ever had any users and I haven't looked at that project in a long time, but if I can get it up and running again I'll see if I can migrate the luci lua code.

@csonsino dcwapd is now converted (as of 82e5c88 ).

Awesome, thank you @systemcrash! I had just gotten a system up and running with the old code so I'll give the new stuff a quick test.

csonsino avatar Oct 18 '24 13:10 csonsino

Any progress there @itay-sho ?

systemcrash avatar Oct 23 '24 20:10 systemcrash

I won't have time to deal with luci-app-openvpn, and given its current state it is likely better to simply drop it. OpenVPN support should be done from scratch, using wireguard as role model and implemented as proto handler to better fit within the network config concept. Likely also with a focus on setting up a client with preexisting configs.

jow- avatar Oct 23 '24 22:10 jow-

So this effectively means openvpn also needs an overhaul to become a proto in the packages repo.

Is this what you had in mind?

systemcrash avatar Oct 28 '24 18:10 systemcrash