mhttp
Minimal HTTP server
Summary
| Latest Version | Unknown |
|---|---|
| License | Unknown |
| CI Status | Failing |
| Stars | 1 |
| Forks | 0 |
| Open Issues | 0 |
| Last Commit | 2024-05-23 |
| Downloads | 0 |
| Last Indexed | 2026-09-06 07:35 |
Tags
Installation
nimble install mhttp
choosenim install mhttp
git clone https://gitlab.com/fksvs/mhttp
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| mhttp | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://gitlab.com/fksvs/mhttp |
|---|---|
| Homepage | https://gitlab.com/fksvs/mhttp |
| Registry Source | gitlab |
README
MHTTP - Minimal HTTPS web server
mhttp is a epoll based minimal HTTPS web server.
Table of Contents
Features
- Support for both IPv4 and IPv6.
- Multi-client architecture.
- GET and HEAD methods.
- Detailed error codes.
- Custom logging.
Requirements
- OpenSSL
Installation
git clone https://github.com/fksvs/mhttp
git clone https://gitlab.com/fksvs/mhttp
- navigate to the
mhttpdirectory and build the source code:
cd mhttp/
make
- to enable debug features (console logging), build with
debugflag:
make debug
Usage
Run mhttp with the following command:
./mhttp [options]
mhttp will then start as daemon.
The server will listen on addresses specified as macro in the src/types.h file. Make sure to configure these macros before compiling or use -a, -p and -6 options according to your requirements.
To enable TLS, generate a certificate and key file. Default file names are cert.pem and key.pem
Options:
- -a [listen address] : listen address for incoming connection
- -p [listen port] : listen port for incoming connections
- -6 : use IPv6
- -d [directory] : main directory to serve
- -s : use TLS
- -c [certificate file] : TLS certificate file
- -k [key file] : TLS private key file
- -f [log file] : set log file
- -h : display this help
Caveats
I developed this web server for fun, many lines of code in this project is probably vulnerable.
License
This project is free software; you can redistribute it and/or modify it under the terms of the GPLv3 license. See LICENSE for details.