#web-server #fcgi #config-file

app flash_rust_ws

General purpose Webserver with TLS, File, FCGI, DAV and Websocket support

8 releases

0.5.1 Sep 4, 2024
0.5.0 May 6, 2024
0.4.4 Oct 6, 2023
0.4.3 May 13, 2023
0.3.3 Sep 3, 2021

#61 in HTTP server

Download history 94/week @ 2024-08-29 46/week @ 2024-09-05 9/week @ 2024-09-12 9/week @ 2024-09-19 11/week @ 2024-09-26 3/week @ 2024-10-03

350 downloads per month

AGPL-3.0

335KB
9K SLoC

Project Status: Active – The project has reached a stable, usable state and is being actively developed. GitHub GitHub Workflow Status

A Webserver written in Rust. Build on the speedy Hyper.

Usage

Installation

Install cargo and then: cargo install flash_rust_ws (stable) cargo install --git https://github.com/User65k/flash_rust_ws.git (hottest kind of hot)

Running

Create a config file and execute the binary ☺️

See the Wiki for some help with the config file.

You will need at least a single Host containing a Mount Path.

Minimal Example:

["example.com"]
ip = "127.0.0.1:80"
dir = "/var/www/"

Let's Encrypt Example:

["example.com"]
ip = "[::]:443"
validate_server_name = true
dir = "/var/www/"
tls.host.ACME = {uri="https://acme-staging-v02.api.letsencrypt.org/directory",cache_dir=".",contact=["mailto:admin@example.com"]}

Goals

  • Easy configuration and safe defaults
  • Light Footprint
  • Speed

Functions

  • Virtual Hosts
  • "Mount Points" to serve files from
  • FastCGI
  • HTTPS
    • Cert per vHost / SNI
    • Cert per Keytype (EC, ED, RSA)
    • ACME-TLS
  • HTTP2
  • WebDAV
  • Reverse-Proxy
  • Websocket
  • Customizable Logging
  • Security
    • HTTP user auth: Digest - (MD5 because FireFox, but better that nothing)
    • Systemd Socket Activation
    • DoS protection
      • Don't be affected by Sloloris
      • limit connection count ?
      • rate ?
      • min speed ?
    • no default files
    • no DAV without users?
    • no folder listings (except DAV)
    • recomended http headers by default
    • no path traversals :-)
    • only use filters based on allowed values
    • only https ?
    • avoid BEAST and CRIME
    • only follow symlinks if told so
  • SCGI

Dependencies

~14–25MB
~384K SLoC