Comments (5)
By following this article A zones support ipv4 only. AAAA zones for ipv6. As an idea script probably can detect ipv4 and use A zone upd (current case) and ipv6 use AAAA zone
from synologyddnscloudflaremultidomain.
Synology doesn't give ipv6 address as an input parameter by default, so it'll have to be via by retrieving ipv6 with file_get_contents('https://api64.ipify.org'). I tried some simulations in the existing code with some quick coding and works fine.
However after checking the script itself will need some recoding, in particular now how jsons are being parsed when getting responses from the Cloudflare api and how it's recorded in the hostList array. E.g. now jsons are parsed on array element number 0. But after checking I noticed element 0 sometimes contains A and sometimes AAAA (or both in element 0 and 1 or opposite). not reliable.
I am working on it now and'll post it when done.
from synologyddnscloudflaremultidomain.
Added getting a zone type by ip type:
IPv4 = zone A
IPv6 = zone AAAA
as @smoetje has mentioned I've added getting ip from https://api64.ipify.org instead of if Synology input param
from synologyddnscloudflaremultidomain.
There are some serious issues after these modifications. When you have IPV6 it basically only updates the IPV6 and no longer IPV4. It's due how the hostlist array is built and parsed afterwards based on recordsId. Basically every DNS record has a separate RecordId for A and another RecordId for AAAA . I fixed the script where now IPV4 and IPV6 are both recognized. If there's no IPV6, then only IPV4 will be updated.
I completely fixed it and over here it works now for both IPV4 and IPV6. Personally I would've done some things completely different (e.g. the way how the hostslist array is constructed, the api calls, etc) and extend it with the supported error messages accepted by DSM. But the one I have will do just fine now, these changes will be for another occasion...
from synologyddnscloudflaremultidomain.
Personally I would've done some things completely different (e.g. the way how the hostslist array is constructed, the api calls, etc) and extend it with the supported error messages accepted by DSM. But the one I have will do just fine now, these changes will be for another occasion...
I have been further thinking on this: A new target-array which contains RecordId keys instead of fullname can simply things. Because fullname can contain 1 or 2 values, a RecordId is always unique after further figuring-out the Cloudflare api.
I made a pull request of with my (properly working) changes. Further improvement is in the progress, I'll get back to it...
from synologyddnscloudflaremultidomain.
Related Issues (20)
- Unknown error while update IP adress HOT 5
- How can i use 2 diffrents domaine ?
- Unknown error updating Cloudflare HOT 2
- DualStack: Only one record gets updated HOT 1
- Run by command line / shell HOT 1
- does not access the domain with the proxy enabled HOT 1
- error 521 web server is down HOT 1
- IPv6 Support HOT 1
- FYI CloudFlare API free domain limitation HOT 4
- Service provider not updating with new Cloudflare value HOT 1
- Wildcard DNS record HOT 3
- Character limit
- SSL certificate is not valid HOT 1
- Unable to update wildcard domain HOT 2
- Attempting to update IP fails with status: "Synology Technical Support.">Failed." HOT 1
- Suggestion for an automatic installer in Python HOT 1
- Unable to access my NAS without a VPN or proxy
- How to edit other DNS record HOT 2
- Synology DMS DDNS list isn't updated HOT 5
- Avoid 128 chars limitation HOT 2
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 synologyddnscloudflaremultidomain.