ouistiti

2025-12-07 0 904

Ouistiti – Small featured HTTP server

Ouistiti

Ouistiti wistiti) is the french name of Marmoset
a little monkey of the New World.

Ouistiti is a small web server to manage and to configure small devices.
It allows to create an unified Web interface for security on
Documents, Websocket, Rest API and more.

Ouistiti is dedicated to be embedded on device for control from a web server.

With Ouistiti, all pages, websockets, scripts are protected by the same way.
It is useless to manage the authentication by your-self.

Features

Multi HTTP versions:

  • HTTP/0.9 HTTP/1.0 HTTP/1.1 : Ouistiti is able to manage each version
    of the HTTP protocol from the requests or to accept only the requests of one version.
  • Keep Alive connection: A client connection may be use for several requests.
  • pipeline requests: Ouistiti is able to receive request during the management
    of the previous one in the same connection.

Secure HTTP – HTTPS:

TLS/SSL connection is available as module with mbedtls or openssl library.

Authentication:

The authentication is available on all client\’s connection. The users\’
password may be encrypted for the storage. The following challenge
are supported:

  • Basic Authentication: Ouistiti is able to check the users to the simplest way.
  • Digest Authentication: Ouistiti allows to create your connection page and check
    the rights.
  • Bearer Authentication: Ouistiti is able to create a token and all instances
    of Ouistiti is able to check this token on the same network domain.
  • OpenID Authentication: Manage the users on a OpenID server (like Google) and
    Ouistiti checks the user\’s rights on it.

Websocket:

A module build a Websocket bridge between HTTP socket client and UNIX socket.
It is able to manage the handshake and the transfer of data to your application.
You develop a cammands\’ server on a UNIX socket, Ouistiti protects it with a HTTPS
connection and its authentication gate. You can find example of servers:

  • chat server
  • jsonrpc server
  • sqlite DB server
  • thrift server

Webstream:

Like the Websocket, Ouistiti is able to protect your stream\’s server. Your
application should only send data on an UNIX socket, Ouistiti does the rest.

  • mp3 music broadcast with pump up the volume.
  • motion-jpeg streamer to stream camera over HTTP.
  • json data streamer.

Static documents:

Like any webserver, Ouistiti is able to send any kinds of files to your client.
And in the same time it can manage them on your server:

  • Rest API: it allows to manage the document files with a Rest API to
    upload, delete, rename the files directly on the server.
  • Home directory: each user can manage his own directory with his private rights.
  • Range request: file may be split into many chunks for the download.

CGI/1.1:

CGI scripts may be call from the client.

Redirect:

Some URI must be redirected on another URI. This module does that with only
configuration file.

  • file to another file.
  • error to a file.
  • generate-204 to emulate a wifi gateway.

Connection filtering:

The server may start with a blacklist and a whitelist of IP address.

Users filtering:

The server stores into a database the rules on URI access.A rule is a combination
of user\’s \”roles\”, type of request and an expression on the URI. Each request is
checked after authentication and before accessing to the ressource.

The module contains its own RESTAPI to set the database, and uses the
authentication module for the rights checking.

Upgrade:

This module is able to upgrade a connection and transfer data between
the opened socket and a UNIX socket server.

The UNIX server may send and receive any kind of data on the socket.
It allows to reuse an unsecure server and uses the HTTP features like
authentication and TLS connection.

It is closed to the websocket module, but it may be usefull for some
protocol over HTTP.

Python:

This module runs the python interpretor to call scripts. Currently, this
module is staging and want to run django site.

Mono threading or multi threading:

Ouistiti may be build to manage client connections with only one process, to
be the fastest webserver.
Or it may create a independants process for each client connection, to create
a sandbox around it.

Dependencies

Ouistiti is written to be built on a maximum of system. The code is
C99 compliant, the threads may be disabled and the configuration may be
loaded from memory.

libhttpserver (libouistiti)

Ouistiti is build over the libhttpserver library. This library contains
HTTP parser, the socket\’s management and some generic modules.

The project is available on github

libhttpserver may be renamed libouistiti when the sources of
the library is available inside ouistiti project.

libb64

The project libb64 is mandatory with some patches.
The source is available in ouistiti-project
or inside ouistiti project.

cryptographic library

SSL/TLS support may be provided by several libraries:

  • mbedtls library
  • openssl library

For authentication dialog with the client the password may be encrypted
with md5 algorithm (this one is not safe, but it is mandatory at least
for Basic and Digest authentication). If SSL/TLS is not available, one
md5 library is mandatory for authentication modules:

  • md5-c library
  • libmd5-rfc library

thread library

ouistiti may not use the pthread library, this depends on the configuration.
But some tools may use the pthread library like websocket servers.

Configuration

ouistiti uses libconfig library, to
set the servers, and the different modules.

Documentation: mod_auth

other libraries

  • jansson library for JWT inside the authentication module
  • sqlite library to manage users database of the authentication

Platforms support

The first version ran on Linux and Windows.
Currently only the Linux version is tested.

Build and installation

Download

The first step download the source tree.

    $ git clone https://githu*b*.*com/ouistiti-project/ouistiti

And the libhttpserver project

    $ git clone https://git*hu**b.com/ouistiti-project/libhttpserver

There is 2 ways to build:

  • Build the libhtppserver outside the ouistiti tree
  • Add libhttpserver directory inside the root of ouistiti

Configuration

The project uses makemore to build
all binaries.

makemore contains a gnumake file
and a configure script. The script is used to write a config file from
the default.config file. With configure you may select the installation
directories and the parts to build.

$ ./configure --prefix=/usr --libdir=/usr/lib/ouistiti --sysconfdir=/etc/ouistiti

makemore may run as Kbuild makefile.
It is possible to select a configuration file directly with make.

Other configurations are availables inside configs/ directory:
* fastmono_defconfig for a fast server but without crash protection.
* fullforked_defconfig for a server which is able to continue to run
after a crash of a connection.

$ make fastmono_defconfig

or

$ make fullforked_defconfig

or for a default configuration:

$ make defconfig

For an embedded device like a gateway or a box, the fullforked_defconfig
is recommanded.

Build configuration:

The configuration is a text file with fields and values.
The defconfig file on the root directory must not be changed. It is possible
to modify or copy an existing file in configs/ directory.

The fields

  • FILE_CONFIG : use the ouistiti.conf file for the configuration.

  • VTHREAD : enable the multithreading into the server.

  • VTHREAD_TYPE : take a value like [fork|pthread|windows] to specify how to manage threads.

  • STATIC : build the application, libraries (libhttpserver, libouiutils…) and modules into a standalone binary.

  • SHARED : build/link the dynamic libraries (libhttpserver, …) and the application with integrated modules.

  • MODULES : build the modules as dynamic libraries, the application will load at the run time.

  • MAX_SERVERS : allow to choice the number of servers and virtual hosts to manage.

Modules configuration:

  • MBEDTLS : build the SSL/TLS support with mbedtls.
  • CGI : build the CGI/1.1 support.
  • DOCUMENT : build the document module.
  • AUTH : build the authentication module.
  • VHOST : build virtual hosting\’s extension
  • WEBSOCKET : build the websocket module.
  • CLIENTFILTER : build the connection filtering module.
  • USERFILTER : build the userfilter module.

Compilation

The compilation is done with gmake and accepts configuration in command line.

Ouistiti is available a specific option DEBUG to add traces in the code and
the debug symbol.

$ make DEBUG=y

[makemore] allows to watch the compilation line with the V option:

$ make V=1

Cross compilation

Ouistiti may be build for another target than the build host. To do
that you needs to add some configurations:

  • CROSS_COMPILE : defines the gcc prefix to use.
  • sysroot : defines the path of the sysroot where the tools should find
    the dependences.
$ make CROSS_COMPILE=arm-linux-gnueabihf

Installation

The default installation will copy the library into /usr/local/lib/ directory,
and binary into /usr/local/bin with the default configuration. The paths
may be changed during the project configuration (see below)

> make install

To create a new directories\’ tree before the installation, the DESTDIR
variable may be changed.

> make DESTDIR=~/packages/ouistiti install

Packaging

Ouistiti is distributed with the recipes to build a distribution\’s package.

  • buildroot
  • yocto
  • slackware
  • debian

Configuration

Ouistiti uses libconfig for
the configuration. Find more information into
configuration chapter.

Performances

Binaries size

Ouistiti allows to select each feature that you need during the build configuration.
The default configuration allows to use all features into the minimum place.

Here some sizes for arm after stripping:

  • all features statically linked: 154ko + (mbedtls, libconfig, sqlite3, crypt and c libraries)
  • a small configuration (document): 73ko + (c library)
  • with the features as modules: 24ko + 158ko of modules + 60ko of libhttpserver and other libraries

Memory usage

The memory usage depends to the build configuration and the number of simultanous connections.

With the default configuration for arm architecture the usage is around 4.5Mo for the main process
and around 13.5Mo for each client\’s connection. But the small configuration needs only 5.5 Mo.

With only one process in Ouistiti the VmSize is around 26Mo.

The performance page gives more informations about memory usage.

Timing

Ouistiti is not a web server for big network, but it get good results for the document delivery.
The performances depend to the build configuration and you need.

  • To get the best results, Ouistiti needs to be build without thread
    management (VTHREAD=n).
  • To get the maximum of security, Ouistiti needs to be build with one
    process per client (VHTREAD=y and VTHREAD_TYPE=fork).

Ouistiti may be faster than lighttpd 1.4, but without all features.
You can find some test results into the performance page.

下载源码

通过命令行克隆项目:

git clone https://github.com/ouistiti-project/ouistiti.git

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

申明:本文由第三方发布,内容仅代表作者观点,与本网站无关。对本文以及其中全部或者部分内容的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。本网发布或转载文章出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,也不代表本网对其真实性负责。

左子网 开发教程 ouistiti https://www.zuozi.net/31276.html

cioxo_pipeline
上一篇: cioxo_pipeline
IntelliJ_Jahia_plugin
下一篇: IntelliJ_Jahia_plugin
常见问题
  • 1、自动:拍下后,点击(下载)链接即可下载;2、手动:拍下后,联系卖家发放即可或者联系官方找开发者发货。
查看详情
  • 1、源码默认交易周期:手动发货商品为1-3天,并且用户付款金额将会进入平台担保直到交易完成或者3-7天即可发放,如遇纠纷无限期延长收款金额直至纠纷解决或者退款!;
查看详情
  • 1、描述:源码描述(含标题)与实际源码不一致的(例:货不对板); 2、演示:有演示站时,与实际源码小于95%一致的(但描述中有”不保证完全一样、有变化的可能性”类似显著声明的除外); 3、发货:不发货可无理由退款; 4、安装:免费提供安装服务的源码但卖家不履行的; 5、收费:价格虚标,额外收取其他费用的(但描述中有显著声明或双方交易前有商定的除外); 6、其他:如质量方面的硬性常规问题BUG等。 注:经核实符合上述任一,均支持退款,但卖家予以积极解决问题则除外。
查看详情
  • 1、左子会对双方交易的过程及交易商品的快照进行永久存档,以确保交易的真实、有效、安全! 2、左子无法对如“永久包更新”、“永久技术支持”等类似交易之后的商家承诺做担保,请买家自行鉴别; 3、在源码同时有网站演示与图片演示,且站演与图演不一致时,默认按图演作为纠纷评判依据(特别声明或有商定除外); 4、在没有”无任何正当退款依据”的前提下,商品写有”一旦售出,概不支持退款”等类似的声明,视为无效声明; 5、在未拍下前,双方在QQ上所商定的交易内容,亦可成为纠纷评判依据(商定与描述冲突时,商定为准); 6、因聊天记录可作为纠纷评判依据,故双方联系时,只与对方在左子上所留的QQ、手机号沟通,以防对方不承认自我承诺。 7、虽然交易产生纠纷的几率很小,但一定要保留如聊天记录、手机短信等这样的重要信息,以防产生纠纷时便于左子介入快速处理。
查看详情

相关文章

猜你喜欢
发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务