Comments (6)
Oh, I see. That'd be kind of cool, you just provide your DNS credentials, and Caddy will set the A/AAAA records automatically and then try to get a certificate. Hmmmm.
from caddy-dynamicdns.
@mholt this can be closed, the PR was merged!
from caddy-dynamicdns.
Can you clarify this:
And this middleware could pick up the domains has dynamic_dns in its config and start to config dns for them
What do you mean by this?
Your config is currently set to manage DNS for on_demand.example.com
(that's not even a valid DNS name).
from caddy-dynamicdns.
Sorry I wasn't clear(and the on_demand part is probably a bad idea).
The above Caddyfile is meant to be equivalent of:
{
dynamic_dns {
provider cloudflare {env.CLOUDFLARE_API_TOKEN}
domains {
example.com yo hi
}
check_interval 5m
}
}
yo.example.com {
reverse_proxy 127.0.0.1:10000
}
hi.example.com {
file_server
}
from caddy-dynamicdns.
@mholt I think on_demand
was meant as a constant here to indicate "read a list of subdomains dynamically from the ones Caddy is managing".
It's an interesting idea, but I'm not sure what the best approach to extracting that information would be. I don't think Caddy has a good API for fetching a list of domains that are currently being managed by it.
That might be something that can be done by reading from the configured storage and listing the domains that Caddy has in storage, and filter that list by only including those matching the base domain that dynamic_dns
has configured.
Note that care needs to be taken for this to be efficient though, because List()
calls can be expensive on certain storage drivers (e.g. DynamoDB) but I think it's unlikely that this would be paired with any storage driver other than filesystem since dynamic DNS is most likely used by "self hosted" type environments which generally strive for simplicity.
from caddy-dynamicdns.
Noticed this https://github.com/tiredofit/docker-traefik-cloudflare-companion which shares the same idea but doing it from the outside -- makes sense since it's traefik and there's no centralized list of domain.
from caddy-dynamicdns.
Related Issues (20)
- feature to give fixed ip source or set ip source via env HOT 2
- Doesn't Update Cloudflare dns HOT 6
- IPv6 lookup failed with api.ipify.org HOT 2
- Route53 Lookup Fails HOT 8
- Feature request: option to only update existing records, not create new. HOT 13
- Cloudflare record update fails HOT 1
- CheckInterval is the same as TTL HOT 5
- Missing license HOT 1
- Caddy stuck on building HOT 2
- domain not found in DNS HOT 9
- Bug: Will not update when one domain is outdated but another is up-to-date HOT 2
- [Feature request] Add an option to use address on specific interface directly. HOT 5
- do not update IPv6 HOT 3
- failed setting DNS record(s) with new IP address(es) - expected 1 zone, got 0 for [external.domain.tld] HOT 4
- Enable Cloudflare Proxy Status HOT 6
- dynamic_dns is thowing error - server response was: 503 503 Service Unavailable"} HOT 7
- Feature Request - Add ability to either request IPv4, IPv6 or both.. (Or disable IPv6) HOT 3
- Failed to update dns record
- Add desec.io HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy-dynamicdns.