From 4a8ce7e2862b338a7f8e34d016a3119290239b0b Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 29 Nov 2022 16:09:22 -0500 Subject: initial commit --- README.md | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..ed5ccc5 --- /dev/null +++ b/README.md @@ -0,0 +1,72 @@ + +# README for outbound +This project is a small Flask app that merely redirects to the link farther down the URL. The purpose is to enable my web server to record visits to outbound links. This is not a URL shortener or obfuscator. It's a cheap way for me to see what links my site vistors use, without using javascript. + +## Upstream +The original project is at . + +## Features/design goals + +* redirect only if referer is in whitelist +* simple web config +* simple app config +* send to web server logs the redirects, or else 404s for invalid link requests + +## Alternatives +Probably some "proper" web analytics suite or javascript garbage that I do not want to learn or use. + +## Reason for existence +To show what links on my site are used. + +## Using + +### Web app +Run a simple dev environment. + + FLASK_APP=outbound.py FLASK_DEBUG=True flask run --host=0.0.0.0 --extra-files outbound.conf + +### Testing the web app with curl + + $ curl --header "Referer: http://d2-03a:5000/" --header 'Debug: true' http://d2-03a:5000/http://server3/ + + Redirecting... +

Redirecting...

+

You should be redirected automatically to target URL: http://server3/. If not click the link. + +## Improvements + +* Provide an apache wsgi config? +* Provide an nginx wsgi config? + +## Dependencies +For the web app: + +* apache with `mod_wsgi` +* python3-flask + +## References + +1. [fuss.conf.example](https://bgstack15.ddns.net/cgit/fuss/tree/fuss.conf.example) +2. [fuss.py](https://bgstack15.ddns.net/cgit/fuss/tree/fuss.py) +3. [coupons_web.py](https://bgstack15.ddns.net/cgit/coupons/tree/coupons_web.py) +4. +5. various [fifconfig](https://bgstack15.ddns.net/cgit/fifconfig/tree/) files + +### Internal documents + +1. ports.txt: outbound 4682/tcp -- cgit