A dead-simple multi-threaded web and file server.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Johannes Wünsche 40f23c1693
Add Anti-Floc Header
2 months ago
data Add icon 4 months ago
src Add Anti-Floc Header 2 months ago
tests Create TesterStruct 4 months ago
.gitignore Add file server test 4 months ago
Cargo.lock Add file server test 4 months ago
Cargo.toml Use http2 3 months ago
Dockerfile Set default Dockerfile to web mode 4 months ago
README.md Add https section 4 months ago

README.md

rusty-conveyor - a simple multi-threaded web and file server

A no config static binary to host web and file server via http

Build

No prebuilt binaries are provided at the moment. To use the application you'll have to build it yourself. For this you'll need a configured Rust toolchain. Check out the page rust-lang page for a quick setup.

When you have everything setup, clone the repository and use cargo to build the repository.

$ git clone https://git.spacesnek.rocks/johannes/rusty-conveyor.git
$ cd rusty-conveyor
$ # Build for the release target
$ # this will drastically decrease the size of the resulting binaries
$ cargo build --release

Usage with Container Environments

A Dockerfile is given that produces a container able to mount files to /data with a single statically linked binary. The default mode for the container is the web mode automatically indexing to index.html files on directories. You can then mount your files to /data like this:

$ # Use any compatible container client you want e.g. docker, podman ...
$ podman -v ./your-files:/data -p 7331:7331 rusty-conveyor

Usage

$ ./rusty-conveyor --help
rusty-conveyor 0.1
Johannes Wünsche <johannes@spacesnek.rocks>
A dead simple multi-threaded web and file server via http.

USAGE:
    rusty-conveyor [FLAGS] [OPTIONS]

FLAGS:
    -h, --help       
            Prints help information

    -V, --version    
            Prints version information

    -w, --web        
            Serve files in style of a web server. In detail things like `index.html` can be omitted in the address to
            better serve usable for web browsers.

OPTIONS:
    -a, --address <ADDRESS>    
            The address on which the application should bind to. This can be any identifier e.g. localhost or IP
            configured. [default: 127.0.0.1]
    -d, --directory <DIR>      
            The directory in which files are served from. Any path can be, as content are held in memory to deliver fast
            response the total size of files should not be larger than available memory. [default: .]
    -p, --port <PORT>          
            The port on which the application binds to on the given address. [default: 7331]

HTTPS

For https use a reverse proxy like traefik or sozu.