This Magisk module contains darkhttpd 1.17, a simple httpd for Android, and stunnel 5.77 to add https support.

All binaries in the Magisk module  are compiled for arm64 CPUs and require only standard libraries from the Android OS.


Use the command

darkhttpd <httpd_home_dir>

to start the httpd. 

With the default config the webserver darkhttpd listens on the port 8080 for http requests only.


To add support for https to darkhttpd, the binary stunnel can be used.

The Magisk module contains a sample config file for stunnel to add https support for darkhttpd:

/system/etc/stunnel_for_darkhttpd


To add SSL support for darkhttpd using that config file, create the necessary directories and files for stunnel:

# create the directories
#
mkdir -p /data/local/tmp/sysroot/var/run /data/local/tmp/sysroot/var/log
mkdir -p /data/local/tmp/sysroot/etc/ssl/certs /data/local/tmp/sysroot/etc/ssl/private

# create the self-signed certificate (or copy an already existing certificate)
#
 openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /data/local/tmp/sysroot/etc/ssl/private/server.key -out /data/local/tmp/sysroot/etc/ssl/certs/server.crt


and start stunnel after starting darkhttpd using this command:


stunnel /system/etc//stunnel_for_darkhttpd


Details
-------

The hardcoded default config file stunnel is : /data/local/tmp/sysroot/etc/stunnel/stunnel.conf

Sourcefiles
-----------

darkhttpd https://github.com/emikulic/darkhttpd

stunnel   https://www.stunnel.org


History

23.02.2026 v1.0.0 /bs
  initial release

12.03.2026 v1.0.1 /bs
  fixed a message in the customization script

