Menu

ddclient and Cloudflare (API v3 deprecated)

Help
Lorenzo
2018-07-24
2018-08-10
  • Lorenzo

    Lorenzo - 2018-07-24

    I have installed ddclient 3.8.3 on my Raspberry Pi 3.
    I have modified my /etc/ddclient.conf to include the following:

    protocol=cloudflare
    use=web
    server=www.cloudflare.com
    ssl=yes
    
    login=xxxxxx@gmail.com
    password=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    
    zone=xxxxx.com
    xxxxxx.xxxxxx.com
    

    But the update does not work as it seems the API used by ddclient to communicate with Cloudflare have been deprecated. This is the message I receive when I run sudo ddclient -daemon=0 -debug -verbose -noquiet:

    === opt ====
    opt{cache} : <undefined>
    opt{cmd} : <undefined>
    opt{cmd-skip} : <undefined>
    opt{daemon} : 0
    opt{debug} : 1
    opt{exec} : <undefined>
    opt{facility} : <undefined>
    opt{file} : <undefined>
    opt{force} : <undefined>
    opt{foreground} : <undefined>
    opt{fw} : <undefined>
    opt{fw-login} : <undefined>
    opt{fw-password} : <undefined>
    opt{fw-skip} : <undefined>
    opt{geturl} : <undefined>
    opt{help} : <undefined>
    opt{host} : <undefined>
    opt{if} : <undefined>
    opt{if-skip} : <undefined>
    opt{ip} : <undefined>
    opt{login} : <undefined>
    opt{mail} : <undefined>
    opt{mail-failure} : <undefined>
    opt{max-interval} : 2592000
    opt{min-error-interval} : 300
    opt{min-interval} : 30
    opt{options} : <undefined>
    opt{password} : <undefined>
    opt{pid} : <undefined>
    opt{postscript} : <undefined>
    opt{priority} : <undefined>
    opt{protocol} : <undefined>
    opt{proxy} : <undefined>
    opt{query} : <undefined>
    opt{quiet} : 0
    opt{retry} : <undefined>
    opt{server} : <undefined>
    opt{ssl} : <undefined>
    opt{syslog} : <undefined>
    opt{test} : <undefined>
    opt{timeout} : <undefined>
    opt{use} : <undefined>
    opt{usev6} : <undefined>
    opt{verbose} : 1
    opt{web} : <undefined>
    opt{web-skip} : <undefined>
    === globals ====
    globals{daemon} : 60
    globals{debug} : 1
    globals{login} : xxxxxxx@gmail.com
    globals{password} : xxxxxxxxxxxxxxxxxxxxxxx
    globals{protocol} : cloudflare
    globals{quiet} : 0
    globals{server} : www.cloudflare.com
    globals{ssl} : 1
    globals{use} : web
    globals{verbose} : 1
    globals{zone} : xxxxxx.com
    === config ====
    config{xxxxx.xxxxxxx.com}{atime} : 0
    config{xxxxx.xxxxxxx.com}{backupmx} : 0
    config{xxxxx.xxxxxxx.com}{cacheable} : ARRAY(0x14c0c00)
    config{xxxxx.xxxxxxx.com}{cmd} : <undefined>
    config{xxxxx.xxxxxxx.com}{cmd-skip} :
    config{xxxxx.xxxxxxx.com}{fw} :
    config{xxxxx.xxxxxxx.com}{fw-login} : <undefined>
    config{xxxxx.xxxxxxx.com}{fw-password} :
    config{xxxxx.xxxxxxx.com}{fw-skip} :
    config{xxxxx.xxxxxxx.com}{host} : xxxxxx.xxxxxx.com
    config{xxxxx.xxxxxxx.com}{if} : ppp0
    config{xxxxx.xxxxxxx.com}{if-skip} :
    config{xxxxx.xxxxxxx.com}{ip} : <undefined>
    config{xxxxx.xxxxxxx.com}{login} : xxxxxxxxx@gmail.com
    config{xxxxx.xxxxxxx.com}{max-interval} : 2592000
    config{xxxxx.xxxxxxx.com}{min-error-interval} : 300
    config{xxxxx.xxxxxxx.com}{min-interval} : 300
    config{xxxxx.xxxxxxx.com}{mtime} : 0
    config{xxxxx.xxxxxxx.com}{mx} :
    config{xxxxx.xxxxxxx.com}{password} : xxxxxxxxxxxxxxxxxxxxx
    config{xxxxx.xxxxxxx.com}{protocol} : cloudflare
    config{xxxxx.xxxxxxx.com}{server} : www.cloudflare.com
    config{xxxxx.xxxxxxx.com}{static} : 0
    config{xxxxx.xxxxxxx.com}{status} :
    config{xxxxx.xxxxxxx.com}{use} : web
    config{xxxxx.xxxxxxx.com}{usev6} : <undefined>
    config{xxxxx.xxxxxxx.com}{warned-min-error-interval} : 0
    config{xxxxx.xxxxxxx.com}{warned-min-interval} : 0
    config{xxxxx.xxxxxxx.com}{web} : dyndns
    config{xxxxx.xxxxxxx.com}{web-skip} :
    config{xxxxx.xxxxxxx.com}{wildcard} : 0
    config{xxxxx.xxxxxxx.com}{wtime} : 30
    config{xxxxx.xxxxxxx.com}{zone} : xxxxxx.com
    === cache ====
    cache{xxxxx.xxxxxxx.com}{atime} : 0
    cache{xxxxx.xxxxxxx.com}{backupmx} : 0
    cache{xxxxx.xxxxxxx.com}{host} : xxxxxx.xxxxxx.com
    cache{xxxxx.xxxxxxx.com}{mtime} : 0
    cache{xxxxx.xxxxxxx.com}{mx} :
    cache{xxxxx.xxxxxxx.com}{static} : 0
    cache{xxxxx.xxxxxxx.com}{status} : noconnect
    cache{xxxxx.xxxxxxx.com}{warned-min-error-interval} : 1532460900
    cache{xxxxx.xxxxxxx.com}{warned-min-interval} : 0
    cache{xxxxx.xxxxxxx.com}{wildcard} : 0
    cache{xxxxx.xxxxxxx.com}{wtime} : 30
    DEBUG: proxy =
    DEBUG: url = http://checkip.dyndns.org/
    DEBUG: server = checkip.dyndns.org
    CONNECT: checkip.dyndns.org
    CONNECTED: using HTTP
    SENDING: GET / HTTP/1.0
    SENDING: Host: checkip.dyndns.org
    SENDING: User-Agent: ddclient/3.8.3
    SENDING: Connection: close
    SENDING:
    RECEIVE: HTTP/1.1 200 OK
    RECEIVE: Content-Type: text/html
    RECEIVE: Server: DynDNS-CheckIP/1.0
    RECEIVE: Connection: close
    RECEIVE: Cache-Control: no-cache
    RECEIVE: Pragma: no-cache
    RECEIVE: Content-Length: 106
    RECEIVE:
    RECEIVE: <title>Current IP Check</title>Current IP Address: xxx.xxx.xxx.xxx
    DEBUG: get_ip: using web, http://checkip.dyndns.org/ reports xxx.xxx.xxx.xxx
    DEBUG:
    DEBUG: nic_cloudflare_update -------------------
    INFO: setting IP address to xxx.xxx.xxx.xxx for xxxxx.xxxxx.com
    UPDATE: updating xxxxx.xxxxx.com
    DEBUG: proxy =
    DEBUG: url = https://www.cloudflare.com/api_json.html?a=rec_load_all&z=xxxxxxx.com&email=xxxxxxxx@gmail.com&tkn=xxxxxxxxxxxxxxxxxxx
    DEBUG: server = www.cloudflare.com
    CONNECT: www.cloudflare.com
    CONNECTED: using SSL
    SENDING: GET /api_json.html?a=rec_load_all&z=xxxxxxx.com&email=xxxxxxxx@gmail.com&tkn=xxxxxxxxxxxxxxxxxxx HTTP/1.0
    SENDING: Host: www.cloudflare.com
    SENDING: User-Agent: ddclient/3.8.3
    SENDING: Connection: close
    SENDING:
    RECEIVE: HTTP/1.1 410 Gone
    RECEIVE: Date: Tue, 24 Jul 2018 19:37:35 GMT
    RECEIVE: Content-Type: text/html
    RECEIVE: Connection: close
    RECEIVE: Set-Cookie: cfduid=XXXXXXXXXXeffa98dea6fce4411c4d0961532461054; expires=Wed, 24-Jul-19 19:37:34 GMT; path=/; domain=.cloudflare.com; HttpOnly
    RECEIVE: Cache-Control: public, max-age=31536000
    RECEIVE: Set-Cookie:
    cflb=XXXXX50373; path=/; expires=Wed, 25-Jul-18 18:37:35 GMT
    RECEIVE: Strict-Transport-Security: max-age=15780000; includeSubDomains
    RECEIVE: Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
    RECEIVE: Server: cloudflare
    RECEIVE: CF-RAY: xxxxxxxxxxa-LHR
    RECEIVE:
    RECEIVE: This API has been deprecated in favor of API v4, available at https://api.cloudflare.com</undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined></undefined>

    Am I doing something wrong or just ddclient needs to be updated to work with Cloudflare's new API?

     
  • wimpunk

    wimpunk - 2018-08-10

    The fresh v3.9.0 should fix this issue.

     

Log in to post a comment.