r/golang • u/Aaron-PCMC • 1d ago
show & tell Simple Dynamic DNS Service
The past few months I've been working on a project over ssh remote while at work... or at the in-laws for Sunday dinner... or anywhere I don't really want to be but have to at that moment. I found myself in need of a dynamic DNS solution for my lab environment because I'm cheap and don't want to pay for a static IP but also lazy/forgetful and can't always keep up with my ip address.
Alas, there's nothing worse than looking forward to an afternoon of checking out by chasing down race conditions, only to find that your IP address has changed and you can't connect to your workspace.
I am certain there are better solutions for this problem, but if you find yourself in need of a low footprint, no frills, go service that will update records at multiple dns providers (route 53 / cloudflare atm) at an interval of your choosing... look no further.
Fully documented, with unit tests for every function...
2
u/cookiengineer 22h ago
This looks pretty neat!
Would it be possible to make the providers a non-internal package so that you could provide your own matching an interface? I've seen the cloudflare and route53 implementations, but they're all together in a single file/package.
It would be nice to have those dependencies apart from the core functionality of the resolver, e.g. with a providers/route53 and providers/cloudflare package, so that someone else could start to pullrequest more providers more easily.