openwrt / luci

LuCI - OpenWrt Configuration Interface
Apache License 2.0
6.34k stars 2.53k forks source link

convert outstanding LUA apps to JS #7310

Open systemcrash opened 2 weeks ago

systemcrash commented 2 weeks ago

Who is up for the task?

Key:

@stokito @dannil @Ramon00 ?

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.

stokito commented 2 weeks ago

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

csonsino commented 2 weeks ago

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 ?

systemcrash commented 2 weeks ago

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 ).

dannil commented 2 weeks ago

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

stangri commented 2 weeks ago

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.

danrl commented 2 weeks ago

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?

dhewg commented 2 weeks ago

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

systemcrash commented 2 weeks ago

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.

karlp commented 2 weeks ago

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 :)

Ramon00 commented 2 weeks ago

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

stangri commented 2 weeks ago

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.

systemcrash commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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/

neheb commented 1 week ago

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

ping @csonsino

systemcrash commented 1 week ago

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.

EricLuehrsen commented 1 week ago

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.

dannil commented 1 week ago

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?

newkit commented 1 week ago

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.

Ramon00 commented 1 week ago

Shall I write you up for tinyproxy, @Ramon00 ?

yeah go for it

dannil commented 1 week ago

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.

dibdot commented 1 week ago

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.

systemcrash commented 1 week ago

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.

itay-sho commented 1 week ago

would love to give a shot on dockerman

systemcrash commented 1 week ago

would love to give a shot on dockerman

Go for it.

systemcrash commented 5 days ago

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 ).

csonsino commented 5 days ago

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.

systemcrash commented 13 minutes ago

Any progress there @itay-sho ?