LUCI on BusyBox httpd

BusyBox has its own httpd server which is smaller and simpler than uhttpd.
I just tested Luci and it looks like it works just fine on bb-httpd.
This may be a good option for tiny 4Mb routers like TP-Link WR740N.

As far as I understood, uhttpd was developed to make in process lua interpreter, to make a fast native support of ubus over JSON-RPC and to support https. So uhttpd is still better to use if disk space is not so limited.

On x64 platform bb-uhttpd took 8192 bytes (diff sizes of /bin/busybox with enabled and disabled httpd)
On the same x64 image uhttpd took 58Kb but on MIPS WRN1043ND it took 33189.

My question is:

  1. Are any problems expected with busybox-httpd? As far as I see, there is no any rate limiting.
  2. Did I correctly understand the original intent of development uhttpd?
  3. Will you accept a PR with a new package luci-busybox-httpd similar to luci-nginx with configurations?

Does anybody else try such setup?

Some technical details

I used the feature flags to make httpd smaller:

  • HTTPD_ACL_IP=n Remove access by IP checks because this will be handled by firewall
  • HTTPD_DATE=n Disable Date header
  • HTTPD_LAST_MODIFIED=n Disable Last-Modified to use ETag instead
  • HTTPD_ETAG=y use ETag which is faster and easier than Last-Modified
2 Likes

I created a branch with the new busybox-httpd package https://github.com/stokito/openwrt/tree/bb-httpd
Will test it and then create a PR.
Also we must fix minimal luci https://github.com/openwrt/luci/issues/893

1 Like