All Projects → sgreben → Http File Server

sgreben / Http File Server

tiny portable HTTP file server. single binary, no dependencies. linux, osx, windows. #golang

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Http File Server

zipstream
A command line tool that allows you to easily share files and directories over the network
Stars: ✭ 49 (+32.43%)
Mutual labels:  zip, http-server
sheret
A tiny, simple static file web server.
Stars: ✭ 45 (+21.62%)
Mutual labels:  http-server, tiny
Embedio
A tiny, cross-platform, module based web server for .NET
Stars: ✭ 1,007 (+2621.62%)
Mutual labels:  tiny, http-server
unzip
Tiny unzip helper class for .NET 3.5 Client Profile and Mono 2.10, written in pure C#.
Stars: ✭ 25 (-32.43%)
Mutual labels:  zip, tiny
Caddy
Matthew Holt began developing Caddy in 2014 while studying computer science at Brigham Young University. (The name "Caddy" was chosen because this software helps with the tedious, mundane tasks of serving the Web, and is also a single place for multiple things to be organized together.) It soon became the first web server to use HTTPS automatically and by default, and now has hundreds of contributors and has served trillions of HTTPS requests.
Stars: ✭ 35,966 (+97105.41%)
Mutual labels:  http-server
Chili
Chili: HTTP Served Hot
Stars: ✭ 7 (-81.08%)
Mutual labels:  http-server
Librini
Rini is a tiny, non-libc dependant, .ini file parser programmed from scratch in C99.
Stars: ✭ 25 (-32.43%)
Mutual labels:  tiny
Webcpp
用C++开发web服务器框架
Stars: ✭ 23 (-37.84%)
Mutual labels:  http-server
Gunicorn
gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications.
Stars: ✭ 8,001 (+21524.32%)
Mutual labels:  http-server
Server
Serve your Rubix ML models in production with scalable stand-alone model inference servers.
Stars: ✭ 30 (-18.92%)
Mutual labels:  http-server
Na
Share files on your local network
Stars: ✭ 15 (-59.46%)
Mutual labels:  http-server
Jszip
Create, read and edit .zip files with Javascript
Stars: ✭ 7,497 (+20162.16%)
Mutual labels:  zip
Go Bootstrap
Easy way to bootstrap a web server in Go (Routing|Middleware|Https)
Stars: ✭ 27 (-27.03%)
Mutual labels:  http-server
Jerrymouse
A scalable java servlet container base on reactor
Stars: ✭ 27 (-27.03%)
Mutual labels:  http-server
React Colorful
🎨 A tiny (2,5 KB) color picker component for React and Preact apps
Stars: ✭ 951 (+2470.27%)
Mutual labels:  tiny
Cxxhttp
Asynchronous, Header-only C++ HTTP-over-(TCP|UNIX Socket|STDIO) Library
Stars: ✭ 24 (-35.14%)
Mutual labels:  http-server
Markdownshare
The code behind https://markdownshare.com/
Stars: ✭ 15 (-59.46%)
Mutual labels:  http-server
Fht2p
A cross-platform HTTP static file server developed using Rust.
Stars: ✭ 28 (-24.32%)
Mutual labels:  http-server
Pwndrop
Self-deployable file hosting service for red teamers, allowing to easily upload and share payloads over HTTP and WebDAV.
Stars: ✭ 878 (+2272.97%)
Mutual labels:  http-server
Quart
Official mirror of https://gitlab.com/pgjones/quart
Stars: ✭ 872 (+2256.76%)
Mutual labels:  http-server

http-file-server

http-file-server is a dependency-free HTTP file server. Beyond directory listings and file downloads, it lets you download a whole directory as as .zip or .tar.gz (generated on-the-fly).

screenshot

Contents

Examples

Serving a path at /

$ http-file-server /tmp
2018/11/13 23:00:03 serving local path "/tmp" on "/tmp/"
2018/11/13 23:00:03 redirecting to "/tmp/" from "/"
2018/11/13 23:00:03 http-file-server listening on ":8080"

Serving $PWD at /

$ cd /tmp
$ http-file-server
2018/12/13 03:18:00 serving local path "/tmp" on "/tmp/"
2018/12/13 03:18:00 redirecting to "/tmp/" from "/"
2018/12/13 03:18:00 http-file-server listening on ":8080"

Serving multiple paths, setting the HTTP port via CLI arguments

$ http-file-server -p 1234 /1=/tmp /2=/var/tmp
2018/11/13 23:01:44 serving local path "/tmp" on "/1/"
2018/11/13 23:01:44 serving local path "/var/tmp" on "/2/"
2018/11/13 23:01:44 redirecting to "/1/" from "/"
2018/11/13 23:01:44 http-file-server listening on ":1234"

Setting the HTTP port via environment variables

$ export PORT=9999
$ http-file-server /abc/def/ghi=/tmp
2018/11/13 23:05:52 serving local path "/tmp" on "/abc/def/ghi/"
2018/11/13 23:05:52 redirecting to "/abc/def/ghi/" from "/"
2018/11/13 23:05:52 http-file-server listening on ":9999"

Uploading files using cURL

$ ./http-file-server -uploads /=/path/to/serve
2020/03/10 22:00:54 serving local path "/path/to/serve" on "/"
2020/03/10 22:00:54 http-file-server listening on ":8080"
curl -LF "[email protected]" localhost:8080/path/to/upload/to

HTTPS (SSL/TLS)

To terminate SSL at the file server, set -ssl-cert (SSL_CERTIFICATE) and -ssl-key (SSL_KEY) to the respective files' paths:

$ ./http-file-server -port 8443 -ssl-cert server.crt -ssl-key server.key
2020/03/10 22:00:54 http-file-server (HTTPS) listening on ":8443"

Get it

Using go get

go get -u github.com/sgreben/http-file-server

Pre-built binary

Or download a binary from the releases page, or from the shell:

# Linux
curl -L https://github.com/sgreben/http-file-server/releases/download/1.6.0/http-file-server_1.6.0_linux_x86_64.tar.gz | tar xz

# OS X
curl -L https://github.com/sgreben/http-file-server/releases/download/1.6.0/http-file-server_1.6.0_osx_x86_64.tar.gz | tar xz

# Windows
curl -LO https://github.com/sgreben/http-file-server/releases/download/1.6.0/http-file-server_1.6.0_windows_x86_64.zip
unzip http-file-server_1.6.0_windows_x86_64.zip

Use it

http-file-server [OPTIONS] [[ROUTE=]PATH] [[ROUTE=]PATH...]
Usage of http-file-server:
  -a string
    	(alias for -addr) (default ":8080")
  -addr string
    	address to listen on (environment variable "ADDR") (default ":8080")
  -p int
    	(alias for -port)
  -port int
    	port to listen on (overrides -addr port) (environment variable "PORT")
  -q	(alias for -quiet)
  -quiet
    	disable all log output (environment variable "QUIET")
  -r value
    	(alias for -route)
  -route value
    	a route definition ROUTE=PATH (ROUTE defaults to basename of PATH if omitted)
  -ssl-cert string
    	path to SSL server certificate (environment variable "SSL_CERTIFICATE")
  -ssl-key string
    	path to SSL private key (environment variable "SSL_KEY")
  -u	(alias for -uploads)
  -uploads
    	allow uploads (environment variable "UPLOADS")
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].