silly simple http server
Find a file
2024-07-23 13:27:17 +02:00
.cargo add cargo config for static linking 2022-06-05 20:45:42 +02:00
src use the standard x-forwarded-for instead of x-real-ip to get client ip from reverse proxy 2024-07-23 13:27:17 +02:00
.gitignore remove cargo.lock 2022-06-04 20:11:03 +02:00
Cargo.toml init 2022-06-04 19:22:41 +02:00
README.md add README.md 2024-05-27 22:17:32 +02:00
rustfmt.toml add rustfmt 2024-03-23 18:03:21 +01:00

webserver

Simple http server written from scratch with no library depencencies.

features

  • list directory contents
  • serve index.html for a directory that has such a file
  • serve /path/to/<something>.html when you request /path/to/<something>, making urls a bit nicer
  • partial file requests so you can watch large video files without needing to load all of it first
  • logs requests to stdout

usage

webserver [127.0.0.1:12345] [/path/to/site/root]

Both arguments are optional but you must specify the ip if you specify the path.

The default address is 127.0.0.1:55566 and it will serve the current directory.