Giter VIP home page Giter VIP logo

dynv6-dehydrated-hook's People

Contributors

movd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dynv6-dehydrated-hook's Issues

Using "My Domain" instead of predefined domains at dynv6.com: (workaround required in case of subdomain)

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}"
 }

hook_sh_diff.zip

could not connect to dynv6 api

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.