table of contents
SERVEFILE(1) | User Commands | SERVEFILE(1) |
NAME¶
servefile - small HTTP-Server for temporary file transferSYNOPSIS¶
servefile [ -h] [--version] [-p PORT] [-u] [-s MAX_UPLOAD_SIZE] [-l]- [--ssl] [--key KEY] [--cert CERT]
[-a user:password] file/directory
DISCLAIMER¶
Do not use this as a normal web server. This server is optimized for running a short time and to send files to other people, not for doing high-performance static file serving.DESCRIPTION¶
Servefile is a small HTTP-server intended for temporary file transfer mostly in the local network. It aims to make transferring single files as painless as possible and to replace tar/netcat solutions.COMMAND SUMMARY¶
positional arguments:¶
- file/directory
- file or directory (with -l or -u) which should be served or uploaded to
optional arguments:¶
- -h, --help
- Show a help message and exit
- --version
- Show program's version number and exit
- -p PORT, --port PORT
- Port to listen on
- -u, --upload
- Enable uploads to a given directory
- -s MAX_UPLOAD_SIZE, --max-upload-size MAX_UPLOAD_SIZE
- Limit upload size in kB. Size modifiers are allowed, e.g. 2G, 12MB, 1B.
- -l, --list-dir
- Show directory indexes and allow access to all subdirectories
- --ssl
- Enable SSL. If no key/cert is specified one will be generated.
- --key KEY
- Key file to use for SSL. If no cert is given with --cert the key file will also be searched for a cert
- --cert CERT
- Certfile to use for SSL
- -a user:password, --auth user:password
- Set user and password for HTTP basic authentication
- --realm REALM
- Set a realm for HTTP basic authentication. This is an arbitrary string which is displayed when doing HTTP basic authentication
- -t, --tar
- Enable on the fly tar creation for given file or directory. Note: Download continuation will not be available.
- -c method, --compression method
- Set compression method, only in combination with --tar. Can be one of none, gzip, bzip2.
- -4, --ipv4-only
- Listen on IPv4 only
- -6, --ipv6-only
- Listen on IPv6 only
EXAMPLES¶
Serving a single file with SSL and HTTP Basic auth:- servefile --ssl --auth foo:bar the_file
- servefile -u dir/
curl -X PUT http://ip:port/bar --data-binary @foo
curl -X POST http://ip:port/bar --data-binary @foo
wget http://ip:port/bar --post-file=foo Serving a on the fly generated tar.gz file of a directory:
- servefile --tar -c gzip path/to/dir
AUTHOR¶
servefile is developed by Sebastian Lohff <seba@someserver.de>April 2012 | servefile 0.4.2 |