Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple domains #75

Open
eseub opened this issue Dec 12, 2024 · 2 comments
Open

Support for multiple domains #75

eseub opened this issue Dec 12, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@eseub
Copy link

eseub commented Dec 12, 2024

I found this project while I was searching for an alternative to ddclient because their lack of support for the new porkbun api endpoint and I'll like to avoid similar situations in the future.

I currently have multiple domains on Porkbun and I would love to use this tool in a docker container, but I can't because of the single domain limit.

I am willing to get my hands dirty and send some PRs, but before that I would like to discuss the proposed changes:

  • Add ability to configure multiple domains in the config file only to not break current setups, something like this:
{
	"endpoint":"https://api.porkbun.com/api/json/v3",
	"apikey": "pk1",
	"secretapikey": "sk1"
	"domains": [
		{
			"domain": "example.com",
			"subdomains": "@",
			"ip_version": "4,6"
		},
		{
			"domain": "example.com",
			"subdomains": "ipv6sub",
			"ip_version": "6"
		},
		{
			"domain": "anotherdomain.com",
			"subdomains": "@,sub1,sub2,sub3",
			"ip_version": "4"
		},
		{
			"domain": "anotherdomain.com",
			"subdomains": "sub2",
			"ip_version": "6"
		}
	]
}
  • Add the following environment variables to the docker image to support custom http and dns ip fetcher in the docker environment variables:
# Obtain the public ip from http or dns request
IP_FETCHER: [ http | dns ]
# Set custom ipv4 provider
HTTP_PROVIDER_V4: v4.exampleresolver.com
# Set custom ipv6 provider
HTTP_PROVIDER_V6: v6.exampleresolver.com
# Ignore SSL errors from http provider, useful for some self-hosted solutions
HTTP_IGNORE_INVALID_SSL: true
# Obtain the public ip with a dns request
DNS_DOMAIN: myip.exampleresolver.com
# Needed for the option above and useful for split horizon dns situations
DNS_ADDRESS: 1.2.3.4

Tell me what you guys think and what I can do to help

Thanks

@mietzen
Copy link
Owner

mietzen commented Dec 16, 2024

Hey sorry for the late reply, the end of the year is always busy.

That sounds like a good idea, my main concern would be backwards compatibility in all modes (CLI, docker, python). Perhaps we could give the config a version field like docker compose.

I hope I find some time over the holidays to think about this.

If you are eager to start feel free to open a draft PR, we can then continue to discuss there.

@eseub
Copy link
Author

eseub commented Dec 18, 2024

I'll see what I can do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants