6 releases

0.2.4 Nov 7, 2024
0.2.3 Apr 21, 2024
0.2.2 Mar 10, 2024
0.2.0 Feb 28, 2024
0.1.0 Feb 10, 2024

#429 in HTTP server

Download history 27/week @ 2024-07-28 5/week @ 2024-09-22 113/week @ 2024-11-03 18/week @ 2024-11-10

131 downloads per month

Custom license

63KB
1.5K SLoC

httprs

License (MIT) CI Status Audit Dependency status Crates.io docs.rs Lines of code

A fast simple command line http server tool.

Why httprs ?

If you're looking for a simple, fast, easy-to-use, generic-MIME-types-supporting and partial-content-supporting static file server like me, it might be an option.

Warning: It is currently an experimental project. Use it at your own risk!!!

Features

the main features are as followings, and certainly more will be added:

  • performant and essy to use
  • multi-platform support
  • multiple MIME support
  • colored logs
  • partial content support

Installation

Download pre-built binaries from release page.

or install with cargo in terminal:

cargo install httprs

Usage

# quick start, running on http://127.0.0.1:9900
httprs
# run in insecure mode
httprs -H 0.0.0.0 -P 10000
# run in secure mode
httprs --secure --key /path/to/keyfile --cert /path/to/certfile
# run with graceful shutdown
httprs --graceful-shutdown
# help for more details
httprs --help

Roadmap

  • Logging
    • Request/Response Logging
    • Silent Mode
    • Logging Level
    • Logging Output into File
  • File Browser Support
    • Generic File Type Supporting: image/text/video/binary
    • File Metadata Details
      • File Size
      • Last Modified
      • More if Necessary
    • File List Ordering
    • Content-Type Customization
  • Multiplatform Support
    • macOS
    • Linux
    • Windows
  • HTTPS/TLS Transmission Encryption
  • Partial Request/Response Support
    • If-Range REQUEST Header
    • If-Match REQUEST Header
    • Range REQUEST Header: when file size exceeds 50MB
    • Accept-Ranges RESPONSE Header
    • Content-Range RESPONSE Header
    • CODE 206 - Partial Content
    • CODE 416 - Range Not Satisfiable
  • CORS Support
  • Transmission Compression
  • Authentication
    • Simple Basic
    • Token Based
  • Graceful Shutdown
  • Proxy
  • Themes and Appearances Customization

How to contribute

Any advice is welcomed and feel free to make a fork and push your own code.

Acknowledgements

Thanks to those who are inspiring me, supporting me, providing me with ideas, advice, solutions, and all users who bear much using this.

Licenses

MIT License

Dependencies

~20–36MB
~608K SLoC