mholt / caddy-dynamicdns

Caddy app that keeps your DNS records (A/AAAA) pointed at itself.
Apache License 2.0
251 stars 25 forks source link

Support configuring ip_source in Caddyfile. #9

Closed caiych closed 3 years ago

fu-sen commented 3 years ago

Since https://api.ipify.org is from AWS in the US, the response is poor depending on the region. https://icanhazip.com used a Cloudflare CDN. This response was ideal.

caiych commented 3 years ago

Updated to use a modular parsing. Also changing the syntax of Caddyfile by requiring a "simple_http" arg before endpoint.

I'm not sure how to do this to merge endpoint from multi-line, so after this, multiple "ip_source simple_http endpoint" will result in multiple SimpleHTTP objects -- not sure if that is a concern(performance?)