openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
4.05k stars 3.5k forks source link

ddns-scripts-digitalocean Not updating properly #25061

Open thystra opened 2 months ago

thystra commented 2 months ago

Maintainer: unable to locate do script repo Environment:GL-AXT-1800 router, ARMv7, OpenWrt 21.02-SNAPSHOT r16399+172-c67509efd7 / LuCI openwrt-22.03 branch git-21.284.67084-e4d24f0

Description: Package ddns-scripts-digitalocean version 2.8.2-12

Inputting values into the interface on LuCI does not result in a successful update to Digital Ocean IPV6.

 155623       : parsing script '/usr/lib/ddns/update_digitalocean_com_v2.sh'
 155623       : DDNS Provider answered:
<html><head><title>Current IP Check</title></head><body>Current IP Address: IPV6-ADDRESS</body></html>
 155623 ERROR : IP update not accepted by DDNS Provider
 155623       : Waiting 600 seconds (Check Interval)

However, I'm able to achieve a successful update via commandline:

curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer dop_v1_RESTOFAPIKEY" -d '{"name": "SUBDOMAIN-HOST-ONLY","type":"AAAA","data":"IPV6-ADDRESS-VALUE"}' "https://api.d
igitalocean.com/v2/domains/DOMAIN.TLD/records/DOMAINID" 

DO Response:

 {"domain_record":{"id":DOMAINID,"type":"AAAA","name":"SUBDOMAIN-HOST-ONLY","data":"IPV6-ADDRESS-VALUE","priority":null,"port":null,"ttl":3600,"weight":null,"flags":null,"tag":null}}
feiming commented 1 month ago

I've fixed mine. the code change is here https://github.com/openwrt/packages/pull/25080/files