Skip to content

tillay/requests-webhook

Repository files navigation

requests webhook

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:

  1. clone the repo and such
  2. add an env and change the line load_dotenv("/root/secrets/env") in the script to have the path to your env
  3. install dependencies (on debian sudo apt install python3-aiofiles python3-dotenv)
  4. make a discord webhook and get an ipregistry token
  5. make sure your env has the following lines for the secrets
FELLAS_WEBHOOK=https://discord.com/api/webhooks/....
IPREGISTRY_TOKEN=ira_....
  1. 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
}
  1. run python3 logfollower.py in 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

About

follow caddy log to track requests with a webhook (and other testing scripts)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages