docker-ddns
docker-ddns copied to clipboard
Make the go program easier to use as a standalone program: make it a go module, add command line flags and support for ddnskey
This pull request will make the go program easier to use as a standalone program.
- Make the go source a go module since it is easier to use if used independently from the Dockerfile.
- The pull request removes the necessity of having a config file. All configurations can be passed with command line arguments.
- Some duplicate code is removed and refactored. Especially all copies of
RequestDataExtractor
where moved to a single file. - Middleware architecture is used to gather user input variables which should make it more flexible.
- Changed go compiler to 1.14.
nsupdate
improvements
- Commands to
nsupdate
are now piped to the program. - A
ddnskey
can be passed from the http request to thensupdate
program. - All commands send to the
nsupdate
program can be logged. - User input values are escaped before passing them to the
nsupdate
program.
Hey @Golit thanks for that huge contribution. I'll have a look at it as soon as I find some time for that!