Repository navigation
Conversation
|
Thanks |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR about?
This PR adds Namecheap and Spaceship as DNS providers. Both use the existing
DnsClientinterface inpackages/server/src/utils/dns/, the same as the other providers. Users can connect either account, list their domains, and create, edit and delete DNS records from Dokploy.namecheap.ts): uses the Namecheap XML API.setHostsreplaces all records of a domain, so each write reads the full record list, changes it, and writes it back. The domain'sEmailTypeis sent back on each write, so the mail settings (for example email forwarding) stay the same. It is set toMXonly when an MX record is written. Only domains on Namecheap BasicDNS or PremiumDNS are listed. SRV and PTR records are rejected with a clear error, because the Namecheap API cannot write them. The user enters a whitelisted IPv4 address, which the API requires on each rspaceship.ts): uses the Spaceship REST API, with paged domain and record lists. Records are converted to and from Spaceship's per-type fields (MX, SRV, CAA and the other types). To change a record's value, the old record is deleted and the new one is saved. If the save fails, the old record is restored.DnsProviderTypevalues, with migration0198. The Namecheap API key and the Spaceship API secret are masked like the other providers' secrets.__test__/dns/namecheap.test.tsand__test__/dns/spaceship.test.ts(27 tests).Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related (if applicable)
Closes #5263
Screenshots (if applicable)
Before: the provider list has Cloudflare, AWS Route53, Porkbun, Infomaniak and OVHcloud only.

After: Namecheap and Spaceship are in the list.

Namecheap form, and "Test Connection" with the Namecheap API error:

Both providers saved:

Protect Namecheap writes from overlapping changes before merging.
Summary
Adds Namecheap and Spaceship DNS providers.
Reviews (1) · Last reviewed commit: "feat(dns): add Namecheap and Spaceship D..." · Reviewed by Greptile