mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-07-28 00:22:37 -04:00
[PR #774] Provider Porkbun: Delete Default Parked DNS Entry for *.domain.tld #839
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?
Original Pull Request: https://github.com/qdm12/ddns-updater/pull/774
State: closed
Merged: Yes
Description:
Porkbun creates default ALIAS and CNAME domain records pointing to
pixie.porkbun.com(Porkbun's parked domain website)The current logic flow prior to this PR would look for an A or AAAA domain record, and if none exists, attempt to delete the ALIAS record for any subdomain and then proceed with the record creation.
This updates the logic flow to only look for a conflicting ALIAS record for the top level
domain.tld, and a conflicting CNAME record for the*.domain.tld. Additionally, we verify that the content of this record matchespixie.porkbun.comand we only delete for the expected default value.If the value does not match the expected
pixie.porkbun.comwe produce more helpful error messages.Note: Any other domain name we simply attempt to create a record if no record exists, which will return a 400 error with no helpful error reason if there is a conflicting record of another type. We may want to consider checking for any conflicting records to produce a more helpful error for the user, but that change is well outside of the scope of this PR, and should likely be done in a more general way and apply to all DNS providers, rather than porkbun exclusively.
Test-Plan:
Created a new domain.tld on Porkbun
Verified the default records were created:
ALIAS domain.tld -> pixie.porkbun.comCNAME *.domain.tld -> pixie.porkbun.comStarted DDNS-Updater
Verified that both domain records were successfully deleted and updated
Reset the ALIAS domain record to point to
not-pixie.porkbun.comReset the CNAME domain record to point to
not-pixie.porkbun.comStarted DDNS-Updater
Verified that both domain records failed with the expected conflicting record error message.