Compare commits

..

4 Commits

Author SHA1 Message Date
wmantly 5a685e9dd7 Merge pull request #143 from theta42/bump-1.1.1
Bump version to 1.1.1
2026-07-16 13:58:10 -04:00
wmantly f98c4ec44f Bump version to 1.1.1 2026-07-16 13:56:57 -04:00
wmantly 8deecdba73 Merge pull request #142 from theta42/duckdns-validate-via-txt
DuckDNS: validate token via a TXT write, not the A/AAAA record
2026-07-16 12:56:24 -04:00
wmantly 3e90062255 DuckDNS: validate token via a TXT write, not the A/AAAA record
listDomains() used to validate the token by calling DuckDNS's update
endpoint with ip/ipv6 omitted, which makes DuckDNS auto-detect and
apply this host's public IP -- so adding a provider instantly
repointed the domain. Validate via a fixed TXT marker instead, which
DuckDNS's API supports independently and doesn't touch routing.
2026-07-16 12:55:06 -04:00
3 changed files with 10 additions and 9 deletions
+7 -6
View File
@@ -67,14 +67,15 @@ class DuckDns extends DnsApi{
} }
// No API to enumerate owned subdomains, so the operator supplies them. // No API to enumerate owned subdomains, so the operator supplies them.
// This call both validates the token and, as a side effect, syncs each // This call validates the token by writing a fixed marker to the TXT
// domain's A/AAAA record to this host's current public IP if the token // record only -- never `ip`/`ipv6` -- so adding/validating a provider
// is valid (DuckDNS auto-detects the caller's IP when `ip` is omitted) // never changes where the domain's A/AAAA records actually point. (An
// — the same thing an operator would need to do anyway when pointing a // earlier version omitted `ip` here, which made DuckDNS auto-detect and
// fresh DuckDNS domain at this proxy. // apply this host's public IP as a side effect of validation; that's
// exactly what this call must not do.)
async listDomains(){ async listDomains(){
let labels = this.subdomains.split(',').map(d => this.__normalizeLabel(d.trim())).filter(Boolean); let labels = this.subdomains.split(',').map(d => this.__normalizeLabel(d.trim())).filter(Boolean);
await this.update(labels.join(','), {}); await this.update(labels.join(','), {txt: 'theta42-proxy-validated'});
return labels.map(label => ({domain: `${label}.duckdns.org`})); return labels.map(label => ({domain: `${label}.duckdns.org`}));
} }
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "proxy-api", "name": "proxy-api",
"version": "1.1.0", "version": "1.1.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "proxy-api", "name": "proxy-api",
"version": "1.1.0", "version": "1.1.1",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^7.3.0", "@fortawesome/fontawesome-free": "^7.3.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "proxy-api", "name": "proxy-api",
"version": "1.1.0", "version": "1.1.1",
"private": true, "private": true,
"author": [ "author": [
{ {