1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

NEW PROVIDER: HEDNS: Hurricane Electric DNS (dns.he.net) (#822)

* Add initial dns.he.net provider support

* Update to new IncrementalDiff interface

* Fix ListZones output for `all` query on `get-zones`

* Refactor authentication code for 2FA with better error checking

* Fix integration test and refactor zone record retrieval

* Add option to use `.hedns-session` file to store sessions between runs

* Add comment on `session-file-path`

* Add integration test for TXT records longer than 255 characters

* Add additional checks for expected responses, and better 2FA error checking

* Minor documentation changes

* Revert "Add integration test for TXT records longer than 255 characters"

This reverts commit 657272db

* Add note on provider fragility due to parsing the web-interface

* Resolve go lint issues

* Clarify security warnings in documentation
This commit is contained in:
Robert Blenkinsopp
2020-08-26 18:38:28 +01:00
committed by GitHub
parent 443c187dda
commit 74dd34443a
11 changed files with 938 additions and 13 deletions

View File

@@ -438,7 +438,7 @@ func ignoreName(name string) *rec {
func ignoreTarget(name string, typ string) *rec {
r := &rec{
Type: "IGNORE_TARGET",
Type: "IGNORE_TARGET",
Target: typ,
}
r.SetLabel(name, "**current-domain**")
@@ -509,16 +509,16 @@ func tc(desc string, recs ...*rec) *TestCase {
} else if r.Type == "IGNORE_TARGET" {
ignoredTargets = append(ignoredTargets, &models.IgnoreTarget{
Pattern: r.GetLabel(),
Type: r.Target,
Type: r.Target,
})
} else {
records = append(records, r)
}
}
return &TestCase{
Desc: desc,
Records: records,
IgnoredNames: ignoredNames,
Desc: desc,
Records: records,
IgnoredNames: ignoredNames,
IgnoredTargets: ignoredTargets,
}
}
@@ -614,6 +614,10 @@ func makeTests(t *testing.T) []*TestGroup {
tc("Delete one", a("@", "1.2.3.4").ttl(500), a("www", "5.6.7.8").ttl(400)),
tc("Add back and change ttl", a("www", "5.6.7.8").ttl(700), a("www", "1.2.3.4").ttl(700)),
tc("Change targets and ttls", a("www", "1.1.1.1"), a("www", "2.2.2.2")),
),
testgroup("WildcardACD",
not("HEDNS"), // Not supported by dns.he.net due to abuse
tc("Create wildcard", a("*", "1.2.3.4"), a("www", "1.1.1.1")),
tc("Delete wildcard", a("www", "1.1.1.1")),
),
@@ -641,7 +645,7 @@ func makeTests(t *testing.T) []*TestGroup {
),
testgroup("Null MX",
not("AZURE_DNS", "GANDI_V5", "INWX", "NAMEDOTCOM", "DIGITALOCEAN", "NETCUP", "DNSIMPLE"), // These providers don't support RFC 7505
not("AZURE_DNS", "GANDI_V5", "INWX", "NAMEDOTCOM", "DIGITALOCEAN", "NETCUP", "DNSIMPLE", "HEDNS"), // These providers don't support RFC 7505
tc("Null MX", mx("@", 0, ".")),
),