Commit graph

96 commits

Author SHA1 Message Date
Paul Dee
af99942a3e
DOCS: Add NAPTR doc (#2150)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-03-13 16:28:59 -04:00
Tom Limoncelli
cbf4f00686
CHORE: update deps (#2162) 2023-03-13 15:00:04 -04:00
Paul Dee
0e55421e96
DOCS: Update NS.md (#2156)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-03-13 14:42:08 -04:00
Tom Limoncelli
ad4b8daa13
BUGFIX: REPORT change type always crashes on push (#2130) 2023-03-08 22:22:12 -08:00
Jeffrey Cafferata
3d3f15d1d0
DOCS: Correct flag name (#2118)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-03-06 15:23:06 -05:00
Yannik Sembritzki
5d554f1cef
BUG: Compare zones list to ace zone name (#2096) (#2110)
Co-authored-by: Yannik Sembritzki <yannik@sembritzki.org>
2023-03-01 08:38:13 -05:00
Jed Fox
1fda0de4d9
Fix parameter type for DEFAULTS (#2072)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-02-13 14:13:27 -05:00
Tom Limoncelli
d1dcba45ed
CHORE: update deps (#2071) 2023-02-13 13:42:52 -05:00
Yannik Sembritzki
5e06c249d6
Rename DomainCreator to the more accurate ZoneCreator (#2038)
Co-authored-by: Yannik Sembritzki <yannik@sembritzki.org>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-02-07 07:22:49 -05:00
Jed Fox
83252ef641
Remove all template tag lines from the .d.ts file (#2030) 2023-01-31 16:42:17 -05:00
Tom Limoncelli
8ec4e26703
go generate (#2029) 2023-01-31 14:36:10 -05:00
Jeffrey Cafferata
430568c8f8
DOCS: Replace stackexchange.github.io (#2004)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-01-29 13:14:22 -05:00
Tom Limoncelli
8249a4b95b
Linting (#1996) 2023-01-28 11:09:38 -05:00
Tom Limoncelli
3a6b488b8a
CHORE: Update deps (#1984) 2023-01-25 16:35:50 -05:00
Tom Limoncelli
4c3583cd5a
Domains flag should accept simple wildcards (#1983) 2023-01-25 12:17:21 -05:00
Tom Limoncelli
32c7703702
get-zones: improve error message for unsupported providers (#1978) 2023-01-24 10:11:38 -05:00
Tom Limoncelli
a1b24a2e82
GANDI_V5: Temporarily disable ListDomains (#1962) 2023-01-21 17:22:26 -05:00
Jed Fox
9b3ad81b1d
Embed types-dnscontrol.d.ts into the binary instead of fetching it via HTTP (#1942)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-01-17 12:10:43 -05:00
Jed Fox
1e337abcdf
Provide TypeScript typings for dnsconfig.js (#1830)
Co-authored-by: Jeffrey Cafferata <jeffrey@jcid.nl>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-01-12 16:59:42 -05:00
Tom Limoncelli
b0f2945510
REFACTOR: Add diff2 enable flag to all DNS providers (#1851)
This should enable the diff2 code to be inserted with good "git blame" results for new code.  I'm adding this early to catch any problems early.
2022-12-11 15:02:58 -05:00
Tom Limoncelli
b821f4914f
FEATURE: "check" subcommand should send to stdout (#1755)
Co-authored-by: Grant Slater <github@firefishy.com>
2022-09-22 11:03:03 -04:00
Tom Limoncelli
391622ff55
get-zones now outputs a comment about CNAMEs at apex (#1732) 2022-08-29 10:18:39 -04:00
Tom Limoncelli
8bb63be8f5
Add --verbose flag, default to less verbose output (#1721) 2022-08-20 20:59:02 -04:00
Tom Limoncelli
ccb582b278
CHORE: Linting (#1704)
* Remove deprecated io/ioutil
* fixup!
* staticcheck and linting
* revert models/provider.go
* Fix imports to new style
* linting
2022-08-14 20:46:56 -04:00
Tom Limoncelli
cd61c2c766
CHORE: Remove deprecated io/ioutil (#1699)
* Remove deprecated io/ioutil

* fixup!

* fixup!
2022-08-14 12:50:15 -04:00
Jakob Ackermann
a00572af4a
Create zone before use (#1642)
* preview/push: ensure zones exists before querying them

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* HETZNER: reset zone cache when creating a new zone

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* ROUTE53: reset zone cache when creating a new zone

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-08-01 14:44:17 -04:00
Tom Limoncelli
35d47d86e7
get-zones "js" format should generate petty DSP variable (#1630)
* Improve get-zones "js" format.

New:

```
$ dnscontrol get-zone --format js providercredkey - stackoverflow.co.il
var DSP_PROVIDERCREDKEY = NewDnsProvider("providercredkey");
var REG_CHANGEME = NewRegistrar("none");
D("stackoverflow.co.il", REG_CHANGEME,
	DnsProvider(DSP_PROVIDERCREDKEY),
	DefaultTTL(14400),
	A('www', '165.160.15.20'),
	...
	...
	...
	...
	//NAMESERVER('dns1.cscdns.net.'),
	//NAMESERVER('dns2.cscdns.net.')
)
```

* Update test data
2022-07-19 11:21:37 -04:00
Jan-Philipp Benecke
490f1d6184
NEW FEATURE: Add deprecation notice to create-domains command (#1529) 2022-06-08 15:18:26 -04:00
Jan-Philipp Benecke
c0450223c2
Create non-existing zones while push or print warning while preview (#1528)
* Create non-existing zones while push. While preview print a warning

Signed-off-by: Jan-Philipp Benecke <jan-philipp.benecke@jpbe.de>

* Ooops, remove testing lines

Signed-off-by: Jan-Philipp Benecke <jan-philipp.benecke@jpbe.de>

* Renaming flag

Signed-off-by: Jan-Philipp Benecke <jan-philipp.benecke@jpbe.de>

* Change flag description

Signed-off-by: Jan-Philipp Benecke <jan-philipp.benecke@jpbe.de>

* Reverse flag logic

Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>
2022-06-08 14:53:16 -04:00
Tom Limoncelli
9e6d642e35
NEW FEATURE: Moving provider TYPE from dnsconfig.js to creds.json (#1500)
Fixes https://github.com/StackExchange/dnscontrol/issues/1457

* New-style creds.json implememented backwards compatible

* Update tests

* Update docs

* Assume new-style TYPE
2022-05-08 14:23:45 -04:00
Tom Limoncelli
1c43d03d89
Refactor: Move creds.json processing out of InitializeProviders (#1495)
* Rename providers/config to pkg/credsfile

* Refactor InitializeProviders in preparation for v3.16
2022-05-04 11:02:36 -04:00
Tom Limoncelli
19550aeed9
Refactor: Rename providers/config to pkg/credsfile (#1494) 2022-05-02 20:12:30 -04:00
Tom Limoncelli
729672f039
MAINT: Refactor GetDNSConfig (#1466)
* MAINT: Refactor GetDNSConfig

* do not return junk data
2022-03-27 18:00:13 -04:00
Tom Limoncelli
73de17adc2 Revert "_PROVIDER flag phase 1: generate warnings"
This reverts commit 26c632e05f.
2022-03-27 15:56:57 -04:00
Tom Limoncelli
26c632e05f _PROVIDER flag phase 1: generate warnings 2022-03-27 15:54:16 -04:00
Tom Limoncelli
ffe21c6e6d
creds.json should not be executable under Windows (#1456)
* Skip CAA flag test for LINODE

* Require go 1.18

* Update CCI to use go 1.18

* go mod tidy

* working

* Update creds.json docs

* go generate
2022-03-25 15:20:30 -04:00
Tom Limoncelli
7ae27aa0b9 Security: Fix many staticcheck warnings 2021-12-14 09:47:32 -05:00
Tom Limoncelli
654736be29
Improve MSDNS naptr support (#1165)
* MSDNS: Improve reliability of zone dump

* Update tests

* MSDNS: Add initial NAPTR support

* Update

* fix tests

* fix tests

* Fixing integration tests for NAPTR

* Handle bad JSON. Handle NAPTR TTLs
2021-06-24 18:26:21 -04:00
Tom Limoncelli
8d139d182f
gofmt all (#1144) 2021-05-04 14:15:31 -04:00
Tom Limoncelli
e69e6f27e4
Linting (#1087)
* fix linting
* rename AuditRecordsor to RecordAuditor
* gandi_v5 to gandiv5
2021-03-08 20:14:30 -05:00
Tom Limoncelli
fb0bcaac64
Clarify that create-domains does not purchase them (#1086)
* Make GCLOUD and GANDI_V5 modules consistant

Fixes https://github.com/StackExchange/dnscontrol/issues/1060
Fixes https://github.com/StackExchange/dnscontrol/issues/1059

* Fix help text
2021-03-07 15:24:23 -05:00
Tom Limoncelli
8dea9edc34
Re-engineer TXT records for simplicity and better compliance (#1063)
TXT records are now handled different.

1. The raw input from dnsconfig.js is passed all the way to the provider. The provider can determine if it can or can't handle such records (auditrecords.go) and processes them internally as such.
2. The CanUseTXTMulti capability is no longer needed.

* DSPs now register a table of functions
* Use audits for txt record variations
* unit tests pass. integration fails.
* fix deepcopy problem
* rename to AuditRecordSupport
* Reduce use of TXTMulti
* Remove CanUseTXTMulti
* fix Test Skip
* fix DO
* fix vultr
* fix NDC
* msdns fixes
* Fix powerdns and cloudflare
* HEDNS: Fix usage of target field to resolve TXT handling (#1067)
* Fix HEXONET

Co-authored-by: Robert Blenkinsopp <robert@blenkinsopp.net>
Co-authored-by: Jakob Ackermann <das7pad@outlook.com>
2021-03-07 13:19:22 -05:00
Tom Limoncelli
21e85e6528
"Target" RecordConfig should not be exported (#1061)
* Unexport RecordConfig.Target
* Fix tests
* HEDNS: Fix usage of target field to resolve TXT handling (#1067)

Co-authored-by: Robert Blenkinsopp <robert@blenkinsopp.net>
2021-03-04 18:58:23 -05:00
Tom Limoncelli
541e6027aa
Improvements to fmt (#1076)
* fmt should include newline at end
* fmt should use stderr
2021-03-02 16:02:51 -05:00
Jan-Philipp Benecke
37b02b6540
New Feature: JS formatter and prettifier (#917)
FYI: This is an experimental feature. It depends on an external module that may not be supported in the long term.

* PoC: JS formatter
* No default value for output file
2021-03-02 15:51:27 -05:00
Tom Limoncelli
c547beacc0
NEW FEATURE: Support Split Horizon DNS (#1034)
* Implement main feature
* BIND: Permit printf-like file name formats
* BIND: Make filenameformat work forwards and backwards.
* Fix extrator test cases
2021-02-05 12:12:45 -05:00
Tom Limoncelli
236cffa9b9 wrap more errors 2021-02-01 07:33:56 -05:00
Yuhui Xu
6efedd689d
New feature: FETCH() permits http gets in dnsconfig.js (#1007)
add PANIC() and error-handled FETCH()
2021-01-06 10:45:32 -05:00
Tom Limoncelli
d6b191bae4
CLOUDFLARE: get-zones now outputs "orange cloud" status (#952)
* CLOUDFLARE: get-zones now outputs "orange cloud" status
2020-11-24 10:30:21 -05:00
Jan-Philipp Benecke
512aa7d4b3
NEW FEATURE: Set JS variables from command line (#913)
* Add ability to specify variables that are passed to js

* Use SplitN to respect a = in value part

* Add JSON parsing for cli variables

* Remove JSON parsing for cli variables

* Add a function to set CLI defaults

* Update static.go
2020-10-27 10:43:00 -04:00