Skip to content

Commit

Permalink
ddns: implement support for DYNV6.com
Browse files Browse the repository at this point in the history
For dynv6.com to work correctly for setting DNS A record we need to
utilize the DynDNS API that is supported.  inadyn can handle this
via the 'custom' config (instead of dynv6 provider config).  The
config for inadyn looks like:

custom dynv6 {
	ddns-server = dynv6.com
	ddns-path = "/nic/update?hostname=%h&myip=%i"
	...
}

Update rc/services.c to handle this custom config, which is similar
to what is needed for WWW.NAMECHEAP.COM.

Signed-off-by: Kumar Gala <[email protected]>
  • Loading branch information
galak committed Jun 4, 2022
1 parent 0f8ff52 commit b4c2ac6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions release/src/router/rc/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -4148,6 +4148,10 @@ start_ddns(char *caller)
}
else if (strcmp(server, "WWW.NO-IP.COM") == 0)
service = "[email protected]";
else if (strcmp(server, "WWW.DYNV6.COM") == 0) {
service = "dynv6";
asus_ddns = 11;
}
else if (strcmp(server, "WWW.NAMECHEAP.COM")==0) {
service = "namecheap";
asus_ddns = 10;
Expand Down Expand Up @@ -4300,6 +4304,10 @@ start_ddns(char *caller)
fprintf(fp, "ddns-server = dynamicdns.park-your-domain.com\n");
// We store the domain.tld in the username nvram
fprintf(fp, "ddns-path = \"/update?domain=%%u&password=%%p&host=%%h\"\n");
} else if (asus_ddns == 11) {
fprintf(fp, "custom dynv6 {\n");
fprintf(fp, "ddns-server = dynv6.com\n");
fprintf(fp, "ddns-path = \"/nic/update?hostname=%%h&myip=%%i\"\n");
} else {
fprintf(fp, "provider %s {\n", service);
}
Expand Down
1 change: 1 addition & 0 deletions release/src/router/www/Advanced_ASUSDDNS_Content.asp
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,7 @@ function check_unregister_result(){
<option value="WWW.TUNNELBROKER.NET" <% nvram_match("ddns_server_x", "WWW.TUNNELBROKER.NET","selected"); %>>WWW.TUNNELBROKER.NET</option>
<option value="WWW.NO-IP.COM" <% nvram_match("ddns_server_x", "WWW.NO-IP.COM","selected"); %>>WWW.NO-IP.COM</option>
<option value="WWW.ORAY.COM" <% nvram_match("ddns_server_x", "WWW.ORAY.COM","selected"); %>>WWW.ORAY.COM(花生壳)</option>
<option value="WWW.DYNV6.COM" <% nvram_match("ddns_server_x", "WWW.DYNV6.COM","selected"); %>>WWW.DYNV6.COM</option>
<option value="WWW.NAMECHEAP.COM" <% nvram_match("ddns_server_x", "WWW.NAMECHEAP.COM","selected"); %>>WWW.NAMECHEAP.COM</option>
<option value="FREEDNS.AFRAID.ORG" <% nvram_match("ddns_server_x", "FREEDNS.AFRAID.ORG","selected"); %>>FREEDNS.AFRAID.ORG</option>
<option value="CUSTOM" <% nvram_match("ddns_server_x", "CUSTOM","selected"); %>>Custom</option>
Expand Down
2 changes: 2 additions & 0 deletions release/src/router/www/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ function openLink(s){
tourl = "https://www.no-ip.com/newUser.php";
else if (document.form.ddns_server_x.value == 'WWW.NAMECHEAP.COM')
tourl = "https://www.namecheap.com";
else if (document.form.ddns_server_x.value == 'WWW.DYNV6.COM')
tourl = "https://dynv6.com";
else if (document.form.ddns_server_x.value == "FREEDNS.AFRAID.ORG")
tourl = "https://freedns.afraid.org/";
else if (document.form.ddns_server_x.value == 'WWW.ORAY.COM')
Expand Down

0 comments on commit b4c2ac6

Please sign in to comment.