Skip to content

Commit

Permalink
Merge pull request #467 from Grub4K/fix/namecheap
Browse files Browse the repository at this point in the history
  • Loading branch information
troglobit committed Jan 20, 2024
2 parents c62d719 + 1c39f70 commit 0c17eca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -100,8 +100,7 @@ For the complete list, see `inadyn -L`, for machine friendly JSON
output, use `inadyn -L -j`.

DDNS providers not supported natively can be enabled using the custom,
or generic, DDNS plugin. E.g. <https://www.namecheap.com>. See below
for configuration examples.
or generic, DDNS plugin. See below for configuration examples.

In-A-Dyn defaults to HTTPS, but not all providers may support this, so
try disabling SSL for the update (`ssl = false`) or the checkip phase
Expand Down Expand Up @@ -332,6 +331,7 @@ hostname syntax differs from above:
ddns-server = dynamicdns.park-your-domain.com
ddns-path = "/update?domain=%u&password=%p&host=%h&ip=%i"
hostname = { "@", "www", "test" }
ddns-response = "<ErrCount>0</ErrCount>"
}

Here three hostnames are updated, one HTTP GET update request for every
Expand Down
6 changes: 3 additions & 3 deletions plugins/namecheap.c
Expand Up @@ -23,9 +23,9 @@

#define NAMECHEAP_UPDATE_IP_REQUEST \
"GET %s?" \
"host=%s&" \
"password=%s&" \
"domain=%s&" \
"password=%s&" \
"host=%s&" \
"ip=%s " \
"HTTP/1.0\r\n" \
"Host: %s\r\n" \
Expand Down Expand Up @@ -72,7 +72,7 @@ static int response(http_trans_t *trans, ddns_info_t *info, ddns_alias_t *alias)

DO(http_status_valid(trans->status));

if (strstr(rsp, "good") || strstr(rsp, "nochg"))
if (strstr(rsp, "<ErrCount>0</ErrCount>"))
return 0;

return RC_DDNS_RSP_NOTOK;
Expand Down

0 comments on commit 0c17eca

Please sign in to comment.