mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-03-31 06:24:01 -04:00
[PR #839] [Feature] Added a possibility to use a private IP instead of a public IP #866
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/qdm12/ddns-updater/pull/839
Author: @primez
Created: 10/12/2024
Status: 🔄 Open
Base:
master← Head:private-ip📝 Commits (2)
fec3f28Added a private IP retrieval9daae4dRemoved redundant files and added more tests📊 Changes
9 files changed (+542 additions, -14 deletions)
View changed files
📝
cmd/ddns-updater/main.go(+4 -1)📝
internal/config/pubip.go(+23 -6)📝
internal/config/settings_test.go(+3 -2)➕
pkg/publicip/privateip/options.go(+22 -0)➕
pkg/publicip/privateip/options_test.go(+33 -0)➕
pkg/publicip/privateip/privateip.go(+129 -0)➕
pkg/publicip/privateip/privateip_test.go(+301 -0)📝
pkg/publicip/publicip.go(+20 -3)📝
pkg/publicip/settings.go(+7 -2)📄 Description
Hello,
First of all, thank you for such a great tool!
I decided to implement support for using private IPs because I needed this feature and noticed that the related feature request at https://github.com/qdm12/ddns-updater/issues/809 has been open for a month with no replies. I assumed it might not be a priority or not planned at all.
Disclosure: I am a .NET developer, and my knowledge of Golang is limited. I relied heavily on ChatGPT to help me write this code. However, I have verified its functionality in a container and a Linux environment, and it works as expected, binding a private IP to a domain name.
To make this work, I added a new value to the environment variables:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.