diff --git a/docs/_functions/domain/A.md b/docs/_functions/domain/A.md index 9b840d365..0371dc59d 100644 --- a/docs/_functions/domain/A.md +++ b/docs/_functions/domain/A.md @@ -10,7 +10,7 @@ A adds an A record To a domain. The name should be the relative label for the re The address should be an ip address, either a string, or a numeric value obtained via [IP](#IP). -Modifiers can be any number of [record modifiers](#record-modifiers) or json objects, which will be merged into the record's metadata. +Modifiers can be any number of [record modifiers](#record-modifiers) or JSON objects, which will be merged into the record's metadata. {% capture example %} ```js diff --git a/docs/_functions/domain/AAAA.md b/docs/_functions/domain/AAAA.md index 5d1c458ac..0fee9999b 100644 --- a/docs/_functions/domain/AAAA.md +++ b/docs/_functions/domain/AAAA.md @@ -10,7 +10,7 @@ AAAA adds an AAAA record To a domain. The name should be the relative label for The address should be an IPv6 address as a string. -Modifiers can be any number of [record modifiers](#record-modifiers) or json objects, which will be merged into the record's metadata. +Modifiers can be any number of [record modifiers](#record-modifiers) or JSON objects, which will be merged into the record's metadata. {% capture example %} ```js diff --git a/docs/_functions/domain/AKAMAICDN.md b/docs/_functions/domain/AKAMAICDN.md index 176355d49..f493f3995 100644 --- a/docs/_functions/domain/AKAMAICDN.md +++ b/docs/_functions/domain/AKAMAICDN.md @@ -1,9 +1,9 @@ --- name: AKAMAICDN parameters: -- name -- target -- modifiers... + - name + - target + - modifiers... --- AKAMAICDN is a proprietary record type that is used to configure [Zone Apex Mapping](https://blogs.akamai.com/2019/08/fast-dns-zone-apex-mapping-dnssec.html). diff --git a/docs/_functions/domain/TXT.md b/docs/_functions/domain/TXT.md index b6a2a7fd0..6fa9666ee 100644 --- a/docs/_functions/domain/TXT.md +++ b/docs/_functions/domain/TXT.md @@ -16,7 +16,7 @@ Each string is a JavaScript string (quoted using single or double quotes). The (somewhat complex) quoting rules of the DNS protocol will be done for you. -Modifiers can be any number of [record modifiers](#record-modifiers) or json objects, which will be merged into the record's metadata. +Modifiers can be any number of [record modifiers](#record-modifiers) or JSON objects, which will be merged into the record's metadata. {% capture example %} ```js diff --git a/docs/_functions/global/FETCH.md b/docs/_functions/global/FETCH.md index 009c46cdf..3e065287d 100644 --- a/docs/_functions/global/FETCH.md +++ b/docs/_functions/global/FETCH.md @@ -7,7 +7,7 @@ parameters: `FETCH` is a wrapper for the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This allows dynamically setting DNS records based on an external data source, e.g. the API of your cloud provider. -Compared to `fetch` from Fetch API, `FETCH` will call [PANIC](#PANIC) to terminate the execution of the script, and therefore DnsControl, if a network error occurs. +Compared to `fetch` from Fetch API, `FETCH` will call [PANIC](#PANIC) to terminate the execution of the script, and therefore DNSControl, if a network error occurs. Otherwise the syntax of `FETCH` is the same as `fetch`. @@ -16,7 +16,7 @@ Otherwise the syntax of `FETCH` is the same as `fetch`. > WARNING: > > 1. Relying on external sources adds a point of failure. If the external source doesn't work, your script won't either. Please make sure you are aware of the consequences. -> 2. Make sure DnsControl only uses verified configuration if you want to use `FETCH`. For example, an attacker can send Pull Requests to your config repo, and have your CI test malicious configurations and make arbitrary HTTP requests. Therefore, `FETCH` must be explicitly enabled with flag `--allow-fetch` on DnsControl invocation. +> 2. Make sure DNSControl only uses verified configuration if you want to use `FETCH`. For example, an attacker can send Pull Requests to your config repo, and have your CI test malicious configurations and make arbitrary HTTP requests. Therefore, `FETCH` must be explicitly enabled with flag `--allow-fetch` on DNSControl invocation. {% capture example %} ```js diff --git a/docs/_functions/global/NewDnsProvider.md b/docs/_functions/global/NewDnsProvider.md index e263aa462..daee279a8 100644 --- a/docs/_functions/global/NewDnsProvider.md +++ b/docs/_functions/global/NewDnsProvider.md @@ -12,7 +12,7 @@ A DSP stores a DNS zone's records and provides DNS service for the zone (i.e. answers on port 53 to queries related to the zone). * `name` must match the name of an entry in `creds.json`. -* `type` specifies a valid DNS provider type identifier listed on the [provider page.]({{site.github.url}}/provider-list). +* `type` specifies a valid DNS provider type identifier listed on the [provider page]({{site.github.url}}/provider-list). * Starting with v3.16, the type is optional. If it is absent, the `TYPE` field in `creds.json` is used instead. You can leave it out. (Thanks to JavaScript magic, you can leave it out even when there are more fields). * Starting with v4.0, specifying the type may be an error. Please add the `TYPE` field to `creds.json` and remove this parameter from `dnsconfig.js` to prepare. * `meta` is a way to send additional parameters to the provider. It is optional and only certain providers use it. See the [individual provider docs]({{site.github.url}}/provider-list) for details. diff --git a/docs/_functions/global/NewRegistrar.md b/docs/_functions/global/NewRegistrar.md index 0fcdea4fa..92372f0ad 100644 --- a/docs/_functions/global/NewRegistrar.md +++ b/docs/_functions/global/NewRegistrar.md @@ -12,7 +12,7 @@ A registrar maintains the domain's registration and delegation (i.e. the nameservers for the domain). DNSControl only manages the delegation. * `name` must match the name of an entry in `creds.json`. -* `type` specifies a valid DNS provider type identifier listed on the [provider page.]({{site.github.url}}/provider-list). +* `type` specifies a valid DNS provider type identifier listed on the [provider page]({{site.github.url}}/provider-list). * Starting with v3.16, the type is optional. If it is absent, the `TYPE` field in `creds.json` is used instead. You can leave it out. (Thanks to JavaScript magic, you can leave it out even when there are more fields). * Starting with v4.0, specifying the type may be an error. Please add the `TYPE` field to `creds.json` and remove this parameter from `dnsconfig.js` to prepare. * `meta` is a way to send additional parameters to the provider. It is optional and only certain providers use it. See the [individual provider docs]({{site.github.url}}/provider-list) for details. diff --git a/docs/_functions/global/PANIC.md b/docs/_functions/global/PANIC.md index 92fcd4adc..75f130825 100644 --- a/docs/_functions/global/PANIC.md +++ b/docs/_functions/global/PANIC.md @@ -4,7 +4,7 @@ parameters: - message --- -`PANIC` terminates the script and therefore DnsControl with an exit code of 1. This should be used if your script cannot gather enough information to generate records, for example when a HTTP request failed. +`PANIC` terminates the script and therefore DNSControl with an exit code of 1. This should be used if your script cannot gather enough information to generate records, for example when a HTTP request failed. {% capture example %} ```js diff --git a/docs/_functions/global/getConfiguredDomains.md b/docs/_functions/global/getConfiguredDomains.md index 1cc56110f..48244e80b 100644 --- a/docs/_functions/global/getConfiguredDomains.md +++ b/docs/_functions/global/getConfiguredDomains.md @@ -47,9 +47,9 @@ Example for adding DMARC report records: ```js var domains = getConfiguredDomains(); for(i = 0; i < domains.length; i++) { - D_EXTEND("domain1.tld", - TXT(domains[i] + '._report._dmarc', 'v=DMARC1') - ); + D_EXTEND("domain1.tld", + TXT(domains[i] + '._report._dmarc', 'v=DMARC1') + ); } ``` diff --git a/docs/_functions/global/require.md b/docs/_functions/global/require.md index 169a6497b..a391cb85a 100644 --- a/docs/_functions/global/require.md +++ b/docs/_functions/global/require.md @@ -55,7 +55,7 @@ function includeK8Sdev() { {% include example.html content=example %} -You can also use it to require json files and initialize variables with it: +You can also use it to require JSON files and initialize variables with it: For Example: {% capture example %} diff --git a/docs/_functions/global/require_glob.md b/docs/_functions/global/require_glob.md index dfc298625..6250524e3 100644 --- a/docs/_functions/global/require_glob.md +++ b/docs/_functions/global/require_glob.md @@ -27,13 +27,13 @@ require_glob("./domains/", false); One more important thing to note: `require_glob()` is as smart as `require()` is. It loads files always relative to the JavaScript file where it's being executed in. Let's go with an example, as it describes it better: -dnscontrol.js: +`dnscontrol.js`: ```js require("domains/index.js"); ``` -domains/index.js: +`domains/index.js`: ```js require_glob("./user1/"); diff --git a/docs/_functions/record/R53_ZONE.md b/docs/_functions/record/R53_ZONE.md index ad848be6f..2888515e7 100644 --- a/docs/_functions/record/R53_ZONE.md +++ b/docs/_functions/record/R53_ZONE.md @@ -8,8 +8,4 @@ R53_ZONE lets you specify the AWS Zone ID for an entire domain (D()) or a specif When used with D(), it sets the zone id of the domain. This can be used to differentiate between split horizon domains in public and private zones. -When used with R53_ALIAS() it sets the required Route53 hosted zone id in a R53_ALIAS record. See [https://stackexchange.github.io/dnscontrol/js#R53_ALIAS](R53_ALIAS's documentation) for details. - - - - +When used with R53_ALIAS() it sets the required Route53 hosted zone id in a R53_ALIAS record. See [R53_ALIAS's documentation](https://stackexchange.github.io/dnscontrol/js#R53_ALIAS) for details. diff --git a/docs/_providers/autodns.md b/docs/_providers/autodns.md index 4a72ba470..71e855d71 100644 --- a/docs/_providers/autodns.md +++ b/docs/_providers/autodns.md @@ -14,7 +14,7 @@ To use this provider, add an entry to `creds.json` with `TYPE` set to `AUTODNS` Example: -{% highlight json %} +```json { "autodns": { "TYPE": "AUTODNS", @@ -23,17 +23,17 @@ Example: "context": "33004" } } -{% endhighlight %} +``` ## Usage An example `dnsconfig.js` configuration: -{% highlight js %} +```js var REG_NONE = NewRegistrar("none"); var DSP_AUTODNS = NewDnsProvider("autodns"); D("example.tld", REG_NONE, DnsProvider(DSP_AUTODNS), A("test", "1.2.3.4") ); -{%endhighlight%} +``` diff --git a/docs/_providers/axfrddns.md b/docs/_providers/axfrddns.md index 19deb53bb..2f055fe2d 100644 --- a/docs/_providers/axfrddns.md +++ b/docs/_providers/axfrddns.md @@ -90,13 +90,13 @@ the later allows `get-zones` to work properly. ```js var DSP_AXFRDDNS = NewDnsProvider("axfrddns", { - "default_ns": [ - "ns1.example.tld.", - "ns2.example.tld.", - "ns3.example.tld.", - "ns4.example.tld." - ] - } + "default_ns": [ + "ns1.example.tld.", + "ns2.example.tld.", + "ns3.example.tld.", + "ns4.example.tld." + ] + } } ``` @@ -144,15 +144,15 @@ transfer and a conjunction of TSIG and IP-based ACL for the updates. ```js options { - listen-on { any; }; - listen-on-v6 { any; }; + listen-on { any; }; + listen-on-v6 { any; }; - allow-query { any; }; - allow-notify { none; }; - allow-recursion { none; }; - allow-transfer { none; }; - allow-update { none; }; - allow-query-cache { none; }; + allow-query { any; }; + allow-notify { none; }; + allow-recursion { none; }; + allow-transfer { none; }; + allow-update { none; }; + allow-query-cache { none; }; }; diff --git a/docs/_providers/bind.md b/docs/_providers/bind.md index 2ba4c86d7..1c4f873e0 100644 --- a/docs/_providers/bind.md +++ b/docs/_providers/bind.md @@ -46,20 +46,20 @@ In this example we set the default SOA settings and NS records. ```js var DSP_BIND = NewDnsProvider("bind", { - "default_soa": { - "master": "ns1.example.tld.", - "mbox": "sysadmin.example.tld.", - "refresh": 3600, - "retry": 600, - "expire": 604800, - "minttl": 1440, - }, - "default_ns": [ - "ns1.example.tld.", - "ns2.example.tld.", - "ns3.example.tld.", - "ns4.example.tld." - ] + "default_soa": { + "master": "ns1.example.tld.", + "mbox": "sysadmin.example.tld.", + "refresh": 3600, + "retry": 600, + "expire": 604800, + "minttl": 1440, + }, + "default_ns": [ + "ns1.example.tld.", + "ns2.example.tld.", + "ns3.example.tld.", + "ns4.example.tld." + ] }) ``` diff --git a/docs/_providers/gcloud.md b/docs/_providers/gcloud.md index f6a918762..0eef8f660 100644 --- a/docs/_providers/gcloud.md +++ b/docs/_providers/gcloud.md @@ -39,7 +39,7 @@ Example: **Note:** Don't confuse the `TYPE` and `type` fields. `TYPE` is set to `GCLOUD` and specifies which provider type to use. `type` specifies the type of account in use. -**Note**: The `project_id`, `private_key`, and `client_email`, are the only fields that are strictly required, but it is sometimes easier to just paste the entire json object in. Either way is fine. `name_server_set` is optional and requires special permission from your TAM at Google in order to setup (See [Name server sets](#name_server_sets) below) +**Note**: The `project_id`, `private_key`, and `client_email`, are the only fields that are strictly required, but it is sometimes easier to just paste the entire JSON object in. Either way is fine. `name_server_set` is optional and requires special permission from your TAM at Google in order to setup (See [Name server sets](#name_server_sets) below) See [the Activation section](#activation) for some tips on obtaining these credentials. diff --git a/docs/_providers/route53.md b/docs/_providers/route53.md index c098dbda0..1a7598472 100644 --- a/docs/_providers/route53.md +++ b/docs/_providers/route53.md @@ -189,7 +189,7 @@ More info is available in ```bash dnscontrol preview Creating r53 dns provider: NoCredentialProviders: no valid providers in chain. Deprecated. - For verbose messaging see aws.Config.CredentialsChainVerboseErrors + For verbose messaging see aws.Config.CredentialsChainVerboseErrors ``` This means that the creds.json entry isn't found. Either there is no entry, or the entry name doesn't match the first parameter in the `NewDnsProvider()` call. In the above example, note @@ -200,7 +200,7 @@ that the string `r53_main` is specified in `NewDnsProvider("r53_main")` and that ```bash dnscontrol preview Creating r53_main dns provider: InvalidClientTokenId: The security token included in the request is invalid. - status code: 403, request id: 8c006a24-e7df-11e7-9162-01963394e1df + status code: 403, request id: 8c006a24-e7df-11e7-9162-01963394e1df ``` This means the KeyId is unknown to AWS. @@ -210,7 +210,7 @@ This means the KeyId is unknown to AWS. ```bash dnscontrol preview Creating r53_main dns provider: SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. - status code: 403, request id: 9171d89a-e7df-11e7-8586-cbea3ea4e710 + status code: 403, request id: 9171d89a-e7df-11e7-8586-cbea3ea4e710 ``` This means the SecretKey is incorrect. It may be a quoting issue. diff --git a/docs/_providers/transip.md b/docs/_providers/transip.md index f87baeabc..813336cc1 100644 --- a/docs/_providers/transip.md +++ b/docs/_providers/transip.md @@ -18,7 +18,7 @@ Example: ```json { - "transip":{ + "transip": { "TYPE": "TRANSIP", "AccountName": "your-account-name" "PrivateKey": "-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUp\nwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5\n1s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQABAoGAFijko56+qGyN8M0RVyaRAXz++xTqHBLh\n3tx4VgMtrQ+WEgCjhoTwo23KMBAuJGSYnRmoBZM3lMfTKevIkAidPExvYCdm5dYq3XToLkkLv5L2\npIIVOFMDG+KESnAFV7l2c+cnzRMW0+b6f8mR1CJzZuxVLL6Q02fvLi55/mbSYxECQQDeAw6fiIQX\nGukBI4eMZZt4nscy2o12KyYner3VpoeE+Np2q+Z3pvAMd/aNzQ/W9WaI+NRfcxUJrmfPwIGm63il\nAkEAxCL5HQb2bQr4ByorcMWm/hEP2MZzROV73yF41hPsRC9m66KrheO9HPTJuo3/9s5p+sqGxOlF\nL0NDt4SkosjgGwJAFklyR1uZ/wPJjj611cdBcztlPdqoxssQGnh85BzCj/u3WqBpE2vjvyyvyI5k\nX6zk7S0ljKtt2jny2+00VsBerQJBAJGC1Mg5Oydo5NwD6BiROrPxGo2bpTbu/fhrT8ebHkTz2epl\nU9VQQSQzY1oZMVX8i1m5WUTLPz2yLJIBQVdXqhMCQBGoiuSoSjafUhV7i1cEGpb88h5NBYZzWXGZ\n37sJ5QsW+sJyoNde3xH8vdXhzU7eT82D6X/scw9RZz+/6rCJ4p0=\n-----END RSA PRIVATE KEY-----" diff --git a/docs/adding-new-rtypes.md b/docs/adding-new-rtypes.md index fd8c53811..6c5f47c82 100644 --- a/docs/adding-new-rtypes.md +++ b/docs/adding-new-rtypes.md @@ -102,7 +102,7 @@ The dnscontrol `-dev` flag ignores `pkg/js/static.go` and reads `pkg/js/helpers.js` directly. This is useful when debugging since it is one less step. -Likewise, if you are debugging helpers.js and you can't figure out why +Likewise, if you are debugging `helpers.js` and you can't figure out why your changes aren't making a difference, it usually means you aren't running `go generate` after any change, or using the `-dev` flag. diff --git a/docs/alias.md b/docs/alias.md index 0b657241c..cdcf420e0 100644 --- a/docs/alias.md +++ b/docs/alias.md @@ -16,7 +16,7 @@ A few notes: ```go func init() { - providers.RegisterDomainServiceProviderType("CLOUDFLAREAPI", newCloudflare, providers.CanUseAlias) + providers.RegisterDomainServiceProviderType("CLOUDFLAREAPI", newCloudflare, providers.CanUseAlias) } ``` diff --git a/docs/code-tricks.md b/docs/code-tricks.md index fc80f8248..3b9be722e 100644 --- a/docs/code-tricks.md +++ b/docs/code-tricks.md @@ -82,7 +82,7 @@ _.each( # Caveats about getting too fancy. -The dnsconfig.js language is JavaScript. On the plus side, this means +The `dnsconfig.js` language is JavaScript. On the plus side, this means you can use loops and variables and anything else you want. However, we don't recommend you get too fancy. diff --git a/docs/creds-json.md b/docs/creds-json.md index 1d0778a14..55c531e64 100644 --- a/docs/creds-json.md +++ b/docs/creds-json.md @@ -35,7 +35,7 @@ Here's a sample file: ## Format * Primary keys: (e.g. `cloudflare_tal`, `inside`, `hexonet`) - * ...refer to the first parameter in the `NewRegistrar()` or `NewDnsProvider()` functions in a dnsconfig.js file. + * ...refer to the first parameter in the `NewRegistrar()` or `NewDnsProvider()` functions in a `dnsconfig.js` file. * ...may include any printable character except colon (`:`) * Convention: all lower case, usually the name of the provider or the username at the provider or both. * Subkeys: (e.g. `apikey`, `apiuser` and etc.) diff --git a/docs/examples.md b/docs/examples.md index 7dfb7e6d7..b087e3e39 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -144,9 +144,9 @@ D('example3.com', REG, DnsProvider('R53'), DnsProvider('GCLOUD',0), ```js DEFAULTS( - NAMESERVER_TTL('24h'), - DefaultTTL('12h'), - CF_PROXY_DEFAULT_OFF + NAMESERVER_TTL('24h'), + DefaultTTL('12h'), + CF_PROXY_DEFAULT_OFF ); ``` # Advanced Examples diff --git a/docs/get-certs.md b/docs/get-certs.md index 94eb64d47..f35307c63 100644 --- a/docs/get-certs.md +++ b/docs/get-certs.md @@ -55,7 +55,7 @@ time. This file should be provided to specify which names you would like to get certificates for. You can specify any number of certificates, with up to 100 SAN entries each. Subject names can contain wildcards if you wish. -The format of the file is a simple json array of objects: +The format of the file is a simple JSON array of objects: ```json [ @@ -128,7 +128,7 @@ The working directory should generally contain: - `--acme {url}`: URL of the acme server you wish to use. For *Let's Encrypt* you can use the presets `live` or `staging` for the standard services. If you are using a custom boulder instance or other acme server, you may specify the full **directory** url. Must be an acme **v2** server. - `--renew {n}`: `get-certs` will renew certs with less than this many **days** remaining. The default is 15, and certs will be renewed when they are within 15 days of expiration. - `--dir {d}`: Root directory holding all certificate and account data as described above. Default is current working directory. -- `--certConfig {j}`: Location of certificate config json file as described above. Default is `./certs.json` +- `--certConfig {j}`: Location of certificate config JSON file as described above. Default is `./certs.json` - `--vault` Store certificates as secrets in hashicorp vault instead of on disk. (default: false) - `--vaultPath {value}` Path in vault to store certificates (default: "/secret/certs") - `--skip {p}`: DNS Provider names (comma separated) to skip using as challenge providers. We use this to avoid unnecessary changes to our backup or internal dns providers that wouldn't be a part of the validation flow. diff --git a/docs/index.md b/docs/index.md index 01b6e0df5..a7ff5a492 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,18 +4,18 @@ title: DNSControl ---
DNSControl is an opinionated platform for seamlessly managing your DNS configuration across any number of DNS hosts, both in the cloud or in your own infrastructure. It manages all of the domains for the Stack Overflow network, and can do the same for you!
-DNSControl is an opinionated platform for seamlessly managing your DNS configuration across any number of DNS hosts, both in the cloud or in your own infrastructure. It manages all of the domains for the Stack Overflow network, and can do the same for you!
+Want to jump right in? Follow our +
Want to jump right in? Follow our quick start tutorial on a new domain or migrate @@ -23,22 +23,22 @@ title: DNSControl language spec for more info. You can also view a list of all topics.
-Take advantage of the +
Take advantage of the advanced features. Use macros and variables for easier updates. Upload your zones to multiple DNS providers.
-Join our +
Join our mailing list. We make it easy to contribute by using GitHub, @@ -47,7 +47,7 @@ title: DNSControl newbie-friendly so jump right in!
-- Information for new users and the curious. -
++ Information for new users and the curious. +
-- DNSControl sub-commands and options. -
- -- Language resources and procedures. -
- -- Take advantage of DNSControl's unique features. -
-- It is easy to add features and new providers to DNSControl. The code is very modular and easy to modify. There are extensive integration tests that make it easy to boldly make changes with confidence that you'll know if anything is broken. Our mailing list is friendly. Afraid to make your first PR? We'll gladly mentor you through the process. Many major code contributions have come from first-time Go users! -
-+ DNSControl sub-commands and options. +
+ ++ Language resources and procedures. +
+ ++ Take advantage of DNSControl's unique features. +
++ It is easy to add features and new providers to DNSControl. The code is very modular and easy to modify. There are extensive integration tests that make it easy to boldly make changes with confidence that you'll know if anything is broken. Our mailing list is friendly. Afraid to make your first PR? We'll gladly mentor you through the process. Many major code contributions have come from first-time Go users! +
+