movd / dynv6-dehydrated-hook Goto Github PK
View Code? Open in Web Editor NEWdns-01 hook script to use dynv6.com with dehydrated (a great ACME client written in bash)
License: MIT License
dns-01 hook script to use dynv6.com with dehydrated (a great ACME client written in bash)
License: MIT License
Dyndns provider dynv6.com provides predefined domains like dynv6.net. Additionally it is possible to use any domain or subdomain where you are authorized to set NS records pointing to the dns servers of dynv6.com. This is called "My Domain".
domains.txt: a.mydomain.tld *.a.mydomain.tld (applying for a wildcard certificate for a.mydomain.tld and its subdomains)
Bug: hook.sh, create_acme_challenge_host(), sets in this case the variable
acme_challenge_hostname="_acme-challenge.a"
And this results that the nameserver at dynv6.com creates a TXT record
_acme-challenge.a.a.mydomain.tld
So letsencrypt fails because it cannot fetch TXT record
_acme-challenge.a.mydomain.tld
Workaround:
Edit ".env" file and add
DYNV6_IS_MYDOMAIN=true
and apply the patch below to hook.sh:
--- hook.sh.orig<------>2023-12-13 16:29:08.544354245 +0100
+++ hook.sh<--->2023-12-13 16:56:36.490748269 +0100
@@ -2,6 +2,8 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)".
DOMAIN=${2}
TOKEN_VALUE=${4}
+# "My Domains" of dynv6.com in use? (default: false)
+DYNV6_IS_MYDOMAIN=${DYNV6_IS_MYDOMAIN:-false}
DYNV6_DOMAINS=(dns.army dns.navy dynv6.net v6.army v6.navy v6.rocks) # TODO: Make this dynamic
DYNV6_APIBASE="https://dynv6.com/api/v2/zones"
DYNV6_TOKEN=${DYNV6_TOKEN}
@@ -97,7 +99,11 @@
break
fi
done
- acme_challenge_hostname="${acme_challenge_hostname_with_dot: :-1}" # remove last dot
+ if [ $DYNV6_IS_MYDOMAIN == "false" ]; then
+ acme_challenge_hostname="${acme_challenge_hostname_with_dot: :-1}" # remove last dot
+ else
+ acme_challenge_hostname="_acme-challenge"
+ fi
_test_echo "${acme_challenge_hostname}"
}
Any Idea why doesn't work?
./hook.sh
Hook ERROR: could not connect to dynv6 api. returned http status code: 400
That being said, the request works fine:
curl \
> -H "Authorization: my_token" \
> -H "Accept: application / json" \
> https://dynv6.com/api/v2/zones
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.