
Productive Holiday
David Chung at
I spent my holiday finally creating a scheduled script that updates the name record on my domain provider's web service via a series of curl calls to their management portal whenever my home IP changes. That way, the name record that points to my home VPN is kept up-to-date. They used to provide this feature where I can call some endpoint and they'll automatically update name records. Unfortunately, this feature is no longer provided on their end so I had to come up with something on my own.
I've been meaning to do this for a while but I finally discovered two quirks about my provider's service:
- it is sensitive with quotes being sent in with requests
- request keys are also URL-encoded (curl encodes only the content/values)
- but the worst of them all: invalid requests are responded with a successful message! An actual successful message also includes details of what record was updated so that was the subtle detail to watch for.
I was using jq to parse out JSON responses from my provider to build out my request but neglected that it needed raw strings without quotes and spent a good time tracing my curl calls and comparing it with browser traffic to finally see where the discrepancies are.
I did get to wake up later than usual though.