mrikirill / SynologyDDNSCloudflareMultidomain

Synology DDNS Cloudflare service provider with multidomains and subdomains
https://mrikirill.github.io/SynologyDDNSCloudflareMultidomain/
MIT License
465 stars 65 forks source link

Invalid Hostname Format #17

Open ghost opened 3 years ago

ghost commented 3 years ago

mrikirill,

I've installed the script and created an api token on cloudflare, all subdomains are created on cloudflare. When I try to add the ddns provider on my synology, I can add 9 suddomains on the add ddns page but when I add another subdomain it says I have an invalid hostname. Is there a limit of subdomains?

mrikirill commented 3 years ago

It seems to be some sort of limitation in DSM for inputs length. You can directly put all your domains into the script to avoid DMS limit. You can modify this line: https://github.com/mrikirill/SynologyDDNSCloudflareMultidomain/blob/cf7f1995dc592178e96ede5eedfb454d7f993c7c/cloudflare.php#L49

to put something like this:

$hostnames = "domain1.com---domain2.com---domain3.com---domain4.com";
webwude commented 3 years ago

Another workaround / option is to add another cloudflare entry (as DSM just allows one DDNS entry):

`[Cloudflare2]

modulepath=/usr/syno/bin/ddns/cloudflare.php

queryurl=https://www.cloudflare.com/`

Then you have another 128 characters.

ghost commented 3 years ago

Thank you both for your time. I'll give these a shot and report back.

ghost commented 3 years ago

I added the subdomains to the script but nothing changed. The second workaround of adding a second entry to the dns provider config did not work. When I tried the test connection I got an "Unable to perform operation".

webwude commented 3 years ago

I added the subdomains to the script but nothing changed. The second workaround of adding a second entry to the dns provider config did not work. When I tried the test connection I got an "Unable to perform operation".

Does the initial entry work? I just checked - both connections, Cloudflare and Cloudfare2 are working fine here.

ghost commented 3 years ago

The first entry worked with 9 subdomains but the second entry with 8 subdomains gave me the error.

webwude commented 3 years ago

The first entry worked with 9 subdomains but the second entry with 8 subdomains gave me the error.

How about just trying the second one with one entry to see if this works and then extend it step by step? It works here...

webwude commented 2 years ago

Just FYI. I installed an 7.01 update - and afterwards both php and the entries were gone - I had to reenable everything. Now it works again, with both entries.