Update README.md - fiche - A pastebin adjusted for gopher use | |
git clone git://vernunftzentrum.de/fiche.git | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 6b2569b406a2d7aa8c5da2c30ddc716b2026fe82 | |
parent 924341e9733fcf18bd870214e92c2e36208e7d91 | |
Author: solusipse <[email protected]> | |
Date: Sat, 14 Sep 2013 01:00:23 +0200 | |
Update README.md | |
Diffstat: | |
README.md | 157 ++++++++++++++++++++++++++----- | |
1 file changed, 132 insertions(+), 25 deletions(-) | |
--- | |
diff --git a/README.md b/README.md | |
@@ -32,65 +32,172 @@ ls -la | nc localhost 9999 | |
``` | |
``` | |
-cat file.txt | nc someserverrunningfiche.net 1234 | |
+cat file.txt | nc solusipse.net 9999 | |
``` | |
``` | |
echo just testing! | nc code.solusipse.net 9999 | |
``` | |
-If you already haven't set up your server on localhost, try third line! My ser… | |
-pastebin server powered by fiche - ```code.solusipse.net``` on port ```9999```. | |
+If you haven't already set up your server on localhost, try second or third co… | |
+providing fiche-based service all the time on this address `solusipse.net` and… | |
- To upload text you need to have netcat installed (to check if netcat is inst… | |
## Server-side usage ## | |
``` | |
-usage: fiche [-bdpqs]. | |
- [-d host_domain.com] [-p port] [-s slug_size] | |
- [-o output_directory] [-b buffer_size] [-q queue_size] | |
+usage: fiche [-pbsdolBuw]. | |
+ [-d domain] [-p port] [-s slug size] | |
+ [-o output directory] [-B buffer size] [-u user name] | |
+ [-l log file] [-b banlist] [-w whitelist] | |
``` | |
-These are command line arguments. You don't have to provide any, but doing tha… | |
+These are command line arguments. You don't have to provide any, but providing… | |
will use these default settings: | |
-```C | |
+``` | |
domain = "http://localhost/"; | |
basedir= "~/code/"; | |
port = 9999; | |
slug_size = 4; | |
buffer_size = 8192; | |
-queue_size = 100; | |
``` | |
-Examples: | |
+### Arguments ### | |
+ | |
+Most important is providing **basedir** and **domain**. | |
+ | |
+----------------- | |
+ | |
+#### Basedir #### | |
+ | |
+Basedir should be **absolute** path to directory where you would like to store… | |
+ | |
+ | |
+``` | |
+fiche -b /absolute/path/to/directory/ | |
+``` | |
+ | |
+``` | |
+fiche -b /home/www/code/ | |
+``` | |
+ | |
+----------------- | |
+ | |
+#### Domain #### | |
+ | |
+Domain should be provided in such format ```domain.com```. | |
``` | |
fiche -d domain.com | |
``` | |
``` | |
-fiche -s 6 -p 6666 | |
+fiche -d subdomain.domain.com | |
``` | |
-### Basic arguments ### | |
+----------------- | |
-Most important is providing **basedir** and **domain**. | |
+#### Slug size #### | |
-Basedir should be **absolute** path to directory where you would like to store… | |
+This will force fiche to create random slugs with given length, example: | |
-Domain should be provided in such format ```domain.com```. | |
+``` | |
+fiche -s 6 | |
+``` | |
+ | |
+``` | |
+http://domain.com/abcdef/ | |
+``` | |
+ | |
+----------------- | |
+ | |
+#### User name #### | |
+ | |
+If you use fiche as service (see details below) you may want to save files as … | |
+there's example: | |
+ | |
+``` | |
+fiche -u http | |
+``` | |
+ | |
+----------------- | |
+ | |
+#### Buffersize #### | |
+ | |
+This parameter defines max file size uploaded by user, by default it is set to… | |
+Use `-B` parameter to change it: | |
+ | |
+``` | |
+fiche -B 2048 | |
+``` | |
+ | |
+----------------- | |
+ | |
+#### Log file ### | |
+ | |
+Path to file where all logs will be stored: | |
+ | |
+``` | |
+fiche -l /home/www/fiche-log.txt | |
+``` | |
+ | |
+----------------- | |
+ | |
+#### Ban list ### | |
+ | |
+Path to file where you provided all banned IP adresses: | |
+ | |
+``` | |
+fiche -b /home/www/fiche-bans.txt | |
+``` | |
+ | |
+----------------- | |
+ | |
+#### White list #### | |
+ | |
+If whitelist mode is enabled, only addresses from list will be able to upload … | |
+ | |
+``` | |
+fiche -w /home/www/fiche-whitelist.txt | |
+``` | |
-Slug size: ```domain.com/SLUG_OF_CHOSEN_LENGTH/```. | |
+----------------- | |
+ | |
+#### Whitelist and banlist syntax #### | |
+ | |
+There is no specific syntax, there files may contain not only addresses. | |
+ | |
+----------------- | |
+ | |
+#### Examples #### | |
+ | |
+Logging connections with banlist: | |
+ | |
+``` | |
+fiche -d domain.com -l /home/www/log.txt -b /home/www/bans.txt | |
+``` | |
+ | |
+----------------- | |
+ | |
+Only for personal use with whitelist | |
+ | |
+``` | |
+fiche -d domain.com -w /home/www/whitelist.txt | |
+``` | |
+ | |
+----------------- | |
+ | |
+Custom output directory, bigger slug size, reduced buffer, custom port: | |
+ | |
+``` | |
+fiche -d domain.com -o /media/disk/fiche/ -s 8 -B 2048 -p 6666 | |
+``` | |
-### Parameters for advanced users ### | |
-- Buffer size | |
-- Queue size | |
## Running as service ## | |
-e | |
You can run fiche as service, there is simple systemd example: | |
``` | |
@@ -98,13 +205,13 @@ You can run fiche as service, there is simple systemd exam… | |
Description=FICHE-SERVER | |
[Service] | |
-ExecStart=/usr/local/bin/fiche -d code.solusipse.net -o /home/www/code/ | |
+ExecStart=/usr/local/bin/fiche -d code.solusipse.net -o /home/www/code/ -l /ho… | |
[Install] | |
WantedBy=multi-user.target | |
``` | |
-In service mode you have to set output directory with ```-d``` parameter, ther… | |
+In service mode you have to set output directory with `-o` parameter, there's … | |
``` | |
fiche -o /home/www/code/ | |
@@ -113,7 +220,7 @@ fiche -o /home/www/code/ | |
## Webserver ## | |
To make files available for users, you need to host them somehow. Http server … | |
-directory to ```BASEDIR```. **Remember that you have to distribute these files… | |
+directory to ```BASEDIR```. | |
There is sample configuration for nginx: | |
@@ -121,11 +228,11 @@ There is sample configuration for nginx: | |
server { | |
listen 80; | |
server_name mysite.com www.mysite.com; | |
- add_header Content-Type text/plain; | |
+ charset utf-8; | |
location / { | |
root /home/www/code/; | |
- index index.html; | |
+ index index.txt index.html; | |
} | |
} | |
``` |