4 ms·
there's a way to tell caddy server to host its own access.log So you have some junk VPS or whatever that just has caddy hosting its log with an easy to remembe
by genewitch 2y ago
there's a way to tell caddy server to host its own access.log
So you have some junk VPS or whatever that just has caddy hosting its log with an easy to remember domain (they're cheap enough), and you go like "curl http://easydomain.com/idreallylikemyip http://easydomain.com/idreallylikemyip" and then once more:
curl http://easydomain.com/N http://easydomain.com/N | grep "idreallylikemyip"
the code that used to work is on my github, i uploaded it there a week or two ago. Someone who needs a way to find out the public ipv4 of any device not just their own can probably figure out how to get it to work again!
- dathery 2y agoYou can have Caddy return the user's IP address directly: https://caddy.community/t/caddy-server-that-returns-only-ip-address-as-text/6928 https://caddy.community/t/caddy-server-that-returns-only-ip-... Similar things are also possible with nginx and Apache.
- genewitch 2y agothis was implemented in 2018, but it is good to know. it also doubled as a dumb way to pass messages between hosts.