All Projects → zhaojh329 → Libuhttpd

zhaojh329 / Libuhttpd

Licence: mit
A very flexible, lightweight and fully asynchronous HTTP server library based on libev and http-parser for Embedded Linux.

Programming Languages

c
50402 projects - #5 most used programming language
lua
6591 projects

Projects that are alternatives of or similar to Libuhttpd

Evmongoose
DEPRECATED. Evmongoose is an asynchronous, event(libev) based multi-protocol embedded networking library with functions including TCP, HTTP, WebSocket, MQTT and much more. It's based on mongoose and libev implementation and it's support Lua API.
Stars: ✭ 199 (-34.11%)
Mutual labels:  openwrt, lede, https
Xkcptun
xkcptun is kcp tunnel for OpenWRT&LEDE, implemented in c language
Stars: ✭ 419 (+38.74%)
Mutual labels:  openwrt, lede, embedded
pki
Certificate Authority management suite
Stars: ✭ 23 (-92.38%)
Mutual labels:  openssl, https
OpenWrtAction
Openwrt automatic compilation project of github action
Stars: ✭ 28 (-90.73%)
Mutual labels:  openwrt, lede
firmware-core
nodewatcher firmware.
Stars: ✭ 26 (-91.39%)
Mutual labels:  openwrt, lede
luci-openwisp
OpenWISP configuration interface implemented as LuCI extensions
Stars: ✭ 21 (-93.05%)
Mutual labels:  openwrt, lede
apm82181-lede
APM82181 LEDE Repository
Stars: ✭ 18 (-94.04%)
Mutual labels:  openwrt, lede
OpenWrts
OPENWRT 固件(Raspberry Pi4B/3B+,NanoPi R4S,Orange Pi R1Plus,x86) 依源码更新自动编译
Stars: ✭ 100 (-66.89%)
Mutual labels:  openwrt, lede
lede-dockerbuilder
A (container based) LEDE/OpenWrt image builder.
Stars: ✭ 53 (-82.45%)
Mutual labels:  openwrt, lede
Openwrt Shadowsocks
Shadowsocks-libev for OpenWrt/LEDE
Stars: ✭ 3,091 (+923.51%)
Mutual labels:  openwrt, lede
scal
System Configuration Abstraction Layer
Stars: ✭ 14 (-95.36%)
Mutual labels:  openwrt, lede
scale-network
SCaLE's on-site expo network configurations, wifi, tooling, and scripts
Stars: ✭ 13 (-95.7%)
Mutual labels:  openwrt, lede
openwrt-scripts
A collection of some useful scripts running on OpenWrt/LEDE routers
Stars: ✭ 43 (-85.76%)
Mutual labels:  openwrt, lede
BaaSDelphiSamples
💾 Code samples for BaaS and PaaS using Delphi
Stars: ✭ 30 (-90.07%)
Mutual labels:  openssl, https
meta-openwrt
OE/Yocto metadata layer for OpenWRT
Stars: ✭ 75 (-75.17%)
Mutual labels:  openwrt, lede
HomeLede
An Openwrt firmware for home use scenarios.
Stars: ✭ 925 (+206.29%)
Mutual labels:  openwrt, lede
ansible-nnxx
Ansible configurations for the nnxx infrastructure
Stars: ✭ 11 (-96.36%)
Mutual labels:  openwrt, lede
Rxffmpeg
🔥💥RxFFmpeg 是基于 ( FFmpeg 4.0 + X264 + mp3lame + fdk-aac + opencore-amr + openssl ) 编译的适用于 Android 平台的音视频编辑、视频剪辑的快速处理框架,包含以下功能:视频拼接,转码,压缩,裁剪,片头片尾,分离音视频,变速,添加静态贴纸和gif动态贴纸,添加字幕,添加滤镜,添加背景音乐,加速减速视频,倒放音视频,音频裁剪,变声,混音,图片合成视频,视频解码图片,抖音首页,视频播放器及支持 OpenSSL https 等主流特色功能
Stars: ✭ 3,358 (+1011.92%)
Mutual labels:  https, openssl
httpsbook
《深入浅出HTTPS:从原理到实战》代码示例、勘误、反馈、讨论
Stars: ✭ 77 (-74.5%)
Mutual labels:  openssl, https
ansible-openwrt
Ansible collection to configure your OpenWrt devices more quickly and automatically (without Python)
Stars: ✭ 34 (-88.74%)
Mutual labels:  openwrt, lede

libuhttpd(中文)

license PRs Welcome Issue Welcome Release Version Build Status

A very flexible, lightweight and fully asynchronous HTTP server library based on libev and http-parser for Embedded Linux.

Features

  • Lightweight and fully asynchronous
  • Use libev as its event backend
  • Support HTTPS - OpenSSL, mbedtls and CyaSSl(wolfssl)
  • Support HTTP pipelining
  • Support IPv6
  • Support plugin
  • Support upload large file
  • Support HTTP range requests
  • Support multi-process model - The same multi-process model as Nginx
  • Flexible - you can easily extend your application to have HTTP/HTTPS services
  • Code structure is concise and understandable, also suitable for learning

Dependencies

  • libev - A full-featured and high-performance event loop
  • http-parser - A high performance parser for HTTP messages written in C
  • mbedtls - If you choose mbedtls as your SSL backend
  • wolfssl - If you choose wolfssl as your SSL backend
  • openssl - If you choose openssl as your SSL backend

Benchmark

Nginx

$ wrk -t4 -c400 -d10s http://localhost:80/test.html
Running 10s test @ http://localhost:80/test.html
4 threads and 400 connections
Thread Stats   Avg      Stdev     Max   +/- Stdev
	Latency     3.54ms    7.32ms 224.58ms   93.30%
	Req/Sec    40.63k    12.49k   96.29k    74.50%
1622012 requests in 10.05s, 385.09MB read
Requests/sec: 161390.39
Transfer/sec:     38.32MB

libuhttpd

$ wrk -t4 -c400 -d10s http://localhost:8080/test.html
Running 10s test @ http://localhost:8080/test.html
4 threads and 400 connections
Thread Stats   Avg      Stdev     Max   +/- Stdev
	Latency     2.12ms    3.01ms  31.30ms   89.26%
	Req/Sec    70.87k    12.53k  142.54k    79.75%
2826394 requests in 10.05s, 547.18MB read
Requests/sec: 281328.83
Transfer/sec:     54.46MB

Configure

See which configuration are supported

~/libuhttpd/$ mkdir build && cd build
~/libuhttpd/build$ cmake .. -L
~/libuhttpd/build$ cmake .. -LH

Build and install

~/libuhttpd/build$ make && sudo make install

Run Example

Run

~/libuhttpd/build$ ./example/simple_server -v

Then use the command curl or browser to test

$ curl 'https://127.0.0.1:8000' -v

Install on OpenWrt

opkg update
opkg list | grep libuhttpd
opkg install libuhttpd-nossl

If the install command fails, you can compile it yourself.

Example

Contributing

If you would like to help making libuhttpd better, see the CONTRIBUTING.md file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].