Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix support for namecheap #467

Merged
merged 1 commit into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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