httpserve is an experimental web server and command-line http clients. Its set of tools permits to build a simple distributed file server and a fuse file client.

Web server - httpserve.py

The httpserve command let's you serve a file or folders indexed by their sha1.

usage: httpserve.py [-h] [--config configuration file] [--count n] [--fork n]
                    [--bw_limit n] [--sha1] [--public_ip ip address]
                    [--listen_address interface address] [--listen_port port]
                    [--allowed_ip ip address] [--forbidden_code http code]
                    [--nossl] [--ssl_proto protocol] [--ssl_key file]
                    [--ssl_cert file] [--ssl_duration days] [--redirect_root]
                    filename [filename ...]

Serve a file over http.

positional arguments:
  filename              Files to serve

optional arguments:
  -h, --help            show this help message and exit
  --config configuration file, -c configuration file
                        Configuration file
  --count n, -n n       Uploads count before exiting
  --fork n, -k n        Number of parallel connection (forked children count)
  --bw_limit n, -l n    Maxmum bandwidth (kB/s) by client
  --sha1                Prefix urls with the sha1 sum of the file (the sha1
                        may be stored in a file named filename.sha)
  --public_ip ip address
                        Public ip address
  --listen_address interface address, -i interface address
                        Interface to bind to
  --listen_port port, -p port
                        Ports list (comma separated) or range (boundaries
                        separated with a minus)
  --allowed_ip ip address
                        Comma separated list of allowed ip addresses
  --forbidden_code http code
                        Http code to return in case of forbiden request
  --nossl, --http       Disable SSL
  --ssl_proto protocol  SSL protocol to be used (one of "SSLv3" or "TLSv1")
  --ssl_key file        SSL private key file
  --ssl_cert file       SSL certificate file
  --ssl_duration days   SSL generated certificate validity duration in days
  --redirect_root       Return 404 to requests on /

Web client - httpget.py

This client is a simple client like wget that download files from multiple hosts.

usage: httpget.py [-h] [--config configuration file]
                  [--urls_list http://host1/,http://host2/] [--nconn n]
                  [--bw_limit n]
                  url [url ...]

Get a file over http.

positional arguments:
  url                   Urls to download

optional arguments:
  -h, --help            show this help message and exit
  --config configuration file, -c configuration file
                        Configuration file
  --urls_list http://host1/,http://host2/, -H http://host1/,http://host2/
                        Urls of host to download from
  --nconn n, -n n       Concurrent connections
  --bw_limit n, -l n    Max bandwidth limitation (kB/s)

Web client - httpmount.py

httpmount is a filesystem over http. It's meant to mount web servers filebrowser as a filesystem.

Usage:
httpmount client.

httpmount.py [mountpoint] [options]

Options:
    --version              show program's version number and exit
    -h, --help             show this help message and exit
    -o opt,[opt...]        mount options
    -o config=configuration file
                           Configuration file
    -o root=URL            Urls of root directories [default:
                           http://127.0.0.1:8080/]
    -o store=PATH          Store files in PATH [default: store/]
    -o urls_list=http://host1/,http://host2/
                           Urls of host to download from
    -o nconn=n             Concurrent connections
    -o bw_limit=n          Max bandwidth limitation (kB/s)

FUSE options:
[...]