A simple and fast web server
- Built on tokio and hyper
- TLS verification based on rustls
- Supports
HTTP/1
andHTTP/2
- Content compression
auto
gzip
deflate
br
- HTTP request proxy
- ...
Download the binary from the release page
cargo install see
# or
cargo install --git https://github.com/wyhaya/see
docker pull wyhaya/see
Example
Add the following to see.conf
server {
listen 80
echo Hello world
}
mkdir see && vim see/see.conf
Run container
docker run -idt --name see -p 80:80 -p 443:443 -v '$PWD'/see:/ wyhaya/see
Open localhost and you should see hello world
Quick start in current directory
see start
Use specified port and directory
see start -b 80 -p /root/www
You can use see -c [FILE]
to specify the configuration file location
The default configuration file is in ~/.see.conf
server {
listen 80
root /root/www
}
server {
listen 443
root /root/www
host example.com
https {
key ./ssl.key
cert ./ssl.pem
}
}