a python script i made to log requests to my webserver for debugging purposes
this has only been tested on caddy and probably doesn't work on other webservers
this needs a connection proxied through cloudflare with the visitor location info in headers enabled
to use:
- clone the repo and such
- add an env and change the line
load_dotenv("/root/secrets/env")in the script to have the path to your env - install dependencies (on debian
sudo apt install python3-aiofiles python3-dotenv) - make a discord webhook and get an ipregistry token
- make sure your env has the following lines for the secrets
FELLAS_WEBHOOK=https://discord.com/api/webhooks/....
IPREGISTRY_TOKEN=ira_....
- make sure your caddy config has logging enabled like so (if you change the path you have to change it in the code too)
log {
output file /var/log/caddy/caddy.log
format json
}
- run
python3 logfollower.pyin the same directory as the script to start it. I recommend using tmux.
other programs also exist for random network testing tasks
latency_tester gives the ping latency in ms to different places in the world
add_test_ip lets you search city names or country codes to get latency testing ips in different cities
the ip and city infos for latency testing are stored in entries.json