Went looking for resources to learn to develop a simple luci app,
openwrt/docker
- https://github.com/openwrt/docker/blob/main/Dockerfile
- https://github.com/openwrt/docker/blob/main/.github/workflows/containers.yml
- https://github.com/openwrt/docker#rootfs-experimental ::
Then to develop LuCI apps:docker run --rm -it openwrt/rootfs # inside the Docker container mkdir /var/lock/ opkg update opkg install tmate tmate
opkg install luci-ssl # seeAlso: docker-openwrt/Dockerfile
docker-openwrt
- https://github.com/oofnikj/docker-openwrt
- https://github.com/oofnikj/docker-openwrt/blob/master/Dockerfile ::
FROM scratch
ADD rootfs.tar.gz /
RUN mkdir -p /var/lock
RUN opkg remove --force-depends \
dnsmasq* \
wpad* \
iw* && \
opkg update && \
opkg install luci \
wpad-wolfssl \
iw-full \
ip-full \
kmod-mac80211 \
dnsmasq-full \
iptables-mod-checksum
RUN opkg list-upgradable | awk '{print $1}' | xargs opkg upgrade || true
RUN echo "iptables -A POSTROUTING -t mangle -p udp --dport 68 -j CHECKSUM --checksum-fill" >> /etc/firewall.user
RUN sed -i '/^exit 0/i cat \/tmp\/resolv.conf > \/etc\/resolv.conf' /etc/rc.local
ARG ts
ARG version
LABEL org.opencontainers.image.created=$ts
LABEL org.opencontainers.image.version=$version
LABEL org.opencontainers.image.source=https://github.com/oofnikj/docker-openwrt
CMD [ "/sbin/init" ]
luci app development
- src: https://github.com/openwrt/luci
- docs: https://github.com/openwrt/luci/blob/master/CONTRIBUTING.md
- docs: https://openwrt.org/docs/guide-developer/luci
- docs: https://openwrt.org/docs/guide-user/luci/luci.essentials
- docs: https://openwrt.github.io/luci/api/
- docs: https://openwrt.github.io/luci/api/modules/luci.util.html
- docs: https://openwrt.github.io/luci/jsapi/
- docs: https://openwrt.github.io/luci/jsapi/LuCI.html
- docs: https://github.com/openwrt/luci/wiki/DevelopmentEnvironmentHowTo
- there are a number of
luci-*
packages;opkg install luci-ssl
results in an ssl cert being generated - pkg: https://openwrt.org/packages/pkgdata/luci
- pkg: https://openwrt.org/packages/pkgdata/luci-ssl
- pkg: https://openwrt.org/packages/pkgdata/luci-ssl-openssl
- pkg: https://openwrt.org/packages/pkgdata/luci-ssl-nginx
- https://github.com/openwrt/luci/tree/openwrt-22.03/collections/luci/Makefile (uhttpd)
- https://github.com/openwrt/luci/blob/openwrt-22.03/collections/luci-ssl/Makefile (uhttpd+wolfssl)
- https://github.com/openwrt/luci/blob/openwrt-22.03/collections/luci-ssl-openssl/Makefile (uhttpd+openssl)
- https://github.com/openwrt/luci/blob/openwrt-22.03/collections/luci-ssl-nginx/Makefile (nginx+openssl)
- https://openwrt.org/docs/guide-user/services/tls/certs#self_signed_certs
- https://openwrt.org/docs/guide-user/services/webserver/uhttpd#https_enable_and_certificate_settings_and_creation
- https://github.com/mathiasertl/django-ca
- https://openwrt.org/packages/pkgdata/luci-app-acme
- https://github.com/openwrt/luci/blob/master/libs/luci-lib-px5g/src/px5g.c#L68 ... "almost OT note about [dropbear] and PQ Post-Quantum algorithms":
- RSA
- ECC/ECDSA // ed25519
- PQ: Post-Quantum
- https://en.wikipedia.org/wiki/NTRU#Implementations ::
OpenSSH by default uses NTRU combined with the X25519 ECDH key exchange since August 2022, included in version 9.0.[19]
- Streamlined NTRU Prime + x25519 key exchange method
https://github.com/mkj/dropbear/issues/157
- Streamlined NTRU Prime + x25519 key exchange method
- https://en.wikipedia.org/wiki/NTRU#Implementations ::
- example luci code to get started reading:
- https://github.com/openwrt/luci/tree/master/applications/luci-app-example
- https://github.com/openwrt/luci/blob/master/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js
- https://github.com/openwrt/luci/blob/master/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js
- https://github.com/openwrt/luci/blob/master/applications/luci-app-wol/root/usr/share/rpcd/acl.d/luci-app-wol.json
- https://github.com/openwrt/luci/blob/master/applications/luci-app-wol/htdocs/luci-static/resources/view/wol.js
- List of luci-app-
*
packages:
https://openwrt.org/packages/index/luci---applications- luci app ideas:
- https://github.com/openspeedtest/Speed-Test
- https://github.com/tohojo/flent
- https://github.com/openthread/ot-br-posix/blob/main/src/openwrt/otbr-firewall.init.in
- https://github.com/samyk/webscan
- https://github.com/gekmihesg/ansible-openwrt
- https://github.com/ansible-community/ara -style logs on the openwrt client,
- https://github.com/gekmihesg/ansible-openwrt/blob/master/library/openwrt_uci.sh
- luci app ideas:
- https://learnxinyminutes.com/docs/lua/