Được TopGit lập chỉ mục từ metadata GitHub: mholt/caddy-dynamicdns có 375 sao, viết chủ yếu bằng Go. Caddy app that keeps your DNS records (A/AAAA) pointed at itself.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This is a simple Caddy app that keeps your DNS pointed to your machine; especially useful if your IP address is not static.
It simply queries a service (an "IP source") for your public IP address every so often and if it changes, it updates the DNS records with your configured provider. It supports multiple IPs, including IPv4 and IPv6, as well as redundant IP sources.
IP sources and DNS providers are modular. This app comes with IP source modules. However, you'll need to plug in a DNS provider module from caddy-dns so that your DNS records can be updated.
[!NOTE]
This is not an official repository of the Caddy Web Server organization.
This updates DNS records for example.com via Cloudflare's API. (Notice how the DNS zone is separate from record names/subdomains.)
Complex example config
Here's a more filled-out config, will all the options used.
This config prefers to get the IP address locally via UPnP (if edge router has UPnP enabled, of course), but if that fails, will fall back to querying icanhazip.com for the IP address. If those fail, it will try to find the IP address from the eth0 interface. It then updates records for example.com, www.example.com, and subdomain.example.net. Notice how the zones and subdomains are separate; this eliminates ambiguity since we don't have to try to be clever and figure out the zone via recursive, authoritative DNS lookups. We also check every 5 minutes instead of 30 minutes (default), and set a TTL of 1 hour for the records.
The interface option will return at most 1 IPv4 and 1 IPv6 address. It will only return addresses that are not private according to RFC 1918 (IPv4) and RFC 4193 (IPv6), and is a global unicast address according to RFC 1122, RFC 4632, and RFC 4291 with the exception of IPv4 directed broadcast addresses.
Note that it's redundant to specify both IP versions in the config, since the default is to enable both IPv4 and IPv6. It's purpose is to allow disabling one or the other if your server is only reachable via one of the versions. It's included in this config example for posterity.
(Notice how the syntax is: <zone> [ @ | <subdomains...> ] -- zone first, then any subdomains; if no subdomains, then "@" is implied; if you do list subdomains and you want the zone root to be included, you have to add "@" explicitly.)
The provider directive can be repeated to update domains across multiple DNS providers, or across multiple accounts of the same provider (e.g. different API credentials per domain). Each provider's domains are configured with a domains block inside that provider's block:
Inside a provider's block, the name domains is reserved for this app; everything else belongs to the DNS provider module as usual (whether inline arguments or block subdirectives). All other options (ip_source, check_interval, versions, include/exclude, ttl, update_only, dynamic_domains) remain global and apply to all providers.
Note that repeating the whole dynamic_dns global option does not work — Caddy keeps only the last occurrence. Use multiple provider blocks within a single dynamic_dns option instead.
Disabling IPv4
To disable IPv4 lookups and use your unique global unicast IPv6 address, specify only IPv6 as the version you want enabled and use your machine interface to get the IP address:
There is an option dynamic_domains that can scan through the configured domains configured in this Caddy instance and will try to manage the DNS of those domains.
Note:
Only host matchers at the top-level of server routes will get managed.
on_demand is not supported because the hostname isn't known at config time.
Caddyfile config:
{
dynamic_dns {
provider cloudflare {env.CLOUDFLARE_API_TOKEN}
domains {
example.com @ www
example.net subdomain
}
dynamic_domains
}
}
# This domain will be managed.
cool.example.com {
redir http://google.com
}
# This domain will *NOT* be managed because it's not configured in dynamic_dns.
another.host.com {
redir http://youtube.com
}
Equivalent JSON config:
{
"apps": {
"dynamic_dns": {
"domains": {
"example.com": ["@", "www"],
"example.net": ["subdomain"]
},
"dynamic_domains": true,
"dns_provider": {
"name": "cloudflare",
"api_token": "topsecret"
},
},
"servers": {
"srv0": {
"routes": [{
// omitted
"match": [{
"host": [
// This domain will be managed.
"cool.example.com"
]
}]
}, {
// omitted
"match": [{
"host": [
// This domain will *NOT* be managed because it's not configured in dynamic_dns.
"another.host.com"
]
}]
}]
}
}
}
}
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/mholt/caddy-dynamicdns là nguồn chính thức.
mholt/caddy-dynamicdns có bao nhiêu sao?
mholt/caddy-dynamicdns có 375 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/mholt/caddy-dynamicdns. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
mholt/caddy-dynamicdns có phải mã nguồn mở không?
Có — mholt/caddy-dynamicdns phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/mholt/caddy-dynamicdns.
mholt/caddy-dynamicdns có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho mholt/caddy-dynamicdns. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
mholt/caddy-dynamicdns có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho mholt/caddy-dynamicdns. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
mholt/caddy-dynamicdns còn đang phát triển không?
Commit gần nhất trên mholt/caddy-dynamicdns là 2 tháng trước (theo timestamp GitHub). Repo có 40 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về caddy-dynamicdns?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về caddy-dynamicdns.