Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
fbb8920
Use RCv3 in diff2
TomOnTime May 17, 2026
444d61c
SVCB and HTTPS now supports
TomOnTime May 18, 2026
87b1660
Merge branch 'main' into tlim_experiment1
TomOnTime May 19, 2026
59c9ffa
Native types converted
TomOnTime May 19, 2026
0532d06
wip!
TomOnTime May 19, 2026
42ec97e
REFACTOR: Add V3 fields to RecordConfig
TomOnTime May 19, 2026
5f2ffa6
Merge branch 'tlim_recordng' into tlim_experiment1
TomOnTime May 19, 2026
429112e
m
TomOnTime May 19, 2026
268a4ed
Merge branch 'main' into tlim_experiment1
TomOnTime May 19, 2026
4c27250
diff2: fixing analyze_test.go
TomOnTime May 19, 2026
674e9b0
linting
TomOnTime May 19, 2026
ddf89c4
empty
TomOnTime May 19, 2026
4b0a415
Merge branch 'main' into tlim_experiment1
TomOnTime May 20, 2026
aac371c
CICD: Add pipefail to catch all errors
TomOnTime May 20, 2026
625134c
Merge branch 'tlim_pipefail' into tlim_experiment1
TomOnTime May 20, 2026
a3c3cde
Merge branch 'main' into tlim_experiment1
TomOnTime May 20, 2026
b64638f
Merge branch 'main' into tlim_experiment1
TomOnTime May 23, 2026
b68b682
CLOUDFLAREAPI: Reduce integration tests to match the free tier (#4325)
TomOnTime May 24, 2026
52cbb6e
BUGFIX: ech=s (#4324)
TomOnTime May 24, 2026
4e2a923
CICD: Skip failing HEDNS test (#4329)
TomOnTime May 25, 2026
92e8c82
m
TomOnTime May 27, 2026
45d6bf4
m
TomOnTime May 27, 2026
3a6d065
Merge branch 'main' into tlim_experiment1
TomOnTime May 27, 2026
1313e56
Merge branch 'main' into tlim_experiment1
TomOnTime May 27, 2026
7564202
fix 027-ds
TomOnTime May 27, 2026
ee2018a
m
TomOnTime May 28, 2026
d4b22b9
AZURE_PRIVATE_DNS: Fix more tests
TomOnTime May 28, 2026
475fd46
fixups!
TomOnTime May 28, 2026
74e03bf
Merge branch 'main' into tlim_azureoptimize
TomOnTime May 28, 2026
469f2bd
fix only()
TomOnTime May 28, 2026
deeecfa
more
TomOnTime May 28, 2026
8cbf28d
linting
TomOnTime May 28, 2026
0190255
Merge branch 'main' into tlim_experiment1
TomOnTime May 28, 2026
9f3c46e
AZURE_ALIAS and R53_ALIAS
TomOnTime May 29, 2026
8ade93c
implement cfworkerroute
TomOnTime May 29, 2026
266395f
fix cfWorkerRoute
TomOnTime May 29, 2026
b716b01
worker route
TomOnTime May 29, 2026
7ade52f
fix adguard
TomOnTime May 29, 2026
b890bd0
use args consistently. normalize file order
TomOnTime May 29, 2026
703e1bf
m
TomOnTime May 29, 2026
b226341
Merge branch 'main' into tlim_azureoptimize
TomOnTime May 29, 2026
e33206e
Merge branch 'main' into tlim_experiment1
TomOnTime May 29, 2026
efec4ae
m
TomOnTime May 29, 2026
5143be9
Merge branch 'tlim_azureoptimize' into tlim_experiment1
TomOnTime May 29, 2026
5cbde3a
Add placeholders for remaining custom types
TomOnTime May 29, 2026
6aa27ed
Fix AddNSRecords
TomOnTime May 29, 2026
917069f
wip!
TomOnTime May 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commands/getZones.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func GetZone(args GetZoneArgs) error {
if err != nil {
return fmt.Errorf("failed GetZone gzr: %w", err)
}
rtypecontrol.FixLegacyRecords(&recs) // Call this after GetZoneRecords() to fix providers that haven't been updated for RecordConfigV2.
rtypecontrol.FixLegacyRecords(&recs, zone) // Call this after GetZoneRecords() to fix providers that haven't been updated for RecordConfigV2.
zoneRecs[i] = recs
}

Expand Down
2 changes: 1 addition & 1 deletion commands/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func fetchZoneRecordsReal(entry InitCredsEntry, zone string) (models.Records, er
if err != nil {
return nil, err
}
rtypecontrol.FixLegacyRecords(&recs)
rtypecontrol.FixLegacyRecords(&recs, zone)
return recs, nil
}

Expand Down
60 changes: 57 additions & 3 deletions integrationTest/helpers_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (
"testing"
"time"

dnsv2 "codeberg.org/miekg/dns"
dnsrdatav2 "codeberg.org/miekg/dns/rdata"
"github.com/DNSControl/dnscontrol/v4/models"
"github.com/DNSControl/dnscontrol/v4/pkg/domaintags"
"github.com/DNSControl/dnscontrol/v4/pkg/nameservers"
Expand Down Expand Up @@ -517,9 +519,29 @@ func dnskey(name string, flags uint16, protocol, algorithm uint8, publicKey stri
}

func https(name string, priority uint16, target string, params string) *models.RecordConfig {
r := makeRec(name, target, "HTTPS")
r := makeRecNoFix(name, target, "HTTPS")
r.SvcPriority = priority
r.SvcParams = params

// // Hack to set .RDATA without importing miekg/dns in pkg/rtypecontrol/fixlegacy.go
// rty := dnsv2.TypeSVCB
// cp := params
// if strings.Contains(cp, "ech=IGNORE") {
// cp = strings.ReplaceAll(cp, "ech=IGNORE", "")
// }
// rrv2, err := dnsv2.NewData(rty, fmt.Sprintf("%d %s %s", priority, target, cp))
// if err != nil {
// panic(fmt.Sprintf("could not parse SVCB record: %s (%d %s %s)", err, priority, target, cp))
// }
// r.RDATA = rrv2
// old := r.RDATA.String()
// r.ComparableV3 = r.RDATA.String()
// if r.ComparableV3 != old {
// panic("DEBUG CV3")
// }

r.FixUp(globalDCN.NameASCII) // Hack. Populates .RDATA and .TypeNum if needed.

return r
}

Expand Down Expand Up @@ -552,6 +574,12 @@ func loc(name string, d1 uint8, m1 uint8, s1 float32, ns string,
}

func makeRec(name, target, typ string) *models.RecordConfig {
r := makeRecNoFix(name, target, typ)
r.FixUp(globalDCN.NameASCII) // Hack. Populates .RDATA and .TypeNum if needed.
return r
}

func makeRecNoFix(name, target, typ string) *models.RecordConfig {
r := &models.RecordConfig{
Type: typ,
TTL: 300,
Expand All @@ -570,8 +598,9 @@ func manyA(namePattern, target string, n int) []*models.RecordConfig {
}

func mx(name string, prio uint16, target string) *models.RecordConfig {
r := makeRec(name, target, "MX")
r := makeRecNoFix(name, target, "MX")
r.MxPreference = prio
r.FixUp(globalDCN.NameASCII) // Hack. Populates .RDATA and .TypeNum if needed.
return r
}

Expand Down Expand Up @@ -633,6 +662,20 @@ func smimea(name string, usage, selector, matchingtype uint8, target string) *mo
func soa(name string, ns, mbox string, serial, refresh, retry, expire, minttl uint32) *models.RecordConfig {
r := makeRec(name, "", "SOA")
panicOnErr(r.SetTargetSOA(ns, mbox, serial, refresh, retry, expire, minttl))

// Hack to set .RDATA without importing miekg/dns in pkg/rtypecontrol/fixlegacy.go
r.RDATA = &dnsrdatav2.SOA{
Ns: ns,
Mbox: mbox,
Serial: serial,
Refresh: refresh,
Retry: retry,
Expire: expire,
Minttl: minttl,
}
r.TypeNum = dnsv2.TypeSOA
r.ComparableV3 = fmt.Sprintf("%s %s %d %d %d %d %d", ns, mbox, serial, refresh, retry, expire, minttl)

return r
}

Expand All @@ -652,6 +695,16 @@ func svcb(name string, priority uint16, target string, params string) *models.Re
r := makeRec(name, target, "SVCB")
r.SvcPriority = priority
r.SvcParams = params

// Hack to set .RDATA without importing miekg/dns in pkg/rtypecontrol/fixlegacy.go
rty := dnsv2.TypeSVCB
rrv2, err := dnsv2.NewData(rty, fmt.Sprintf("%d %s %s", priority, target, params))
if err != nil {
panic(fmt.Sprintf("could not parse SVCB record: %s", err))
}
r.RDATA = rrv2
r.ComparableV3 = r.RDATA.String()

return r
}

Expand Down Expand Up @@ -748,8 +801,9 @@ func tc(desc string, recs ...*models.RecordConfig) *TestCase {
}

func txt(name, target string) *models.RecordConfig {
r := makeRec(name, "", "TXT")
r := makeRecNoFix(name, "", "TXT")
panicOnErr(r.SetTargetTXT(target))
r.FixUp(globalDCN.NameASCII) // Hack. Populates .RDATA and .TypeNum if needed.
return r
}

Expand Down
90 changes: 48 additions & 42 deletions integrationTest/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ func makeTests() []*TestGroup {
//
// Let's just ignore ECH test for Vercel for now.
"VERCEL",
"HEDNS", // BUG: https://github.com/DNSControl/dnscontrol/issues/4328
),
tc("Create a HTTPS record", https("@", 1, "example.com.", "alpn=h2,h3")),
tc("Add an ECH key", https("@", 1, "example.com.", "alpn=h2,h3 ech=some+base64+encoded+value///")),
Expand Down Expand Up @@ -417,10 +418,11 @@ func makeTests() []*TestGroup {

testgroup("NS",
not(
"DNSIMPLE", // Does not support NS records nor subdomains.
"EXOSCALE", // Not supported.
"NETCUP", // NS records not currently supported.
"FORTIGATE", // Not supported
"AZURE_PRIVATE_DNS", // Not supported
"DNSIMPLE", // Does not support NS records nor subdomains.
"EXOSCALE", // Not supported.
"FORTIGATE", // Not supported
"NETCUP", // NS records not currently supported.
),
tc("NS for subdomain", ns("xyz", "ns2.foo.com.")),
tc("Dual NS for subdomain", ns("xyz", "ns2.foo.com."), ns("xyz", "ns1.foo.com.")),
Expand All @@ -429,17 +431,18 @@ func makeTests() []*TestGroup {

testgroup("NS only APEX",
not(
"DNSCALE", // Apex NS records are managed by DNScale.
"DNSIMPLE", // Does not support NS records nor subdomains.
"EXOSCALE", // Not supported.
"GANDI_V5", // "Gandi does not support changing apex NS records. Ignoring ns1.foo.com."
"JOKER", // Not supported via the Zone API.
"NAMEDOTCOM", // "Ignores @ for NS records"
"NETCUP", // NS records not currently supported.
"PORKBUN", // Record ignored.
"SAKURACLOUD", // Silently ignores requests to remove NS at @.
"TRANSIP", // "it is not allowed to have an NS for an @ record"
"VERCEL", // "invalid_name - Cannot set NS records at the root level. Only subdomain NS records are supported"
"AZURE_PRIVATE_DNS", // Apex NS records are managed by Azure.
"DNSCALE", // Apex NS records are managed by DNScale.
"DNSIMPLE", // Does not support NS records nor subdomains.
"EXOSCALE", // Not supported.
"GANDI_V5", // "Gandi does not support changing apex NS records. Ignoring ns1.foo.com."
"JOKER", // Not supported via the Zone API.
"NAMEDOTCOM", // "Ignores @ for NS records"
"NETCUP", // NS records not currently supported.
"PORKBUN", // Record ignored.
"SAKURACLOUD", // Silently ignores requests to remove NS at @.
"TRANSIP", // "it is not allowed to have an NS for an @ record"
"VERCEL", // "invalid_name - Cannot set NS records at the root level. Only subdomain NS records are supported"
),
tc("Single NS at apex", ns("@", "ns1.foo.com.")),
tc("Dual NS at apex", ns("@", "ns2.foo.com."), ns("@", "ns1.foo.com.")),
Expand Down Expand Up @@ -653,21 +656,22 @@ func makeTests() []*TestGroup {
// - DIGITALOCEAN: page size is 100 (default: 20)
// - VERCEL: up to 100 per pages
not(
"AZURE_DNS", // Removed because it is too slow
"CLOUDFLAREAPI", // Infinite pagesize but due to slow speed, skipping.
"DIGITALOCEAN", // No paging. Why bother?
"DESEC", // Skip due to daily update limits.
"AZURE_DNS", // Removed because it is too slow
"AZURE_PRIVATE_DNS", // Removed because it is too slow
"CLOUDFLAREAPI", // Infinite pagesize but due to slow speed, skipping.
"CNR", // Test beaks limits.
// "CSCGLOBAL", // Doesn't page. Works fine. Due to the slow API we skip.
"GANDI_V5", // Their API is so damn slow. We'll add it back as needed.
"HEDNS", // Doesn't page. Works fine. Due to the slow API we skip.
"LOOPIA", // Their API is so damn slow. Plus, no paging.
"NAMEDOTCOM", // Their API is so damn slow. We'll add it back as needed.
"NS1", // Free acct only allows 50 records, therefore we skip
"DESEC", // Skip due to daily update limits.
"DIGITALOCEAN", // No paging. Why bother?
"FORTIGATE", // No paging
"GANDI_V5", // Their API is so damn slow. We'll add it back as needed.
"HEDNS", // Doesn't page. Works fine. Due to the slow API we skip.
"LOOPIA", // Their API is so damn slow. Plus, no paging.
"NAMEDOTCOM", // Their API is so damn slow. We'll add it back as needed.
"NS1", // Free acct only allows 50 records, therefore we skip
// "ROUTE53", // Batches up changes in pages.
"TRANSIP", // Doesn't page. Works fine. Due to the slow API we skip.
"CNR", // Test beaks limits.
"FORTIGATE", // No paging
"VERCEL", // Rate limit 100 creation per hour, 101 needs an hour, too much
"TRANSIP", // Doesn't page. Works fine. Due to the slow API we skip.
"VERCEL", // Rate limit 100 creation per hour, 101 needs an hour, too much
),
tc("99 records", manyA("pager101-rec%04d", "1.2.3.4", 99)...),
tc("100 records", manyA("pager101-rec%04d", "1.2.3.4", 100)...),
Expand All @@ -676,12 +680,13 @@ func makeTests() []*TestGroup {

testgroup("pager601",
only(
// "AZURE_DNS", // Removed because it is too slow
//"CLOUDFLAREAPI", // Infinite pagesize but due to slow speed, skipping.
//"CSCGLOBAL", // Doesn't page. Works fine. Due to the slow API we skip.
//"DESEC", // Skip due to daily update limits.
//"GANDI_V5", // Their API is so damn slow. We'll add it back as needed.
//"GCLOUD",
// "AZURE_DNS", // Removed because it is too slow
// "AZURE_PRIVATE_DNS", // Removed because it is too slow
// "CLOUDFLAREAPI", // Infinite pagesize but due to slow speed, skipping.
// "CSCGLOBAL", // Doesn't page. Works fine. Due to the slow API we skip.
// "DESEC", // Skip due to daily update limits.
// "GANDI_V5", // Their API is so damn slow. We'll add it back as needed.
// "GCLOUD",
"ORACLE",
"ROUTE53", // Batches up changes in pages.
),
Expand All @@ -691,14 +696,15 @@ func makeTests() []*TestGroup {

testgroup("pager1201",
only(
// "AKAMAIEDGEDNS", // No paging done. No need to test.
//"AZURE_DNS", // Currently failing. See https://github.com/DNSControl/dnscontrol/issues/770
//"CLOUDFLAREAPI", // Fails with >1000 corrections. See https://github.com/DNSControl/dnscontrol/issues/1440
//"CSCGLOBAL", // Doesn't page. Works fine. Due to the slow API we skip.
//"DESEC", // Skip due to daily update limits.
//"GANDI_V5", // Their API is so damn slow. We'll add it back as needed.
//"HEDNS", // No paging done. No need to test.
//"GCLOUD",
// "AKAMAIEDGEDNS", // No paging done. No need to test.
// "AZURE_DNS", // Too slow
// "AZURE_PRIVATE_DNS", // Too slow
// "CLOUDFLAREAPI", // Fails with >1000 corrections. See https://github.com/DNSControl/dnscontrol/issues/1440
// "CSCGLOBAL", // Doesn't page. Works fine. Due to the slow API we skip.
// "DESEC", // Skip due to daily update limits.
// "GANDI_V5", // Their API is so damn slow. We'll add it back as needed.
"GCLOUD",
// "HEDNS", // No paging done. No need to test.
"HOSTINGDE", // Pages.
"ORACLE",
"ROUTE53", // Batches up changes in pages.
Expand Down
3 changes: 3 additions & 0 deletions integrationTest/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ func TestDualProviders(t *testing.T) {
run()
// run again to make sure no corrections
t.Log("Running again to ensure stability")
for _, r := range dc.Records {
r.FixUp(dc.Name)
}
rs, cs, actualChangeCount, err := zonerecs.CorrectZoneRecords(p, dc)
if err != nil {
t.Fatal(err)
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"runtime/debug"

"github.com/DNSControl/dnscontrol/v4/commands"
_ "github.com/DNSControl/dnscontrol/v4/pkg/privatetypes"
_ "github.com/DNSControl/dnscontrol/v4/pkg/privatetypes/rdata"
_ "github.com/DNSControl/dnscontrol/v4/pkg/providers/_all"
_ "github.com/DNSControl/dnscontrol/v4/pkg/rtype"
"github.com/DNSControl/dnscontrol/v4/pkg/version"
Expand Down
Loading
Loading