No Description
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.

servefile.1 4.0KB

  1. .TH SERVEFILE 1 "September 2020" "servefile 0.5.0" "User Commands"
  2. .SH NAME
  3. servefile \- small HTTP-Server for temporary file transfer
  5. .B servefile
  6. [\fI\-h\fR\fR] [\fI\-\-version\fR] [\fI\-p PORT\fR] [\fI\-u\fR] [\fI\-s MAX_UPLOAD_SIZE\fR] [\fI\-l\fR]
  7. .IP
  8. [\fI\-\-ssl\fR] [\fI\-\-key KEY\fR] [\fI\-\-cert CERT\fR] [\fI\-a user:password\fR]
  9. \fIfile/directory\fR
  11. Do not use this as a normal web server. This server is optimized for running
  12. a short time and to send files to other people, not for doing high-performance
  13. static file serving.
  15. Servefile is a small HTTP-server intended for temporary file transfer mostly
  16. in the local network. It aims to make transferring single files as painless as
  17. possible and to replace tar/netcat solutions.
  18. With just a file as argument servefile serves just that one file and redirects
  19. all HTTP requests to that file.
  20. Uploads can be done with curl, wget (see EXAMPLES) or a normal browser.
  21. In upload mode with \fB\-u\fR servefile creates a directory and saves all
  22. uploaded files into that directory. When uploading with curl or wget the
  23. filename is extracted from the path part of the url used for the upload.
  24. For SSL support python-openssl (pyssl) needs to be installed. If no key and
  25. cert is given, servefile will generate a key pair for you and display its
  26. fingerprint.
  27. In \fB--tar\fR mode the given file or directory will be packed on (each)
  28. request and piped to the client through the HTTP connection, thus serving
  29. always the latest content of the directory and preventing temporary file
  30. creaton. Tar files will be created containing only the lowest directory name
  31. from the full path, so using /path/to/dir/ as \fIfile/directory\fR argument
  32. will create a tar file starting with the dir/ directory. When giving a file
  33. as argument, only the file without any path will be in the tarfile.
  34. Symlinks will not be dereferenced.
  36. .SS "positional arguments:"
  37. .TP
  38. \fIfile/directory\fR
  39. file or directory (with \fB\-l\fR or \fB\-u\fR) which should be served or uploaded to
  40. .SS "optional arguments:"
  41. .TP
  42. \fB\-h\fR, \fB\-\-help\fR
  43. Show a help message and exit
  44. .TP
  45. \fB\-\-version\fR
  46. Show program's version number and exit
  47. .TP
  48. \fB\-p\fR PORT, \fB\-\-port\fR PORT
  49. Port to listen on
  50. .TP
  51. \fB\-u\fR, \fB\-\-upload\fR
  52. Enable uploads to a given directory
  53. .TP
  54. \fB\-s\fR MAX_UPLOAD_SIZE, \fB\-\-max\-upload\-size\fR MAX_UPLOAD_SIZE
  55. Limit upload size in kB. Size modifiers are allowed,
  56. e.g. 2G, 12MB, 1B.
  57. .TP
  58. \fB\-l\fR, \fB\-\-list\-dir\fR
  59. Show directory indexes and allow access to all
  60. subdirectories
  61. .TP
  62. \fB\-\-ssl\fR
  63. Enable SSL. If no key/cert is specified one will be
  64. generated.
  65. .TP
  66. \fB\-\-key\fR KEY
  67. Key file to use for SSL. If no cert is given with
  68. \fB\-\-cert\fR the key file will also be searched for a cert
  69. .TP
  70. \fB\-\-cert\fR CERT
  71. Certfile to use for SSL
  72. .TP
  73. \fB\-a\fR user:password, \fB\-\-auth\fR user:password
  74. Set user and password for HTTP basic authentication
  75. .TP
  76. \fB\-\-realm\fR REALM
  77. Set a realm for HTTP basic authentication. This is an
  78. arbitrary string which is displayed when doing HTTP
  79. basic authentication
  80. .TP
  81. \fB\-t\fR, \fB\-\-tar\fR
  82. Enable on the fly tar creation for given file or
  83. directory. Note: Download continuation will not be
  84. available.
  85. .TP
  86. \fB\-c\fR method, \fB\-\-compression\fR method
  87. Set compression method, only in combination with
  88. \fB\-\-tar\fR. Can be one of none, gzip, bzip2, xz.
  89. .TP
  90. \fB\-4\fR, \fB\-\-ipv4\-only\fR
  91. Listen on IPv4 only
  92. .TP
  93. \fB\-6\fR, \fB\-\-ipv6\-only\fR
  94. Listen on IPv6 only
  96. Serving a single file with SSL and HTTP Basic auth:
  97. .IP
  98. servefile \-\-ssl \-\-auth foo:bar the_file
  99. .PP
  100. Enabling uploads to a directory:
  101. .IP
  102. servefile \-u dir/
  103. .PP
  104. Uploading file foo as bar to servefile via command line:
  105. .PP
  106. curl \-X PUT http://ip:port/bar \-\-data-binary @foo
  107. curl \-X POST http://ip:port/bar \-\-data-binary @foo
  108. wget http://ip:port/bar \-\-post-file=foo
  109. .PP
  110. Serving a on the fly generated tar.gz file of a directory:
  111. .IP
  112. servefile \-\-tar \-c gzip path/to/dir
  113. .PP
  114. .SH AUTHOR
  115. servefile is developed by Sebastian Lohff <>