blck

ephemeral pastebin/url shortener
git clone https://git.parazyd.org/blck
Log | Files | Refs | README | LICENSE

commit 9e8213c39b75f581bb9ecdae9d308afdcd114b0d
parent a4d4b05df50d11aa1d84ba00dedac38181203f43
Author: parazyd <parazyd@dyne.org>
Date:   Tue,  9 Feb 2021 07:34:44 +0100

Update README.

Diffstat:
MREADME.md | 54++++++++++--------------------------------------------
1 file changed, 10 insertions(+), 44 deletions(-)

diff --git a/README.md b/README.md @@ -1,56 +1,30 @@ blck ==== -an ephemeral pastebin/url-shortener. you can only retrieve the paste or -url once, and afterwards it's deleted from the server. +an ephemeral pastebin. you can only retrieve the paste once, and +afterwards it's deleted from the server. installation ------------ -get `python-flask` and execute `blck.py`. by default it starts on -`localhost:5000`, but you can configure it at the bottom of the script. +get `python-flask` and execute `blck.py`. if not running in debug mode, you also need `bjoern`. find it at https://github.com/jonashaag/bjoern. -run `blck.py -h` to see usage info. +run `blck.py -h` to see usage info. nginx ----- ``` -server { - listen 80; - listen [::]:80; - server_name blck.cf; - - location /.well-known/acme-challenge/ { - alias /tmp/blckssl/; - try_files $uri =404; - } - - return 301 https://$server_name$request_uri; -} - -server { - listen 443 ssl; - listen [::]:443 ssl; - server_name blck.cf; - - ssl_certificate /etc/ssl/blck.cf.pem; - ssl_certificate_key /etc/ssl/blck.cf.key; - - error_log /var/log/nginx/blck.cf_error.log warn; - access_log /var/log/nginx/blck.cf_access.log combined; - - location / { - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto https; - proxy_pass http://127.0.0.1:5000; - } +location / { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto https; + proxy_pass http://127.0.0.1:5000; } ``` @@ -61,13 +35,5 @@ usage either use the website, or curl: ``` -curl -F 'url=https://github.com/parazyd/blck.cf' http://blck.cf +curl -F 'c=@-' http://blck.cf < file ``` - - -how does it work? ------------------ - -simple enough... sql sucks, so we don't keep the urls in a sqlite or -something, but we rather utilize the filesystem. the script itself is -very short and understandable so give it a look.