From f76acba7960605a6b8bd544ba8b1ecbc2ce82689 Mon Sep 17 00:00:00 2001 From: Paramtamtam <7326800+tarampampam@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:40:31 +0400 Subject: [PATCH] Make the repository for personal use only --- .github/PULL_REQUEST_TEMPLATE.md | 15 - .github/workflows/dependabot.yml | 25 - .../{deploy.yml => deploy-records.yml} | 8 +- .../{website.yml => deploy-sites.yml} | 14 +- .github/workflows/pr.yml | 44 - .github/workflows/tests.yml | 13 +- LICENSE | 21 - README.md | 144 +-- dnsconfig.js | 343 +------ domains.d.ts | 67 -- domains/abhirockz.is-an.app.js | 13 - domains/aviana.is-an.app.js | 12 - domains/azumi.is-an.app.js | 28 - domains/cat.is-an.app.js | 12 - domains/codedit.is-an.app.js | 12 - domains/devprofiles.is-an.app.js | 13 - domains/devtweet.is-an.app.js | 13 - domains/dishdiscovery.is-an.app.js | 13 - domains/domjs.1bt.uk.js | 12 - domains/flier.is-an.app.js | 12 - domains/genshincodelist.is-an.app.js | 36 - domains/geo.is-an.app.js | 13 - domains/gravity.is-an.app.js | 12 - domains/indexer.is-an.app.js | 13 - domains/linkkar.is-an.app.js | 12 - domains/lunaori.is-an.app.js | 13 - domains/medlexo.is-an.app.js | 13 - domains/morpion.is-an.app.js | 13 - domains/my-gpt.is-an.app.js | 13 - domains/nikudizer.is-an.app.js | 12 - domains/oop.is-an.app.js | 13 - domains/polyvpn.is-an.app.js | 12 - domains/postit.is-an.app.js | 12 - domains/qwertx.is-an.app.js | 13 - domains/rewards.is-an.app.js | 13 - domains/rua.is-an.app.js | 11 - domains/samyakgptui.is-an.app.js | 13 - domains/service/@.1bt.uk.js | 19 - domains/service/@.is-an.app.js | 26 - domains/service/_dmarc.1bt.uk.js | 13 - domains/service/_dmarc.is-an.app.js | 13 - domains/service/_domainkey.1bt.uk.js | 13 - domains/service/_domainkey.is-an.app.js | 13 - domains/service/www.1bt.uk.js | 16 - domains/service/www.is-an.app.js | 16 - domains/shredmod.is-an.app.js | 32 - domains/smp.is-an.app.js | 13 - domains/snapscript.is-an.app.js | 13 - domains/survival2d.is-an.app.js | 13 - domains/yt2mp3.is-an.app.js | 13 - domains/zatoga.is-an.app.js | 12 - domains/zeusgang.1bt.uk.js | 11 - {web => sites/is-an.app}/browserconfig.xml | 0 {web => sites/is-an.app}/favicon.ico | Bin .../favicon/android-chrome-144x144.png | Bin .../is-an.app}/favicon/apple-touch-icon.png | Bin .../is-an.app}/favicon/favicon-16x16.png | Bin .../is-an.app}/favicon/favicon-32x32.png | Bin .../is-an.app}/favicon/mstile-150x150.png | Bin .../is-an.app}/favicon/safari-pinned-tab.svg | 0 sites/is-an.app/index.html | 88 ++ {web => sites/is-an.app}/robots.txt | 0 sites/is-an.app/webmanifest.json | 14 + dnscontrol.d.ts => types-dnscontrol.d.ts | 954 +++++++++++------- web/index.html | 165 --- web/webmanifest.json | 14 - zones/1bt.uk.js | 20 + zones/is-an.app.js | 52 + 68 files changed, 815 insertions(+), 1799 deletions(-) delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/dependabot.yml rename .github/workflows/{deploy.yml => deploy-records.yml} (72%) rename .github/workflows/{website.yml => deploy-sites.yml} (61%) delete mode 100644 .github/workflows/pr.yml delete mode 100644 LICENSE delete mode 100644 domains.d.ts delete mode 100644 domains/abhirockz.is-an.app.js delete mode 100644 domains/aviana.is-an.app.js delete mode 100644 domains/azumi.is-an.app.js delete mode 100644 domains/cat.is-an.app.js delete mode 100644 domains/codedit.is-an.app.js delete mode 100644 domains/devprofiles.is-an.app.js delete mode 100644 domains/devtweet.is-an.app.js delete mode 100644 domains/dishdiscovery.is-an.app.js delete mode 100644 domains/domjs.1bt.uk.js delete mode 100644 domains/flier.is-an.app.js delete mode 100644 domains/genshincodelist.is-an.app.js delete mode 100644 domains/geo.is-an.app.js delete mode 100644 domains/gravity.is-an.app.js delete mode 100644 domains/indexer.is-an.app.js delete mode 100644 domains/linkkar.is-an.app.js delete mode 100644 domains/lunaori.is-an.app.js delete mode 100644 domains/medlexo.is-an.app.js delete mode 100644 domains/morpion.is-an.app.js delete mode 100644 domains/my-gpt.is-an.app.js delete mode 100644 domains/nikudizer.is-an.app.js delete mode 100644 domains/oop.is-an.app.js delete mode 100644 domains/polyvpn.is-an.app.js delete mode 100644 domains/postit.is-an.app.js delete mode 100644 domains/qwertx.is-an.app.js delete mode 100644 domains/rewards.is-an.app.js delete mode 100644 domains/rua.is-an.app.js delete mode 100644 domains/samyakgptui.is-an.app.js delete mode 100644 domains/service/@.1bt.uk.js delete mode 100644 domains/service/@.is-an.app.js delete mode 100644 domains/service/_dmarc.1bt.uk.js delete mode 100644 domains/service/_dmarc.is-an.app.js delete mode 100644 domains/service/_domainkey.1bt.uk.js delete mode 100644 domains/service/_domainkey.is-an.app.js delete mode 100644 domains/service/www.1bt.uk.js delete mode 100644 domains/service/www.is-an.app.js delete mode 100644 domains/shredmod.is-an.app.js delete mode 100644 domains/smp.is-an.app.js delete mode 100644 domains/snapscript.is-an.app.js delete mode 100644 domains/survival2d.is-an.app.js delete mode 100644 domains/yt2mp3.is-an.app.js delete mode 100644 domains/zatoga.is-an.app.js delete mode 100644 domains/zeusgang.1bt.uk.js rename {web => sites/is-an.app}/browserconfig.xml (100%) rename {web => sites/is-an.app}/favicon.ico (100%) rename {web => sites/is-an.app}/favicon/android-chrome-144x144.png (100%) rename {web => sites/is-an.app}/favicon/apple-touch-icon.png (100%) rename {web => sites/is-an.app}/favicon/favicon-16x16.png (100%) rename {web => sites/is-an.app}/favicon/favicon-32x32.png (100%) rename {web => sites/is-an.app}/favicon/mstile-150x150.png (100%) rename {web => sites/is-an.app}/favicon/safari-pinned-tab.svg (100%) create mode 100644 sites/is-an.app/index.html rename {web => sites/is-an.app}/robots.txt (100%) create mode 100644 sites/is-an.app/webmanifest.json rename dnscontrol.d.ts => types-dnscontrol.d.ts (82%) delete mode 100644 web/index.html delete mode 100644 web/webmanifest.json create mode 100644 zones/1bt.uk.js create mode 100644 zones/is-an.app.js diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 06fca63d..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,15 +0,0 @@ - - -### Link to Website - -Link: - ---- - -- [ ] Toggle this checkbox to re-run the stargazer checking diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml deleted file mode 100644 index 1a9f9cc5..00000000 --- a/.github/workflows/dependabot.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: dependabot - -on: - pull_request: {} - -permissions: - contents: write - pull-requests: write - -jobs: - dependabot: # https://tinyurl.com/e69djmen - runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} - steps: - - uses: dependabot/fetch-metadata@v2 - id: metadata - with: {github-token: "${{ secrets.GITHUB_TOKEN }}"} - - - name: Enable auto-merge for Dependabot PRs - if: ${{ contains(fromJSON('["version-update:semver-minor", "version-update:semver-patch"]'), steps.metadata.outputs.update-type) }} - run: gh pr merge --auto --merge "$PR_URL" - continue-on-error: true - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy-records.yml similarity index 72% rename from .github/workflows/deploy.yml rename to .github/workflows/deploy-records.yml index 09898cd9..ec860622 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy-records.yml @@ -1,10 +1,13 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions + name: 🚀 Deploy the DNS records on: workflow_dispatch: {} push: branches: [master, main] - paths: [domains/**, .github/workflows/deploy.yml] + paths: [zones/**, dnsconfig.js, .github/workflows/deploy-records.yml] concurrency: group: ${{ github.ref }}-deploy @@ -17,12 +20,9 @@ jobs: environment: production steps: - uses: actions/checkout@v4 - - uses: gacts/install-dnscontrol@v1 - - name: Create credentials file run: echo '{"cloudflare":{"TYPE":"CLOUDFLAREAPI","accountid":"$CF_ID","apitoken":"$CF_TOKEN"}}' > ./creds.json - - run: dnscontrol push env: CF_ID: ${{ secrets.CF_ACCOUNT_ID }} diff --git a/.github/workflows/website.yml b/.github/workflows/deploy-sites.yml similarity index 61% rename from .github/workflows/website.yml rename to .github/workflows/deploy-sites.yml index 25a5442f..6a1d69db 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/deploy-sites.yml @@ -1,17 +1,20 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions + name: 🚀 Deploy the website on: push: branches: [master, main] - paths: [web/**, .github/workflows/website.yml] + paths: [sites/**, .github/workflows/deploy-sites.yml] concurrency: group: ${{ github.ref }}-website cancel-in-progress: true jobs: - update: - name: 🖼 Deploy the website + is-an-app: + name: 🖼 Deploy the is-an.app website permissions: pages: write id-token: write @@ -21,10 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/configure-pages@v5 - - uses: actions/upload-pages-artifact@v3 - with: {path: web} - + with: {path: sites/is-an.app} - {uses: actions/deploy-pages@v1, id: deployment} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml deleted file mode 100644 index dad77342..00000000 --- a/.github/workflows/pr.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: 🎠 Pull Request - -on: - pull_request_target: - types: [opened, synchronize, reopened, ready_for_review, review_requested, edited] # https://bit.ly/3FEj9D4 - branches: [master, main] - -jobs: - check-user-star: - name: 🌟 Check the user's star - runs-on: ubuntu-latest - steps: - - {uses: gacts/is-stargazer@v1, with: {username: '${{ github.event.pull_request.user.login }}'}, id: check-star} - - - if: steps.check-star.outputs.is-stargazer != 'true' - uses: actions/github-script@v7 - with: - script: core.setFailed('⭐ Please, star this repository!') - - checklist: - name: 🗒 Message a checklist to the PR - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - steps: - - uses: thollander/actions-comment-pull-request@v2 - with: - message: | - Your PR has been created! Please now wait for a maintainer to approve it. - - > ### Made a mistake in the record? - > - > Don't worry, you can edit the changes in your repo and they should automatically be added to this PR. - - Please, make sure that your PR passes the following checklist: - - - ⭐ You have starred this repository - - 🗒 The file with your subdomain has a `.js` extension, well-formatted (indent size - 2 spaces) and **all comments** are removed - - 👤 There is sufficient information in the `owner` field - - 📋 You have clearly described a reason for the domain registration (and what you plan to use it for) in the PR description - - 🔗 The website is reachable and a link to it is in the PR description - - ✅ All CI checks are passed - comment_tag: ID:CHECKLIST diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b5d12fa7..6f4a56ed 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,3 +1,6 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions + name: 🧪 Tests on: @@ -5,9 +8,9 @@ on: push: branches: [master, main] tags-ignore: ['**'] - paths-ignore: ['**.md', 'web/**'] + paths-ignore: ['**.md', 'sites/**'] pull_request: - paths-ignore: ['**.md', 'web/**'] + paths-ignore: ['**.md', 'sites/**'] concurrency: group: ${{ github.ref }}-tests @@ -18,9 +21,7 @@ jobs: name: 🔐 GitLeaks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: {fetch-depth: 0} - + - {uses: actions/checkout@v4, with: {fetch-depth: 0}} - uses: gacts/gitleaks@v1 check: @@ -28,7 +29,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: gacts/install-dnscontrol@v1 - - run: dnscontrol check diff --git a/LICENSE b/LICENSE deleted file mode 100644 index e46ba3d4..00000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index 09cace75..e95c2691 100644 --- a/README.md +++ b/README.md @@ -1,143 +1,19 @@
- - - - -
-
[![Tests Status][badge-tests]][actions] [![Deploy Status][badge-deploy]][deploy] -![badge-domains] -
- -> **Due to numerous nonsensical domain requests since the creation of this repository, I have temporarily restricted interactions to previously contributed developers.** - -Free subdomains for personal sites, open-source projects, and more. Here is a list of supported domain names: - -| Domain name | Features | -|:-------------------------------------:|:---------------------------------------------------------:| -| ⚡ [`*.is-an.app`](https://is-an.app/) | ![cf][badge-cf] ![dnssec][badge-dnssec] ![ssl][badge-ssl] | -| ⚡ `*.1bt.uk` | ![cf][badge-cf] ![dnssec][badge-dnssec] | - -> Wildcards (like `*.foo.is-an.app`) are supported too, but the reason for their registration should be very -> clear and described in detail. Open an issue before the wildcard subdomain request with a clear description. - -[badge-cf]:https://shields.io/badge/%20-cloudflare-blue?logo=cloudflare&style=plastic?cacheSeconds=3600 -[badge-dnssec]:https://shields.io/badge/%20-DNSSEC-blue?logo=moleculer&logoColor=white&style=plastic?cacheSeconds=3600 -[badge-ssl]:https://shields.io/badge/SSL-Required-blue?style=plastic?cacheSeconds=3600 - -## Why? - -First of all, I want to answer one important question - "Why are you giving out domains for free?". Because sometimes -I need domains for my pet projects, and instead of buying new domains every time, I decided to buy one for everyone, -and use subdomains. And why not share them with the community? - -> Please, register domains only for **existing projects** - empty or misconfigured sites will be removed after some -> time (I do it manually, with notifications before the cleaning). - -## Domains settings - -| Option | `*.is-an.app` | `*.1bt.uk` | -|:--------------------------------------------------------------------------:|:-------------------------:|:-------------------------:| -| [DNSSEC][dnssec] | ✅ | ✅ | -| Email | ❌ | ❌ | -| SSL/TLS * | [Full][ssl-full] | [Flexible][ssl-flex] | -| Always Use HTTPS * | ✅ | ❌ | -| HTTP Strict Transport Security (HSTS) | ✅ | ❌ | -| Minimum TLS Version * | TLS 1.2 | TLS 1.2 | -| Opportunistic Encryption, TLS 1.3 * | ✅ | ✅ | -| WAF (Web Application Firewall) * | ✅ (Medium Security Level) | ✅ (Medium Security Level) | -| Browser Integrity Check * | ✅ | ✅ | -| [Caching Level][caching-levels], Browser Cache TTL * | Standard, 4 hours | Standard, 4 hours | -| [Crawler Hints][crawler-hints] * | ✅ | ✅ | -| [HTTP/2][http2], [HTTP/2 to Origin][http2-to-origin], HTTP/3 (with QUIC) * | ✅ | ✅ | -| [0-RTT Connection Resumption][0rtt] * | ✅ | ✅ | -| [gRPC][grpc], WebSockets * | ✅ | ✅ | -| [Pseudo IPv4][pseudo-ipv4] * | Add header | Add header | -| IP Geolocation (HTTP header `CF-IPCountry`) * | ✅ | ✅ | -| Maximum Upload Size * | 100 MB | 100 MB | - -> `*` Available only when proxying (`"proxy": true`) is enabled - -[dnssec]:https://developers.cloudflare.com/dns/additional-options/dnssec -[ssl-full]:https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes/full/ -[ssl-flex]:https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes/flexible/ -[caching-levels]:https://developers.cloudflare.com/cache/how-to/set-caching-levels -[crawler-hints]:https://blog.cloudflare.com/crawler-hints-how-cloudflare-is-reducing-the-environmental-impact-of-web-searches/ -[http2]:https://www.cloudflare.com/website-optimization/http2/what-is-http2/ -[http2-to-origin]:https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin -[0rtt]:https://developers.cloudflare.com/fundamentals/network/0-rtt-connection-resumption/ -[grpc]:https://support.cloudflare.com/hc/en-us/articles/360050483011 -[pseudo-ipv4]:https://support.cloudflare.com/hc/en-us/articles/229666767 -# How to get one? - -1. Make a PR to this repository (follow [this guide](https://github.com/firstcontributions/first-contributions) -if you don't know how to make a contributions) -2. Add a new file called `..js` (in lower case) in the `./domains` folder to -register `` subdomain -3. Edit it (below is just an **example**, provide a **valid** JS file with your needs): - -```javascript -// for more details watch the file `./domains.d.ts` - -addSubDomain({ - description: '...', // describe your project in this field - domain: '1bt.uk', // aka "root-domain". select between '1bt.uk' and 'is-an.app' - subdomain: 'foobar', // desired subdomain name - owner: { - repo: '', - email: '', - }, - record: { - CNAME: '', // e.g.: .github.io - TXT: ['list', 'of', 'required', 'txt', 'records'], - A: ['list', 'of', 'IPv4', 'addresses', 'like', 'a', '127.0.0.1'], - AAAA: ['list', 'of', 'IPv6', 'addresses', 'like', 'a', '::1'], - NS: ['list', 'of', 'nameservers'], - }, - //proxy: false, // disable Cloudflare proxy (with is enabled by default). In this case, your origin server - // should provide valid a SSL certificate and protection CF will be disabled - // nested: [{ // in addition, you may define the required nested subdomains - // subdomain: 'foo', - // record: { - // CNAME: '...', - // }, - // proxy: false, - // }, { - // subdomain: 'bar', - // record: { - // A: ['...'], - // }, - // proxy: true, - // }] -}) -``` - -4. Your pull request will be reviewed and merged. Please, don't ignore the PR checklist. If you ignore this -repository rules, your PR will be ignored too. _Make sure to keep an eye on it in case we need you to make any changes!_ -5. After the pull request is merged, please allow up to 24 hours for the changes to propagate _(usually, it -takes 5..15 minutes)_ -6. Enjoy your new domain! - -> Domains, used for illegal purposes will be removed and permanently banned. Please, provide a clear description of -> your resource in the PR. - -⚠ To validate the project domain, registered on the **Vercel** platform - please, provide full information about the -required verification records in the PR description or separate issue. I need to add them to the DNS zone manually. -A correct PR example can be found [here](https://github.com/tarampampam/free-domains/pull/300). - -## If you don't know... + -- What is GitHub pages and how to set up a custom domain, read the [docs here](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site) -- The difference between `A`, `CNAME`, and other record types, the article on Wikipedia [is here](https://en.wikipedia.org/wiki/List_of_DNS_record_types) +[badge-tests]:https://img.shields.io/github/actions/workflow/status/tarampampam/free-domains/tests.yml?branch=master&label=tests&logo=github +[badge-deploy]:https://img.shields.io/github/actions/workflow/status/tarampampam/free-domains/deploy.yml?branch=master&label=deploy&logo=github +[actions]:https://github.com/tarampampam/free-domains/actions +[deploy]:https://github.com/tarampampam/free-domains/actions/workflows/deploy.yml -> 🔍 A few similar services can be [found here](https://free-for.dev/#/?id=domain). +# DNS Configuration -[badge-tests]:https://img.shields.io/github/actions/workflow/status/tarampampam/free-domains/tests.yml?branch=master&label=tests&logo=github&style=for-the-badge -[badge-deploy]:https://img.shields.io/github/actions/workflow/status/tarampampam/free-domains/deploy.yml?branch=master&label=deploy&logo=github&style=for-the-badge -[badge-domains]:https://img.shields.io/github/directory-file-count/tarampampam/free-domains/domains?label=domains&style=for-the-badge&type=file +This repository contains DNS records for some of my domains, allowing me to manage them as code. -[actions]:https://github.com/tarampampam/free-domains/actions -[deploy]:https://github.com/tarampampam/free-domains/actions/workflows/deploy.yml +> [!NOTE] +> Previously, I was able to accept PRs with new records. However, due to numerous irrelevant domain +> requests, I have decided to close this option. diff --git a/dnsconfig.js b/dnsconfig.js index 51b315b9..bdf40715 100644 --- a/dnsconfig.js +++ b/dnsconfig.js @@ -1,341 +1,2 @@ -/** @type {ISubDomain[]} */ -var subDomains = [] - -var validate = new function () { - /** - * @param {*|string} domain - * @returns {boolean} - */ - this.domain = function (domain) { - return typeof domain === 'string' && (domain === '1bt.uk' || domain === 'is-an.app') - } - - /** - * @param {*|string} description - * @returns {boolean} - */ - this.description = function (description) { - return typeof description === 'string' && description.length > 4 - } - - /** - * @param {*|string} subDomain - * @returns {boolean} - */ - this.subDomain = function (subDomain) { - if (typeof subDomain !== 'string') { - return false - } - - if (subDomain.length < 2 && subDomain !== '@') { - return false - } - - if (subDomain.length > 63) { - return false - } - - return /([a-zA-Z0-9_*.-]{2,64}|@)$/.test(subDomain) !== false; - } - - /** - * @param {*|string} txt - * @returns {boolean} - */ - this.txt = function (txt) { - return typeof txt === 'string' && (txt.length > 0 && txt.length <= 255) - } - - /** - * @param {*|string} a - * @returns {boolean} - */ - this.a = function (a) { - return typeof a === 'string' && /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/.test(a) - } - - /** - * @param {*|string} aaaa - * @returns {boolean} - */ - this.aaaa = function (aaaa) { - return typeof aaaa === 'string' && /^([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}$/.test(aaaa) - } - - /** - * @param {*|string} cname - * @returns {boolean} - */ - this.cname = function (cname) { - return typeof cname === 'string' && /^[a-zA-Z0-9_./-]{2,}$/.test(cname) - } - - /** - * @param {*|string} ns - * @returns {boolean} - */ - this.ns = function (ns) { - return typeof ns === 'string' && /^[a-zA-Z0-9._-]{3,}$/.test(ns) - } -} - -/** - * Register a new subdomain. - * - * @param {ISubDomain} data - * @throws {Error} On invalid data - */ -function addSubDomain(data) { - if (typeof data !== 'object') { - throw new Error('Invalid subdomain data (must be an object)') - } - - // validate domain - if (!validate.domain(data.domain)) { - throw new Error('Invalid domain name: "' + data.domain + '"') - } - - // validate description - if (!validate.description(data.description)) { - throw new Error('Invalid subdomain description: "' + data.description + '"') - } - - // validate subdomain - if (!validate.subDomain(data.subdomain)) { - throw new Error('Invalid subdomain name: "' + data.subdomain + '"') - } - - data.subdomain = data.subdomain.toLowerCase().trim() // normalize - - var subdomainsBlacklist = [ - "*", "a11y", "about", "account", "accounts", "ad", "ads", "admin", "admins", "answer", "answers", "apis", "app", - "apps", "archive", "archives", "array", "arrays", "asm", "async", "awesome", "backup", "backups", "base", "basic", - "basics", "blogs", "book", "books", "bot", "bots", "browser", "browsers", "bug", "bugs", "build", "builds", - "business", "career", "cdn", "center", "chat", "chats", "client", "clients", "cloud", "code", "company", "console", - "contact", "contacts", "cookie", "cookies", "copyright", "copyrights", "core", "css", "data", "db", "ddns", "deal", - "debug", "demo", "demos", "dev", "devs", "develop", "developer", "developers", "dir", "dirs", "dns", "domain", - "domains", "donate", "dyn", "ecma", "editor", "email", "emails", "es2015", "faq", "faqs", "feed", "file", "find", - "free", "front", "ftp", "function", "functions", "fund", "funds", "game", "games", "get", "git", "global", - "globals", "group", "groups", "headquarter", "help", "home", "homepage", "host", "hq", "html", "i18n", "imap", - "index", "info", "io", "js", "json", "l10n", "legal", "legals", "libraries", "lib", "license", "licenses", "like", - "link", "live", "log", "logs", "login", "logo", "logos", "logout", "loop", "love", "mail", "main", "map", "maps", - "market", "master", "media", "meet", "member", "members", "mobile", "mobiles", "mx", "my", "native", "net", - "network", "now", "ns", "ns1", "ns2", "online", "open", "orig", "origin", "page", "pages", "password", "passwords", - "permalink", "permalinks", "plain", "pop3", "portal", "portals", "pub", "pubs", "raw", "readme", "regex", - "register", "registration", "remote", "rest", "root", "roots", "rss", "run", "script", "scripts", "secure", "serv", - "server", "servers", "service", "services", "shop", "shops", "site", "sites", "smtp", "socket", "source", - "sources", "ssh", "standard", "standards", "store", "stores", "sub", "subs", "subdomain", "subdomains", - "subscribe", "support", "sync", "system", "systems", "tag", "tags", "team", "teams", "tech", "terminal", "test", - "this", "that", "tip", "tool", "tools", "topic", "topics", "translate", "trend", "trends", "trick", "tricks", - "trust", "trusted", "tutorial", "tutorials", "tweak", "tweaks", "type", "types", "unit", "units", "united", - "unsubscribe", "uri", "uris", "url", "urls", "user", "users", "util", "utils", "utility", "validate", "var", - "vars", "virtual", "vpn", "vps", "wasm", "watch", "web", "webmail", "webmaster", "world", "ww", "ww1", "ww2", - "ww3", "www1", "www2", "www3", "xml", - ] - - for (var i = 0; i < subdomainsBlacklist.length; i++) { - if (data.subdomain === subdomainsBlacklist[i]) { - throw new Error('Denied subdomain name: "' + data.subdomain + '"') - } - } - - // validate owner - if (typeof data.owner === 'object') { - if (data.owner.repo !== undefined && typeof data.owner.repo !== 'string') { - throw new Error('Invalid owner repo property (must be a string)') - } - - if (data.owner.email !== undefined && typeof data.owner.email !== 'string') { - throw new Error('Invalid owner email property (must be a string)') - } - } - - if (typeof data.proxy !== 'boolean') { - data.proxy = true // enabled by default - } - - // validate record - if (typeof data.record !== 'object') { - throw new Error('Invalid subdomain "record" property (must be an object)') - } else { - if (Array.isArray(data.record.TXT)) { - if (!data.record.TXT.every(validate.txt)) { - throw new Error('TXT records must be an array of non-empty strings') - } - } - - if (Array.isArray(data.record.A)) { - if (!data.record.A.every(validate.a)) { - throw new Error('A records must be an array of valid IPv4 addresses') - } - } - - if (Array.isArray(data.record.AAAA)) { - if (!data.record.AAAA.every(validate.aaaa)) { - throw new Error('AAAA records must be an array of valid IPv6 addresses') - } - } - - if (typeof data.record.CNAME === 'string') { - if (!validate.cname(data.record.CNAME)) { - throw new Error('Invalid CNAME record: "' + data.record.CNAME + '"') - } else { - data.record.CNAME = data.record.CNAME.toLowerCase().replace(/\.+$/, '') + '.' // normalize and add trailing dot - } - } - - if (Array.isArray(data.record.NS)) { - if ( - typeof data.record.A !== 'undefined' || - typeof data.record.AAAA !== 'undefined' || - typeof data.record.CNAME !== 'undefined' - ) { - throw new Error('NS records cannot be used with A, AAAA or CNAME records') - } - - if (!data.record.NS.every(validate.ns)) { - throw new Error('NS records must be an array of valid domain names') - } else { - data.record.NS = data.record.NS.map(function (ns) { - return ns.toLowerCase().replace(/\.+$/, '') + '.' // normalize and add trailing dot - }) - } - } - } - - // validate nested subdomains - if (Array.isArray(data.nested)) { - for (var i = 0; i < data.nested.length; i++) { - if (!validate.subDomain(data.nested[i].subdomain)) { - throw new Error('Invalid nested subdomain name: "' + data.nested[i].subdomain + '"') - } - - data.nested[i].subdomain = data.nested[i].subdomain.toLowerCase().trim() // normalize - - if (typeof data.nested[i].proxy !== 'boolean') { - data.nested[i].proxy = true // enabled by default - } - - if (Array.isArray(data.nested[i].record.TXT)) { - if (!data.nested[i].record.TXT.every(validate.txt)) { - throw new Error('TXT records must be an array of non-empty strings') - } - } - - if (Array.isArray(data.nested[i].record.A)) { - if (!data.nested[i].record.A.every(validate.a)) { - throw new Error('A records must be an array of valid IPv4 addresses') - } - } - - if (Array.isArray(data.nested[i].record.AAAA)) { - if (!data.nested[i].record.AAAA.every(validate.aaaa)) { - throw new Error('AAAA records must be an array of valid IPv6 addresses') - } - } - - if (typeof data.nested[i].record.CNAME === 'string') { - if (!validate.cname(data.nested[i].record.CNAME)) { - throw new Error('Invalid CNAME record: "' + data.nested[i].record.CNAME + '"') - } else { - data.nested[i].record.CNAME = data.nested[i].record.CNAME.toLowerCase().replace(/\.+$/, '') + '.' // normalize and add trailing dot - } - } - - if (Array.isArray(data.nested[i].record.NS)) { - if (!data.nested[i].record.NS.every(validate.ns)) { - throw new Error('NS records must be an array of valid domain names') - } else { - data.nested[i].record.NS = data.nested[i].record.NS.map(function (ns) { - return ns.toLowerCase().replace(/\.+$/, '') + '.' // normalize and add trailing dot - }) - } - } - } - } - - subDomains.push(data) -} - -require_glob('./domains/', true) - -/** @type {Object.} */ -var commit = {} - -subDomains.forEach(function (subDomain) { - if (commit[subDomain.domain] === undefined) { // initialize domain - commit[subDomain.domain] = [] - } - - var proxy = subDomain.proxy ? CF_PROXY_ON : CF_PROXY_OFF - - if (subDomain.record.TXT) { - subDomain.record.TXT.forEach(function (txt) { - commit[subDomain.domain].push(TXT(subDomain.subdomain, txt)) - }) - } - - if (subDomain.record.A) { - subDomain.record.A.forEach(function (a) { - commit[subDomain.domain].push(A(subDomain.subdomain, IP(a), proxy)) - }) - } - - if (subDomain.record.AAAA) { - subDomain.record.AAAA.forEach(function (aaaa) { - commit[subDomain.domain].push(AAAA(subDomain.subdomain, aaaa, proxy)) - }) - } - - if (subDomain.record.CNAME) { - commit[subDomain.domain].push(CNAME(subDomain.subdomain, subDomain.record.CNAME, proxy)) - } - - if (subDomain.record.NS) { - subDomain.record.NS.forEach(function (ns) { - commit[subDomain.domain].push(NS(subDomain.subdomain, ns)) - }) - } - - if (subDomain.nested) { - subDomain.nested.forEach(function (nested) { - var nestedSubdomain = [nested.subdomain, subDomain.subdomain].join('.') - var nestedProxy = nested.proxy ? CF_PROXY_ON : CF_PROXY_OFF - - if (nested.record.TXT) { - nested.record.TXT.forEach(function (txt) { - commit[subDomain.domain].push(TXT(nestedSubdomain, txt)) - }) - } - - if (nested.record.A) { - nested.record.A.forEach(function (a) { - commit[subDomain.domain].push(A(nestedSubdomain, IP(a), nestedProxy)) - }) - } - - if (nested.record.AAAA) { - nested.record.AAAA.forEach(function (aaaa) { - commit[subDomain.domain].push(AAAA(nestedSubdomain, aaaa, nestedProxy)) - }) - } - - if (nested.record.CNAME) { - commit[subDomain.domain].push(CNAME(nestedSubdomain, nested.record.CNAME, nestedProxy)) - } - - if (nested.record.NS) { - nested.record.NS.forEach(function (ns) { - commit[subDomain.domain].push(NS(nestedSubdomain, ns)) - }) - } - }) - } -}) - -var reg = NewRegistrar('none') -var provider = DnsProvider(NewDnsProvider('cloudflare')) - -for (var domainName in commit) { - D(domainName, reg, provider, commit[domainName]) -} +require("./zones/is-an.app.js") +require("./zones/1bt.uk.js") diff --git a/domains.d.ts b/domains.d.ts deleted file mode 100644 index b74bd157..00000000 --- a/domains.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * DNS record configuration. - */ -interface IRecord { - /** - * Originally for arbitrary human-readable text in a DNS record. Since the early 1990s, however, this record more - * often carries machine-readable data, such as specified by RFC 1464, opportunistic encryption, Sender Policy - * Framework, DKIM, DMARC, DNS-SD, etc. - */ - TXT?: string[] - - /** - * Returns a 32-bit IPv4 address, most commonly used to map hostnames to an IP address of the host, but it is also - * used for DNSBLs, storing subnet masks in RFC 1101, etc. - */ - A?: string[] - - /** Returns a 128-bit IPv6 address, most commonly used to map hostnames to an IP address of the host. */ - AAAA?: string[] - - /** Alias of one name to another: the DNS lookup will continue by retrying the lookup with the new name. */ - CNAME?: string - - /** Delegates a DNS zone to use the given authoritative name servers. */ - NS?: string[] -} - -/** - * Subdomain configuration. - */ -interface ISubDomain { - /** Describe your project in this field. */ - description: string - - /** Select the required root domain. */ - domain: '1bt.uk' | 'is-an.app' - - /** The subdomain you want to use (e.g.: "foo" means "foo.example.com"). */ - subdomain: string - - /** Subdomain owner information. */ - owner?: { - /** URL to the repository where project source code is located. */ - repo?: string - - /** Email address (for example, for sending notifications in future). */ - email?: string - } - - /** DNS record configuration. */ - record: IRecord - - /** Enable Cloudflare proxy for this subdomain or not. */ - proxy?: boolean - - /** Nested subdomains configuration. */ - nested?: { - /** The nested subdomain name (e.g.: "bar" means "bar.foo.example.com"). */ - subdomain: string - - /** Nested subdomain DNS record configuration. */ - record: IRecord - - /** Enable Cloudflare proxy for this subdomain or not. */ - proxy?: boolean - }[] -} diff --git a/domains/abhirockz.is-an.app.js b/domains/abhirockz.is-an.app.js deleted file mode 100644 index 7d89220f..00000000 --- a/domains/abhirockz.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'College project', - domain: 'is-an.app', - subdomain: 'abhirockz', - owner: { - repo: 'https://github.com/yopremium21/abhirockz', - email: 'yopremium21@gmail.com', - }, - record: { - CNAME: 'yopremium21.github.io', - }, - proxy: false, -}) diff --git a/domains/aviana.is-an.app.js b/domains/aviana.is-an.app.js deleted file mode 100644 index 0794f695..00000000 --- a/domains/aviana.is-an.app.js +++ /dev/null @@ -1,12 +0,0 @@ -addSubDomain({ - description: 'A website for my discord bot', - domain: 'is-an.app', - subdomain: 'aviana', - owner: { - email: 'contact@exylium.tk', - }, - record: { - CNAME: 'cname.vercel-dns.com' - }, - proxy: false -}); diff --git a/domains/azumi.is-an.app.js b/domains/azumi.is-an.app.js deleted file mode 100644 index 7a0b2dcf..00000000 --- a/domains/azumi.is-an.app.js +++ /dev/null @@ -1,28 +0,0 @@ -addSubDomain({ - description: 'Personal site for personal projects', - domain: 'is-an.app', - subdomain: 'azumi', - owner: { - repo: 'https://github.com/Azumi-Development/Azumi-Development.github.io/', - email: 'AquaQuokka@outlook.com', - }, - record: { - CNAME: 'azumi-development.github.io', - }, - nested: [ - { - subdomain: 'docs', - record: { - CNAME: 'azumidocs.github.io', - }, - proxy: false, - }, - { - subdomain: 'blog', - record: { - CNAME: 'hashnode.network', - }, - proxy: false, - }, - ], -}) diff --git a/domains/cat.is-an.app.js b/domains/cat.is-an.app.js deleted file mode 100644 index c57cac4d..00000000 --- a/domains/cat.is-an.app.js +++ /dev/null @@ -1,12 +0,0 @@ -addSubDomain({ - description: 'A website for my vercel bot', - domain: 'is-an.app', - subdomain: 'cat', - owner: { - email: 'wqwdrrovb@mozmail.com', - }, - record: { - CNAME: 'cname.vercel-dns.com' - }, - proxy: false -}) diff --git a/domains/codedit.is-an.app.js b/domains/codedit.is-an.app.js deleted file mode 100644 index d2368257..00000000 --- a/domains/codedit.is-an.app.js +++ /dev/null @@ -1,12 +0,0 @@ -addSubDomain({ - description: 'CodedIt WebContainers', - domain: 'is-an.app', - subdomain: 'codedit', - owner: { - repo: 'https://github.com/SX-9/codedit-web', - email: 'sx-91@outlook.com', - }, - record: { - CNAME: 'cname.vercel-dns.com', - }, -}); diff --git a/domains/devprofiles.is-an.app.js b/domains/devprofiles.is-an.app.js deleted file mode 100644 index abd8cf0c..00000000 --- a/domains/devprofiles.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'list of devevlopers profiles', - domain: 'is-an.app', - subdomain: 'devprofiles', - owner: { - email: 'oyepriyansh@hotmail.com', - repo: 'https://github.com/oyepriyansh/DevProfiles', - }, - record: { - CNAME: 'cname.vercel-dns.com' - }, - proxy: false -}); diff --git a/domains/devtweet.is-an.app.js b/domains/devtweet.is-an.app.js deleted file mode 100644 index e65d0cb3..00000000 --- a/domains/devtweet.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'A microblogging web app', - domain: 'is-an.app', - subdomain: 'devtweet', - owner: { - email: 'oyepriyansh@hotmail.com', - repo: 'https://github.com/oyepriyansh/DevTweet', - }, - record: { - CNAME: 'cname.vercel-dns.com' - }, - proxy: false -}); diff --git a/domains/dishdiscovery.is-an.app.js b/domains/dishdiscovery.is-an.app.js deleted file mode 100644 index 1e62e03d..00000000 --- a/domains/dishdiscovery.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'A recipe sharing app', - domain: 'is-an.app', - subdomain: 'dishdiscovery', - owner: { - email: 'notnotrachit@gmail.com', - twitter: '@notnotrachit' - }, - record: { - CNAME: 'cname.vercel-dns.com' - }, - proxy: false -}); diff --git a/domains/domjs.1bt.uk.js b/domains/domjs.1bt.uk.js deleted file mode 100644 index 8d6a8f2f..00000000 --- a/domains/domjs.1bt.uk.js +++ /dev/null @@ -1,12 +0,0 @@ -addSubDomain({ - description: 'DOM Manipulation Simplified', - domain: '1bt.uk', - subdomain: 'domjs', - owner: { - repo: 'https://github.com/SX-9/dom.js', - email: 'sx-91@outlook.com', - }, - record: { - CNAME: 'sx-9.github.io', - }, -}); diff --git a/domains/flier.is-an.app.js b/domains/flier.is-an.app.js deleted file mode 100644 index eb5f0927..00000000 --- a/domains/flier.is-an.app.js +++ /dev/null @@ -1,12 +0,0 @@ -addSubDomain({ - description: 'A website for my vercel app', - domain: 'is-an.app', - subdomain: 'flier', - owner: { - email: 'lxf198961@yeah.net', - }, - record: { - CNAME: 'cname-china.vercel-dns.com' - }, - proxy: false - }); \ No newline at end of file diff --git a/domains/genshincodelist.is-an.app.js b/domains/genshincodelist.is-an.app.js deleted file mode 100644 index 3f611330..00000000 --- a/domains/genshincodelist.is-an.app.js +++ /dev/null @@ -1,36 +0,0 @@ -addSubDomain({ - description: 'mainpage for my api', - domain: 'is-an.app', - subdomain: 'genshincodelist', - owner: { - repo: 'https://github.com/gamersindo1223/mainpage-genshincodelist', - email: 'mrgamers11223@gmail.com', - }, - record: { - CNAME: 'naughty-goat-slacks.cyclic.app', - }, - proxy: false, - nested: [ - { - subdomain: '_075a4c48096f10794b57ce7389fa9ccf', - record: { - CNAME: '_9019eb834c94e142316892786d75c686.pmgvbzmzyk.acm-validations.aws', - }, - proxy: false, - }, - { - subdomain: 'api', - record: { - CNAME: 'lime-average-parrot.cyclic.app', - }, - proxy: false, - }, - { - subdomain: '_a030c2aa8e930ddd1bcc689bf2c7e414.api', - record: { - CNAME: '_1ab961f86c492f6defeec4e182057671.pmgvbzmzyk.acm-validations.aws', - }, - proxy: false, - }, - ], -}) diff --git a/domains/geo.is-an.app.js b/domains/geo.is-an.app.js deleted file mode 100644 index c46cc6cb..00000000 --- a/domains/geo.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'Geopad is a notepad for mobile phone users and web users', - domain: 'is-an.app', - subdomain: 'geo', - owner: { - repo: 'https://github.com/gopirathod/geo', - email: 'oppsomo@gmail.com', - }, - record: { - CNAME: 'gopirathod.github.io', - }, - proxy: false, -}) diff --git a/domains/gravity.is-an.app.js b/domains/gravity.is-an.app.js deleted file mode 100644 index ee413e9b..00000000 --- a/domains/gravity.is-an.app.js +++ /dev/null @@ -1,12 +0,0 @@ -addSubDomain({ - description: 'A website to generate code screenshots', - domain: 'is-an.app', - subdomain: 'gravity', - owner: { - email: 'hariskumar.eth@gmail.com', - }, - record: { - CNAME: 'cname.vercel-dns.com', - }, - - }) \ No newline at end of file diff --git a/domains/indexer.is-an.app.js b/domains/indexer.is-an.app.js deleted file mode 100644 index c218f7b9..00000000 --- a/domains/indexer.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'A Simple Website Indexer', - domain: 'is-an.app', - subdomain: 'indexer', - owner: { - repo: 'https://github.com/OshekharO/Web-Indexer', - email: 'omeepd009@gmail.com', - }, - record: { - CNAME: 'oshekharo.github.io', - }, - proxy: false, -}) diff --git a/domains/linkkar.is-an.app.js b/domains/linkkar.is-an.app.js deleted file mode 100644 index e62d372e..00000000 --- a/domains/linkkar.is-an.app.js +++ /dev/null @@ -1,12 +0,0 @@ -addSubDomain({ - description: 'An App to create short links with added preview changes and easy analytics.', // describe your project in this field - domain: 'is-an.app', // aka "root-domain". select between '1bt.uk' and 'is-an.app' - subdomain: 'linkkar', // desired subdomain name - owner: { - repo: 'https://github.com/Sammy970/linkkar-FrontEnd', - email: 'jainsamyak2002.sj@gmail.com', - }, - record: { - CNAME: 'cname.vercel-dns.com' - } -}) diff --git a/domains/lunaori.is-an.app.js b/domains/lunaori.is-an.app.js deleted file mode 100644 index 274da21f..00000000 --- a/domains/lunaori.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: "Lunaori is an app by a weeb developer for weeb developers", - domain: "is-an.app", - subdomain: "lunaori", - owner: { - repo: "", - email: "orekidev@gmail.com", - }, - record: { - CNAME: "app-220.pages.dev", - }, - proxy: false, -}); diff --git a/domains/medlexo.is-an.app.js b/domains/medlexo.is-an.app.js deleted file mode 100644 index 2e1a1f3c..00000000 --- a/domains/medlexo.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'Free video toolbox for videographer or video editor', - domain: 'is-an.app', - subdomain: 'medlexo', - owner: { - email: 'medlexopm@gmail.com', - }, - record: { - A: [ - '185.27.134.137', - ], - }, -}) diff --git a/domains/morpion.is-an.app.js b/domains/morpion.is-an.app.js deleted file mode 100644 index 2be63fad..00000000 --- a/domains/morpion.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'A funny game !', - domain: 'is-an.app', - subdomain: 'morpion', - owner: { - repo: 'https://github.com/Nonolanlan1007/morpion', - email: 'nolhan.dev@gmail.com', - }, - record: { - CNAME: 'nonolanlan1007.github.io', - }, - proxy: false, -}) diff --git a/domains/my-gpt.is-an.app.js b/domains/my-gpt.is-an.app.js deleted file mode 100644 index 61abbb60..00000000 --- a/domains/my-gpt.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'A GPT Client that lets you consume GPT Models using your Personal OpenAI Key', - domain: 'is-an.app', - subdomain: 'my-gpt', - owner: { - repo: 'https://github.com/h1zqeel/my-gpt', - email: 'hizqeeljaved2013@gmail.com', - }, - record: { - CNAME: 'cname.vercel-dns.com' - }, - proxy: true, -}) diff --git a/domains/nikudizer.is-an.app.js b/domains/nikudizer.is-an.app.js deleted file mode 100644 index 450f6748..00000000 --- a/domains/nikudizer.is-an.app.js +++ /dev/null @@ -1,12 +0,0 @@ -addSubDomain({ - description: 'Nikudizer - simple app for hebrew learners', - domain: 'is-an.app', - subdomain: 'nikudizer', - owner: { - repo: 'https://github.com/fabiusBile/hebrew-nikudizer', - email: 'fabiusbile@icloud.com', - }, - record: { - CNAME: 'fabiusbile.github.io', - }, -}) diff --git a/domains/oop.is-an.app.js b/domains/oop.is-an.app.js deleted file mode 100644 index 3b714d4d..00000000 --- a/domains/oop.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'Short name hosting for oop classes demo projects', - domain: 'is-an.app', - subdomain: 'oop', - owner: { - repo: 'http://vsa-jino.my.to:49272/pi20/ooya.ga', - email: 'sergeyverevkin@gmail.com', - }, - record: { - CNAME: 'sergeyverevkin.github.io', - }, - proxy: false, -}) diff --git a/domains/polyvpn.is-an.app.js b/domains/polyvpn.is-an.app.js deleted file mode 100644 index 417c4968..00000000 --- a/domains/polyvpn.is-an.app.js +++ /dev/null @@ -1,12 +0,0 @@ -addSubDomain({ - description: 'VPN Project', - domain: 'is-an.app', - subdomain: 'polyvpn', - owner: { - email: 'polyanthi_pumicing@aleeas.com', // if needed discord contact, https://discord.gg/ux4Dkerw2h or 'polyanthi' on discord - }, - record: { - NS: ['ns1.hostry.com', 'ns2.hostry.com', 'ns3.hostry.com', 'ns4.hostry.com'], - }, - proxy: false, -}) diff --git a/domains/postit.is-an.app.js b/domains/postit.is-an.app.js deleted file mode 100644 index bac450b3..00000000 --- a/domains/postit.is-an.app.js +++ /dev/null @@ -1,12 +0,0 @@ -addSubDomain({ - description: 'An App to create simple, beautiful, smart and professional posts for LinkedIn, powered by OpenAI API.', // describe your project in this field - domain: 'is-an.app', // aka "root-domain". select between '1bt.uk' and 'is-an.app' - subdomain: 'postit', // desired subdomain name - owner: { - repo: 'https://github.com/Sammy970/linkedin-post-maker', - email: 'jainsamyak2002.sj@gmail.com', - }, - record: { - CNAME: 'cname.vercel-dns.com' - } -}) diff --git a/domains/qwertx.is-an.app.js b/domains/qwertx.is-an.app.js deleted file mode 100644 index 43868603..00000000 --- a/domains/qwertx.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'My personal site and other stuff', - domain: 'is-an.app', - subdomain: 'qwertx', - owner: { - repo: 'https://github.com/NotQWertz/NotQWertz.github.io', - email: 'zuweyrh752@gmail.com', - }, - record: { - CNAME: 'notqwertz.github.io', - }, - proxy: false, -}) diff --git a/domains/rewards.is-an.app.js b/domains/rewards.is-an.app.js deleted file mode 100644 index 3b34c355..00000000 --- a/domains/rewards.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'A website to collect rewards points easily.', - domain: 'is-an.app', - subdomain: 'rewards', - owner: { - repo: 'https://github.com/legendsayantan/rewards-website', - email: 'legendsayantan@gmail.com', - }, - record: { - CNAME: 'legendsayantan.github.io', - }, - proxy: false, -}) diff --git a/domains/rua.is-an.app.js b/domains/rua.is-an.app.js deleted file mode 100644 index c2c41336..00000000 --- a/domains/rua.is-an.app.js +++ /dev/null @@ -1,11 +0,0 @@ -addSubDomain({ - domain: 'is-an.app', - subdomain: 'rua', - description: 'Browser extension Random User-Agent homepage', - owner: { - repo: 'https://github.com/tarampampam/random-user-agent', - }, - record: { - CNAME: 'tarampampam.github.io', - }, -}) diff --git a/domains/samyakgptui.is-an.app.js b/domains/samyakgptui.is-an.app.js deleted file mode 100644 index 6c2e51d7..00000000 --- a/domains/samyakgptui.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'A ChatBOT with clean UI for interacting with various different GPT models at different EndPoints.', // describe your project in this field - domain: 'is-an.app', // aka "root-domain". select between '1bt.uk' and 'is-an.app' - subdomain: 'samyakgptui', // desired subdomain name - owner: { - repo: 'https://github.com/Sammy970/SamyakGPTUI', - email: 'jainsamyak2002.sj@gmail.com', - }, - record: { - CNAME: 'cname.vercel-dns.com' - } -}) - diff --git a/domains/service/@.1bt.uk.js b/domains/service/@.1bt.uk.js deleted file mode 100644 index 70f0b0f4..00000000 --- a/domains/service/@.1bt.uk.js +++ /dev/null @@ -1,19 +0,0 @@ -addSubDomain({ - description: 'Root domain', - domain: '1bt.uk', - subdomain: '@', - owner: { - repo: 'https://github.com/tarampampam/free-domains', - }, - record: { - TXT: [ - 'v=spf1 -all', - ], - A: [ - '192.0.2.1', - ], - AAAA: [ - '100::', - ], - }, -}) diff --git a/domains/service/@.is-an.app.js b/domains/service/@.is-an.app.js deleted file mode 100644 index 17baabce..00000000 --- a/domains/service/@.is-an.app.js +++ /dev/null @@ -1,26 +0,0 @@ -addSubDomain({ - description: 'Root domain', - domain: 'is-an.app', - subdomain: '@', - owner: { - repo: 'https://github.com/tarampampam/free-domains', - }, - record: { - TXT: [ - 'v=spf1 -all', - ], - A: [ - '185.199.108.153', - '185.199.109.153', - '185.199.110.153', - '185.199.111.153', - ], - AAAA: [ - '2606:50c0:8000::153', - '2606:50c0:8001::153', - '2606:50c0:8002::153', - '2606:50c0:8003::153', - ], - }, - proxy: false, -}) diff --git a/domains/service/_dmarc.1bt.uk.js b/domains/service/_dmarc.1bt.uk.js deleted file mode 100644 index d386cf81..00000000 --- a/domains/service/_dmarc.1bt.uk.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'DMARC record', - domain: '1bt.uk', - subdomain: '_dmarc', - owner: { - repo: 'https://github.com/tarampampam/free-domains', - }, - record: { - TXT: [ - 'v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s;', - ], - }, -}) diff --git a/domains/service/_dmarc.is-an.app.js b/domains/service/_dmarc.is-an.app.js deleted file mode 100644 index 98065ec5..00000000 --- a/domains/service/_dmarc.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'DMARC record', - domain: 'is-an.app', - subdomain: '_dmarc', - owner: { - repo: 'https://github.com/tarampampam/free-domains', - }, - record: { - TXT: [ - 'v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s;', - ], - }, -}) diff --git a/domains/service/_domainkey.1bt.uk.js b/domains/service/_domainkey.1bt.uk.js deleted file mode 100644 index 8debfe2c..00000000 --- a/domains/service/_domainkey.1bt.uk.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'DKIM record', - domain: '1bt.uk', - subdomain: '*._domainkey', - owner: { - repo: 'https://github.com/tarampampam/free-domains', - }, - record: { - TXT: [ - 'v=DKIM1; p=', - ], - }, -}) diff --git a/domains/service/_domainkey.is-an.app.js b/domains/service/_domainkey.is-an.app.js deleted file mode 100644 index 7bada192..00000000 --- a/domains/service/_domainkey.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'DKIM record', - domain: 'is-an.app', - subdomain: '*._domainkey', - owner: { - repo: 'https://github.com/tarampampam/free-domains', - }, - record: { - TXT: [ - 'v=DKIM1; p=', - ], - }, -}) diff --git a/domains/service/www.1bt.uk.js b/domains/service/www.1bt.uk.js deleted file mode 100644 index be94b4e2..00000000 --- a/domains/service/www.1bt.uk.js +++ /dev/null @@ -1,16 +0,0 @@ -addSubDomain({ - description: 'www subdomain', - domain: '1bt.uk', - subdomain: 'www', - owner: { - repo: 'https://github.com/tarampampam/free-domains', - }, - record: { - A: [ - '192.0.2.1', - ], - AAAA: [ - '100::', - ], - }, -}) diff --git a/domains/service/www.is-an.app.js b/domains/service/www.is-an.app.js deleted file mode 100644 index c11fbaa6..00000000 --- a/domains/service/www.is-an.app.js +++ /dev/null @@ -1,16 +0,0 @@ -addSubDomain({ - description: 'www subdomain', - domain: 'is-an.app', - subdomain: 'www', - owner: { - repo: 'https://github.com/tarampampam/free-domains', - }, - record: { - A: [ - '192.0.2.1', - ], - AAAA: [ - '100::', - ], - }, -}) diff --git a/domains/shredmod.is-an.app.js b/domains/shredmod.is-an.app.js deleted file mode 100644 index 6c504466..00000000 --- a/domains/shredmod.is-an.app.js +++ /dev/null @@ -1,32 +0,0 @@ -addSubDomain({ - description: 'Epic scratch modifation with tons of cool features', - domain: 'is-an.app', - subdomain: 'shredmod', - owner: { - repo: 'https://github.com/ShredMod/shredmod.github.io', - email: 'themadpunter10@gmail.com', - }, - record: { - CNAME: 'shredmod.github.io', - }, - nested: [ - { - subdomain: 'packager', - record: { - CNAME: 'shredmod.github.io', - }, - }, - { - subdomain: 'extensions', - record: { - CNAME: 'shredmod.github.io', - }, - }, - { - subdomain: 'documentations', - record: { - CNAME: 'shredmod.github.io', - }, - }, - ], -}) diff --git a/domains/smp.is-an.app.js b/domains/smp.is-an.app.js deleted file mode 100644 index c10f295e..00000000 --- a/domains/smp.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'Sakana Music Player', - domain: 'is-an.app', - subdomain: 'smp', - owner: { - repo: 'https://github.com/YanDao0313/SakanaMusicPlayer', - email: 'github@ydlk.cc', - }, - record: { - CNAME: 'yandao0313.github.io', - }, - proxy: false, -}) diff --git a/domains/snapscript.is-an.app.js b/domains/snapscript.is-an.app.js deleted file mode 100644 index c98bbbeb..00000000 --- a/domains/snapscript.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'A Web App for sharing code snippets', - domain: 'is-an.app', - subdomain: 'snapscript', - owner: { - email: 'roktimsenapoty2@gmail.com', - repo: 'https://github.com/roktim32/SnapScript' - }, - record: { - CNAME: 'cname.vercel-dns.com' - }, - proxy: false -}); diff --git a/domains/survival2d.is-an.app.js b/domains/survival2d.is-an.app.js deleted file mode 100644 index 96404e4b..00000000 --- a/domains/survival2d.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'Survival2D is a 2D battle royale game.', - domain: 'is-an.app', - subdomain: 'survival2d', - owner: { - repo: 'https://github.com/Survival2D/Client', - email: 'minhtienit99@gmail.com', - }, - record: { - CNAME: 'survival2d.pages.dev', - }, - proxy: false, -}) diff --git a/domains/yt2mp3.is-an.app.js b/domains/yt2mp3.is-an.app.js deleted file mode 100644 index a6525fef..00000000 --- a/domains/yt2mp3.is-an.app.js +++ /dev/null @@ -1,13 +0,0 @@ -addSubDomain({ - description: 'A website that converts Youtube videos into mp3/mp4 files', - domain: 'is-an.app', - subdomain: 'yt2mp3', - owner: { - repo: 'https://github.com/avalynndev/youtube2mp3', - email: 'avalynndev@gmail.com', - }, - record: { - CNAME: 'cname.vercel-dns.com', - }, - proxy: false, -}) diff --git a/domains/zatoga.is-an.app.js b/domains/zatoga.is-an.app.js deleted file mode 100644 index 6d0c22aa..00000000 --- a/domains/zatoga.is-an.app.js +++ /dev/null @@ -1,12 +0,0 @@ -addSubDomain({ - description: 'Game website', - domain: 'is-an.app', - subdomain: 'zatoga', - owner: { - email: 'tamoghnak13@gmail.com', - }, - record: { - CNAME: 'zatoga.pages.dev', - }, - proxy: true, -}) diff --git a/domains/zeusgang.1bt.uk.js b/domains/zeusgang.1bt.uk.js deleted file mode 100644 index 479bbaf0..00000000 --- a/domains/zeusgang.1bt.uk.js +++ /dev/null @@ -1,11 +0,0 @@ -addSubDomain({ - description: 'A simple website that shows member information and leaderboards for the minecraft team', - domain: '1bt.uk', - subdomain: 'zeusgang', - owner: { - repo: 'https://github.com/zeusgangproject/zeusgangproject.github.io', - }, - record: { - CNAME: 'zeusgangproject.github.io', - }, -}) diff --git a/web/browserconfig.xml b/sites/is-an.app/browserconfig.xml similarity index 100% rename from web/browserconfig.xml rename to sites/is-an.app/browserconfig.xml diff --git a/web/favicon.ico b/sites/is-an.app/favicon.ico similarity index 100% rename from web/favicon.ico rename to sites/is-an.app/favicon.ico diff --git a/web/favicon/android-chrome-144x144.png b/sites/is-an.app/favicon/android-chrome-144x144.png similarity index 100% rename from web/favicon/android-chrome-144x144.png rename to sites/is-an.app/favicon/android-chrome-144x144.png diff --git a/web/favicon/apple-touch-icon.png b/sites/is-an.app/favicon/apple-touch-icon.png similarity index 100% rename from web/favicon/apple-touch-icon.png rename to sites/is-an.app/favicon/apple-touch-icon.png diff --git a/web/favicon/favicon-16x16.png b/sites/is-an.app/favicon/favicon-16x16.png similarity index 100% rename from web/favicon/favicon-16x16.png rename to sites/is-an.app/favicon/favicon-16x16.png diff --git a/web/favicon/favicon-32x32.png b/sites/is-an.app/favicon/favicon-32x32.png similarity index 100% rename from web/favicon/favicon-32x32.png rename to sites/is-an.app/favicon/favicon-32x32.png diff --git a/web/favicon/mstile-150x150.png b/sites/is-an.app/favicon/mstile-150x150.png similarity index 100% rename from web/favicon/mstile-150x150.png rename to sites/is-an.app/favicon/mstile-150x150.png diff --git a/web/favicon/safari-pinned-tab.svg b/sites/is-an.app/favicon/safari-pinned-tab.svg similarity index 100% rename from web/favicon/safari-pinned-tab.svg rename to sites/is-an.app/favicon/safari-pinned-tab.svg diff --git a/sites/is-an.app/index.html b/sites/is-an.app/index.html new file mode 100644 index 00000000..b1870b5d --- /dev/null +++ b/sites/is-an.app/index.html @@ -0,0 +1,88 @@ + + + + + + is-an.app domain + + + + + + + + + + +
+
+ https://is-an.app +
+
+ + + diff --git a/web/robots.txt b/sites/is-an.app/robots.txt similarity index 100% rename from web/robots.txt rename to sites/is-an.app/robots.txt diff --git a/sites/is-an.app/webmanifest.json b/sites/is-an.app/webmanifest.json new file mode 100644 index 00000000..3b6361bb --- /dev/null +++ b/sites/is-an.app/webmanifest.json @@ -0,0 +1,14 @@ +{ + "name": "", + "short_name": "", + "icons": [ + { + "src": "/favicon/android-chrome-144x144.png", + "sizes": "144x144", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/dnscontrol.d.ts b/types-dnscontrol.d.ts similarity index 82% rename from dnscontrol.d.ts rename to types-dnscontrol.d.ts index 0713a7d4..1e6fa17a 100644 --- a/dnscontrol.d.ts +++ b/types-dnscontrol.d.ts @@ -1,7 +1,7 @@ // This file was automatically generated by DNSControl. Do not edit it directly. // To update it, run `dnscontrol write-types`. -// DNSControl version 4.8.2 +// DNSControl version 4.12.5 // WARNING: These type definitions are experimental and subject to change in future releases. interface Domain { @@ -53,9 +53,9 @@ type Duration = * > 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. * * ```javascript - * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), [ + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * A("@", "1.2.3.4"), - * ]); + * END); * * FETCH("https://example.com", { * // All three options below are optional @@ -114,6 +114,7 @@ interface ResponseHeaders { declare function require(name: `${string}.json`): any; +declare function require(name: `${string}.json5`): any; declare function require(name: string): true; /** @@ -184,7 +185,7 @@ declare const DISABLE_REPEATED_DOMAIN_CHECK: RecordModifier; /** * A adds an A record To a domain. The name should be the relative label for the record. Use `@` for the domain apex. * - * The address should be an ip address, either a string, or a numeric value obtained via [IP](../global/IP.md). + * The address should be an ip address, either a string, or a numeric value obtained via [IP](../top-level-functions/IP.md). * * Modifiers can be any number of [record modifiers](https://docs.dnscontrol.org/language-reference/record-modifiers) or JSON objects, which will be merged into the record's metadata. * @@ -193,8 +194,8 @@ declare const DISABLE_REPEATED_DOMAIN_CHECK: RecordModifier; * A("@", "1.2.3.4"), * A("foo", "2.3.4.5"), * A("test.foo", IP("1.2.3.4"), TTL(5000)), - * A("*", "1.2.3.4", {foo: 42}) - * ); + * A("*", "1.2.3.4", {foo: 42}), + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/a @@ -215,8 +216,8 @@ declare function A(name: string, address: string | number, ...modifiers: RecordM * AAAA("@", addrV6), * AAAA("foo", addrV6), * AAAA("test.foo", addrV6, TTL(5000)), - * AAAA("*", addrV6, {foo: 42}) - * ); + * AAAA("*", addrV6, {foo: 42}), + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/aaaa @@ -243,7 +244,7 @@ declare function AKAMAICDN(name: string, target: string, ...modifiers: RecordMod * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * ALIAS("@", "google.com."), // example.com -> google.com - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/alias @@ -251,24 +252,24 @@ declare function AKAMAICDN(name: string, target: string, ...modifiers: RecordMod declare function ALIAS(name: string, target: string, ...modifiers: RecordModifier[]): DomainModifier; /** - * AUTODNSSEC_OFF tells the provider to disable AutoDNSSEC. It takes no + * `AUTODNSSEC_OFF` tells the provider to disable AutoDNSSEC. It takes no * parameters. * - * See `AUTODNSSEC_ON` for further details. + * See [`AUTODNSSEC_ON`](AUTODNSSEC_ON.md) for further details. * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/autodnssec_off */ declare const AUTODNSSEC_OFF: DomainModifier; /** - * AUTODNSSEC_ON tells the provider to enable AutoDNSSEC. + * `AUTODNSSEC_ON` tells the provider to **enable** AutoDNSSEC. * - * AUTODNSSEC_OFF tells the provider to disable AutoDNSSEC. + * [`AUTODNSSEC_OFF`](AUTODNSSEC_OFF.md) tells the provider to **disable** AutoDNSSEC. * * AutoDNSSEC is a feature where a DNS provider can automatically manage * DNSSEC for a domain. Not all providers support this. * - * At this time, AUTODNSSEC_ON takes no parameters. There is no ability + * At this time, `AUTODNSSEC_ON` takes no parameters. There is no ability * to tune what the DNS provider sets, no algorithm choice. We simply * ask that they follow their defaults when enabling a no-fuss DNSSEC * data model. @@ -279,13 +280,13 @@ declare const AUTODNSSEC_OFF: DomainModifier; * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * AUTODNSSEC_ON, // Enable AutoDNSSEC. - * A("@", "10.1.1.1") - * ); + * A("@", "10.1.1.1"), + * END); * * D("insecure.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * AUTODNSSEC_OFF, // Disable AutoDNSSEC. - * A("@", "10.2.2.2") - * ); + * A("@", "10.2.2.2"), + * END); * ``` * * If neither `AUTODNSSEC_ON` or `AUTODNSSEC_OFF` is specified for a @@ -335,7 +336,7 @@ declare const AUTODNSSEC_ON: DomainModifier; * D("example.com", REG_MY_PROVIDER, DnsProvider("AZURE_DNS"), * AZURE_ALIAS("foo", "A", "/subscriptions/726f8cd6-6459-4db4-8e6d-2cd2716904e2/resourceGroups/test/providers/Microsoft.Network/trafficManagerProfiles/testpp2"), // record for traffic manager * AZURE_ALIAS("foo", "CNAME", "/subscriptions/726f8cd6-6459-4db4-8e6d-2cd2716904e2/resourceGroups/test/providers/Microsoft.Network/dnszones/example.com/A/quux."), // record in the same zone - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/service-provider-specific/azure-dns/azure_alias @@ -363,8 +364,8 @@ declare function AZURE_ALIAS(name: string, type: "A" | "AAAA" | "CNAME", target: * CAA("@", "issuewild", ";"), * // Report all violation to test@example.com. If CA does not support * // this record then refuse to issue any certificate - * CAA("@", "iodef", "mailto:test@example.com", CAA_CRITICAL) - * ); + * CAA("@", "iodef", "mailto:test@example.com", CAA_CRITICAL), + * END); * ``` * * DNSControl contains a [`CAA_BUILDER`](CAA_BUILDER.md) which can be used to simply create `CAA()` records for your domains. Instead of creating each CAA record individually, you can simply configure your report mail address, the authorized certificate authorities and the builder cares about the rest. @@ -375,7 +376,7 @@ declare function CAA(name: string, tag: "issue" | "issuewild" | "iodef", value: /** * DNSControl contains a `CAA_BUILDER` which can be used to simply create - * [`CAA()`](../domain/CAA.md) records for your domains. Instead of creating each [`CAA()`](../domain/CAA.md) record + * [`CAA()`](../domain-modifiers/CAA.md) records for your domains. Instead of creating each [`CAA()`](../domain-modifiers/CAA.md) record * individually, you can simply configure your report mail address, the * authorized certificate authorities and the builder cares about the rest. * @@ -384,25 +385,29 @@ declare function CAA(name: string, tag: "issue" | "issuewild" | "iodef", value: * ### Simple example * * ```javascript - * CAA_BUILDER({ - * label: "@", - * iodef: "mailto:test@example.com", - * iodef_critical: true, - * issue: [ - * "letsencrypt.org", - * "comodoca.com", - * ], - * issuewild: "none", - * }) + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * CAA_BUILDER({ + * label: "@", + * iodef: "mailto:test@example.com", + * iodef_critical: true, + * issue: [ + * "letsencrypt.org", + * "comodoca.com", + * ], + * issuewild: "none", + * }), + * END); * ``` * * `CAA_BUILDER()` builds multiple records: * * ```javascript - * CAA("@", "iodef", "mailto:test@example.com", CAA_CRITICAL) - * CAA("@", "issue", "letsencrypt.org") - * CAA("@", "issue", "comodoca.com") - * CAA("@", "issuewild", ";") + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * CAA("@", "iodef", "mailto:test@example.com", CAA_CRITICAL), + * CAA("@", "issue", "letsencrypt.org"), + * CAA("@", "issue", "comodoca.com"), + * CAA("@", "issuewild", ";"), + * END); * ``` * * which in turns yield the following records: @@ -419,27 +424,31 @@ declare function CAA(name: string, tag: "issue" | "issuewild" | "iodef", value: * The same example can be enriched with CAA_CRITICAL on all records: * * ```javascript - * CAA_BUILDER({ - * label: "@", - * iodef: "mailto:test@example.com", - * iodef_critical: true, - * issue: [ - * "letsencrypt.org", - * "comodoca.com", - * ], - * issue_critical: true, - * issuewild: "none", - * issuewild_critical: true, - * }) + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * CAA_BUILDER({ + * label: "@", + * iodef: "mailto:test@example.com", + * iodef_critical: true, + * issue: [ + * "letsencrypt.org", + * "comodoca.com", + * ], + * issue_critical: true, + * issuewild: "none", + * issuewild_critical: true, + * }), + * END); * ``` * * `CAA_BUILDER()` then builds (the same) multiple records - all with CAA_CRITICAL flag set: * * ```javascript - * CAA("@", "iodef", "mailto:test@example.com", CAA_CRITICAL) - * CAA("@", "issue", "letsencrypt.org", CAA_CRITICAL) - * CAA("@", "issue", "comodoca.com", CAA_CRITICAL) - * CAA("@", "issuewild", ";", CAA_CRITICAL) + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * CAA("@", "iodef", "mailto:test@example.com", CAA_CRITICAL), + * CAA("@", "issue", "letsencrypt.org", CAA_CRITICAL), + * CAA("@", "issue", "comodoca.com", CAA_CRITICAL), + * CAA("@", "issuewild", ";", CAA_CRITICAL), + * END); * ``` * * which in turns yield the following records: @@ -460,18 +469,24 @@ declare function CAA(name: string, tag: "issue" | "issuewild" | "iodef", value: * * `issue_critical:` This can be `true` or `false`. If enabled and CA does not support this record, then certificate issue will be refused. (Optional. Default: `false`) * * `issuewild:` An array of CAs which are allowed to issue wildcard certificates. (Can be simply `"none"` to refuse issuing wildcard certificates for all CAs) * * `issuewild_critical:` This can be `true` or `false`. If enabled and CA does not support this record, then certificate issue will be refused. (Optional. Default: `false`) + * * `ttl:` Input for `TTL` method (optional) * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/caa_builder */ -declare function CAA_BUILDER(opts: { label?: string; iodef: string; iodef_critical?: boolean; issue: string[]; issue_critical?: boolean; issuewild: string[]; issuewild_critical?: boolean }): DomainModifier; +declare function CAA_BUILDER(opts: { label?: string; iodef: string; iodef_critical?: boolean; issue: string[]; issue_critical?: boolean; issuewild: string[]; issuewild_critical?: boolean; ttl?: Duration }): DomainModifier; /** + * WARNING: Cloudflare is removing this feature and replacing it with a new + * feature called "Dynamic Single Redirect". DNSControl will automatically + * generate "Dynamic Single Redirects" for a limited number of use cases. See + * [`CLOUDFLAREAPI`](../provider/cloudflareapi.md) for details. + * * `CF_REDIRECT` uses Cloudflare-specific features ("Forwarding URL" Page Rules) to * generate a HTTP 301 permanent redirect. * * If _any_ `CF_REDIRECT` or [`CF_TEMP_REDIRECT`](CF_TEMP_REDIRECT.md) functions are used then * `dnscontrol` will manage _all_ "Forwarding URL" type Page Rules for the domain. - * Page Rule types other than "Forwarding URL” will be left alone. + * Page Rule types other than "Forwarding URL" will be left alone. * * WARNING: Cloudflare does not currently fully document the Page Rules API and * this interface is not extensively tested. Take precautions such as making @@ -489,7 +504,7 @@ declare function CAA_BUILDER(opts: { label?: string; iodef: string; iodef_critic * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * CF_REDIRECT("example.com/*", "https://www.example.com/$1"), - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/service-provider-specific/cloudflare-dns/cf_redirect @@ -497,6 +512,41 @@ declare function CAA_BUILDER(opts: { label?: string; iodef: string; iodef_critic declare function CF_REDIRECT(source: string, destination: string, ...modifiers: RecordModifier[]): DomainModifier; /** + * `CF_SINGLE_REDIRECT` is a Cloudflare-specific feature for creating HTTP 301 + * (permanent) or 302 (temporary) redirects. + * + * This feature manages dynamic "Single Redirects". (Single Redirects can be + * static or dynamic but DNSControl only maintains dynamic redirects). + * + * Cloudflare documentation: + * + * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * CF_SINGLE_REDIRECT("name", 301, "when", "then"), + * CF_SINGLE_REDIRECT('redirect www.example.com', 301, 'http.host eq "www.example.com"', 'concat("https://otherplace.com", http.request.uri.path)'), + * CF_SINGLE_REDIRECT('redirect yyy.example.com', 301, 'http.host eq "yyy.example.com"', 'concat("https://survey.stackoverflow.co", "")'), + * END); + * ``` + * + * The fields are: + * + * * name: The name (basically a comment, but it must be unique) + * * code: Either 301 (permanent) or 302 (temporary) redirects. May be a number or string. + * * when: What Cloudflare sometimes calls the "rule expression". + * * then: The replacement expression. + * + * NOTE: The features [`CF_REDIRECT`](CF_REDIRECT.md) and [`CF_TEMP_REDIRECT`](CF_TEMP_REDIRECT.md) generate `CF_SINGLE_REDIRECT` if enabled in [`CLOUDFLAREAPI`](../../provider/cloudflareapi.md). + * + * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/service-provider-specific/cloudflare-dns/cf_single_redirect + */ +declare function CF_SINGLE_REDIRECT(name: string, code: number, when: string, then: string, ...modifiers: RecordModifier[]): DomainModifier; + +/** + * WARNING: Cloudflare is removing this feature and replacing it with a new + * feature called "Dynamic Single Redirect". DNSControl will automatically + * generate "Dynamic Single Redirects" for a limited number of use cases. See + * [`CLOUDFLAREAPI`](../provider/cloudflareapi.md) for details. + * * `CF_TEMP_REDIRECT` uses Cloudflare-specific features ("Forwarding URL" Page * Rules) to generate a HTTP 302 temporary redirect. * @@ -513,7 +563,7 @@ declare function CF_REDIRECT(source: string, destination: string, ...modifiers: * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * CF_TEMP_REDIRECT("example.example.com/*", "https://otherplace.yourdomain.com/$1"), - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/service-provider-specific/cloudflare-dns/cf_temp_redirect @@ -539,7 +589,7 @@ declare function CF_TEMP_REDIRECT(source: string, destination: string, ...modifi * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * CF_WORKER_ROUTE("api.example.com/*", "my-worker"), * CF_WORKER_ROUTE("example.com/api/*", "my-worker"), - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/service-provider-specific/cloudflare-dns/cf_worker_route @@ -564,7 +614,7 @@ declare function CLOUDNS_WR(name: string, target: string, ...modifiers: RecordMo * CNAME("foo", "google.com."), // foo.example.com -> google.com * CNAME("abc", "@"), // abc.example.com -> example.com * CNAME("def", "test"), // def.example.com -> test.example.com - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/cname @@ -574,11 +624,11 @@ declare function CNAME(name: string, target: string, ...modifiers: RecordModifie /** * `D` adds a new Domain for DNSControl to manage. The first two arguments are required: the domain name (fully qualified `example.com` without a trailing dot), and the * name of the registrar (as previously declared with [NewRegistrar](NewRegistrar.md)). Any number of additional arguments may be included to add DNS Providers with [DNSProvider](NewDnsProvider.md), - * add records with [A](../domain/A.md), [CNAME](../domain/CNAME.md), and so forth, or add metadata. + * add records with [A](../domain-modifiers/A.md), [CNAME](../domain-modifiers/CNAME.md), and so forth, or add metadata. * * Modifier arguments are processed according to type as follows: * - * - A function argument will be called with the domain object as it's only argument. Most of the [built-in modifier functions](https://docs.dnscontrol.org/language-reference/domain-modifiers) return such functions. + * - A function argument will be called with the domain object as it's only argument. Most of the [built-in modifier functions](https://docs.dnscontrol.org/language-reference/domain-modifiers-modifiers) return such functions. * - An object argument will be merged into the domain's metadata collection. * - An array argument will have all of it's members evaluated recursively. This allows you to combine multiple common records or modifiers into a variable that can * be used like a macro in multiple domains. @@ -587,8 +637,8 @@ declare function CNAME(name: string, target: string, ...modifiers: RecordModifie * // simple domain * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * A("@","1.2.3.4"), - * CNAME("test", "foo.example2.com.") - * ); + * CNAME("test", "foo.example2.com."), + * END); * * // "macro" for records that can be mixed into any zone * var GOOGLE_APPS_DOMAIN_MX = [ @@ -602,8 +652,8 @@ declare function CNAME(name: string, target: string, ...modifiers: RecordModifie * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * A("@","1.2.3.4"), * CNAME("test", "foo.example2.com."), - * GOOGLE_APPS_DOMAIN_MX - * ); + * GOOGLE_APPS_DOMAIN_MX, + * END); * ``` * * # Split Horizon DNS @@ -622,16 +672,16 @@ declare function CNAME(name: string, target: string, ...modifiers: RecordModifie * var DNS_OUTSIDE = NewDnsProvider("bind"); * * D("example.com!inside", REG_THIRDPARTY, DnsProvider(DNS_INSIDE), - * A("www", "10.10.10.10") - * ); + * A("www", "10.10.10.10"), + * END); * * D("example.com!outside", REG_THIRDPARTY, DnsProvider(DNS_OUTSIDE), - * A("www", "20.20.20.20") - * ); + * A("www", "20.20.20.20"), + * END); * * D_EXTEND("example.com!inside", - * A("internal", "10.99.99.99") - * ); + * A("internal", "10.99.99.99"), + * END); * ``` * * A domain name without a `!` is assigned a tag that is the empty @@ -664,19 +714,19 @@ declare function D(name: string, registrar: string, ...modifiers: DomainModifier * * ## Example * - * We want to create backup zone files for all domains, but not actually register them. Also create a [`DefaultTTL`](../domain/DefaultTTL.md). + * We want to create backup zone files for all domains, but not actually register them. Also create a [`DefaultTTL`](../domain-modifiers/DefaultTTL.md). * The domain `example.com` will have the defaults set. * * ```javascript * var COMMON = NewDnsProvider("foo"); * DEFAULTS( * DnsProvider(COMMON, 0), - * DefaultTTL("1d") - * ); + * DefaultTTL("1d"), + * END); * * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - * A("@","1.2.3.4") - * ); + * A("@","1.2.3.4"), + * END); * ``` * * If you want to clear the defaults, you can do the following. @@ -686,8 +736,8 @@ declare function D(name: string, registrar: string, ...modifiers: DomainModifier * DEFAULTS(); * * D("example2.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - * A("@","1.2.3.4") - * ); + * A("@","1.2.3.4"), + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/top-level-functions/defaults @@ -701,8 +751,8 @@ declare function DEFAULTS(...modifiers: DomainModifier[]): void; * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - * DHCID("example.com", "ABCDEFG") - * ); + * DHCID("example.com", "ABCDEFG"), + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/dhcid @@ -717,7 +767,7 @@ declare function DHCID(name: string, digest: string, ...modifiers: RecordModifie * It replaces the per-record `IGNORE_NAME_DISABLE_SAFETY_CHECK()` which is * deprecated as of DNSControl v4.0.0.0. * - * See [`IGNORE()`](../domain/IGNORE.md) for more information. + * See [`IGNORE()`](../domain-modifiers/IGNORE.md) for more information. * * ## Syntax * @@ -743,12 +793,14 @@ declare const DISABLE_IGNORE_SAFETY_CHECK: DomainModifier; * ### Simple example * * ```javascript - * DMARC_BUILDER({ - * policy: "reject", - * ruf: [ - * "mailto:mailauth-reports@example.com", - * ], - * }) + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * DMARC_BUILDER({ + * policy: "reject", + * ruf: [ + * "mailto:mailauth-reports@example.com", + * ], + * }), + * END); * ``` * * This yield the following record: @@ -760,36 +812,40 @@ declare const DISABLE_IGNORE_SAFETY_CHECK: DomainModifier; * ### Advanced example * * ```javascript - * DMARC_BUILDER({ - * policy: "reject", - * subdomainPolicy: "quarantine", - * percent: 50, - * alignmentSPF: "r", - * alignmentDKIM: "strict", - * rua: [ - * "mailto:mailauth-reports@example.com", - * "https://dmarc.example.com/submit", - * ], - * ruf: [ - * "mailto:mailauth-reports@example.com", - * ], - * failureOptions: "1", - * reportInterval: "1h", - * }); + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * DMARC_BUILDER({ + * policy: "reject", + * subdomainPolicy: "quarantine", + * percent: 50, + * alignmentSPF: "r", + * alignmentDKIM: "strict", + * rua: [ + * "mailto:mailauth-reports@example.com", + * "https://dmarc.example.com/submit", + * ], + * ruf: [ + * "mailto:mailauth-reports@example.com", + * ], + * failureOptions: "1", + * reportInterval: "1h", + * }), + * END); * ``` * * ```javascript - * DMARC_BUILDER({ - * label: "insecure", - * policy: "none", - * ruf: [ - * "mailto:mailauth-reports@example.com", - * ], - * failureOptions: { - * SPF: false, - * DKIM: true, - * }, - * }); + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * DMARC_BUILDER({ + * label: "insecure", + * policy: "none", + * ruf: [ + * "mailto:mailauth-reports@example.com", + * ], + * failureOptions: { + * SPF: false, + * DKIM: true, + * }, + * }), + * END); * ``` * * This yields the following records: @@ -824,6 +880,42 @@ declare const DISABLE_IGNORE_SAFETY_CHECK: DomainModifier; */ declare function DMARC_BUILDER(opts: { label?: string; version?: string; policy: 'none' | 'quarantine' | 'reject'; subdomainPolicy?: 'none' | 'quarantine' | 'reject'; alignmentSPF?: 'strict' | 's' | 'relaxed' | 'r'; alignmentDKIM?: 'strict' | 's' | 'relaxed' | 'r'; percent?: number; rua?: string[]; ruf?: string[]; failureOptions?: { SPF: boolean, DKIM: boolean } | string; failureFormat?: string; reportInterval?: Duration; ttl?: Duration }): DomainModifier; +/** + * DNAME adds a DNAME record to the domain. + * + * Target should be a string. + * + * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * DNAME("sub", "example.net."), + * END); + * ``` + * + * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/dname + */ +declare function DNAME(name: string, target: string, ...modifiers: RecordModifier[]): DomainModifier; + +/** + * DNSKEY adds a DNSKEY record to the domain. + * + * Flags should be a number. + * + * Protocol should be a number. + * + * Algorithm must be a number. + * + * Public key must be a string. + * + * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * DNSKEY("@", 257, 3, 13, "AABBCCDD"), + * END); + * ``` + * + * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/dnskey + */ +declare function DNSKEY(name: string, flags: number, protocol: number, algorithm: number, publicKey: string, ...modifiers: RecordModifier[]): DomainModifier; + /** * `DOMAIN_ELSEWHERE()` is a helper macro that lets you easily indicate that * a domain's zones are managed elsewhere. That is, it permits you easily delegate @@ -846,11 +938,11 @@ declare function DMARC_BUILDER(opts: { label?: string; version?: string; policy: * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * NO_PURGE, * NAMESERVER("ns1.foo.com"), - * NAMESERVER("ns2.foo.com") - * ); + * NAMESERVER("ns2.foo.com"), + * END); * ``` * - * NOTE: The [`NO_PURGE`](../domain/NO_PURGE.md) is used out of abundance of caution but since no + * NOTE: The [`NO_PURGE`](../domain-modifiers/NO_PURGE.md) is used out of abundance of caution but since no * `DnsProvider()` statements exist, no updates would be performed. * * @see https://docs.dnscontrol.org/language-reference/top-level-functions/domain_elsewhere @@ -881,11 +973,11 @@ declare function DOMAIN_ELSEWHERE(name: string, registrar: string, nameserver_na * ```javascript * D("example.com", REG_NAMEDOTCOM, * NO_PURGE, - * DnsProvider(DSP_AZURE) - * ); + * DnsProvider(DSP_AZURE), + * END); * ``` * - * NOTE: The [`NO_PURGE`](../domain/NO_PURGE.md) is used to prevent DNSControl from changing the records. + * NOTE: The [`NO_PURGE`](../domain-modifiers/NO_PURGE.md) is used to prevent DNSControl from changing the records. * * @see https://docs.dnscontrol.org/language-reference/top-level-functions/domain_elsewhere_auto */ @@ -904,8 +996,8 @@ declare function DOMAIN_ELSEWHERE_AUTO(name: string, domain: string, registrar: * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - * DS("example.com", 2371, 13, 2, "ABCDEF") - * ); + * DS("example.com", 2371, 13, 2, "ABCDEF"), + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/ds @@ -934,32 +1026,33 @@ declare function DS(name: string, keytag: number, algorithm: number, digesttype: * not `domain.tld`. * * Some operators only act on an apex domain (e.g. - * [`CF_REDIRECT`](../domain/CF_REDIRECT.md) and [`CF_TEMP_REDIRECT`](../domain/CF_TEMP_REDIRECT.md)). Using them + * [`CF_SINGLE_REDIRECT`](../domain-modifiers/CF_SINGLE_REDIRECT.md), + * [`CF_REDIRECT`](../domain-modifiers/CF_REDIRECT.md), and [`CF_TEMP_REDIRECT`](../domain-modifiers/CF_TEMP_REDIRECT.md)). Using them * in a `D_EXTEND` subdomain may not be what you expect. * * ```javascript * D("domain.tld", REG_MY_PROVIDER, DnsProvider(DNS), * A("@", "127.0.0.1"), // domain.tld * A("www", "127.0.0.2"), // www.domain.tld - * CNAME("a", "b") // a.domain.tld -> b.domain.tld - * ); + * CNAME("a", "b"), // a.domain.tld -> b.domain.tld + * END); * D_EXTEND("domain.tld", * A("aaa", "127.0.0.3"), // aaa.domain.tld - * CNAME("c", "d") // c.domain.tld -> d.domain.tld - * ); + * CNAME("c", "d"), // c.domain.tld -> d.domain.tld + * END); * D_EXTEND("sub.domain.tld", * A("bbb", "127.0.0.4"), // bbb.sub.domain.tld * A("ccc", "127.0.0.5"), // ccc.sub.domain.tld - * CNAME("e", "f") // e.sub.domain.tld -> f.sub.domain.tld - * ); + * CNAME("e", "f"), // e.sub.domain.tld -> f.sub.domain.tld + * END); * D_EXTEND("sub.sub.domain.tld", * A("ddd", "127.0.0.6"), // ddd.sub.sub.domain.tld - * CNAME("g", "h") // g.sub.sub.domain.tld -> h.sub.sub.domain.tld - * ); + * CNAME("g", "h"), // g.sub.sub.domain.tld -> h.sub.sub.domain.tld + * END); * D_EXTEND("sub.domain.tld", * A("@", "127.0.0.7"), // sub.domain.tld - * CNAME("i", "j") // i.sub.domain.tld -> j.sub.domain.tld - * ); + * CNAME("i", "j"), // i.sub.domain.tld -> j.sub.domain.tld + * END); * ``` * * This will end up in the following modifications: (This output assumes the `--full` flag) @@ -996,20 +1089,20 @@ declare function DS(name: string, keytag: number, algorithm: number, digesttype: declare function D_EXTEND(name: string, ...modifiers: DomainModifier[]): void; /** - * DefaultTTL sets the TTL for all subsequent records following it in a domain that do not explicitly set one with [`TTL`](../record/TTL.md). If neither `DefaultTTL` or `TTL` exist for a record, - * the record will inherit the DNSControl global internal default of 300 seconds. See also [`DEFAULTS`](../global/DEFAULTS.md) to override the internal defaults. + * DefaultTTL sets the TTL for all subsequent records following it in a domain that do not explicitly set one with [`TTL`](../record-modifiers/TTL.md). If neither `DefaultTTL` or `TTL` exist for a record, + * the record will inherit the DNSControl global internal default of 300 seconds. See also [`DEFAULTS`](../top-level-functions/DEFAULTS.md) to override the internal defaults. * - * NS records are currently a special case, and do not inherit from `DefaultTTL`. See [`NAMESERVER_TTL`](../domain/NAMESERVER_TTL.md) to set a default TTL for all NS records. + * NS records are currently a special case, and do not inherit from `DefaultTTL`. See [`NAMESERVER_TTL`](../domain-modifiers/NAMESERVER_TTL.md) to set a default TTL for all NS records. * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * DefaultTTL("4h"), * A("@","1.2.3.4"), // uses default - * A("foo", "2.3.4.5", TTL(600)) // overrides default - * ); + * A("foo", "2.3.4.5", TTL(600)), // overrides default + * END); * ``` * - * The DefaultTTL duration is the same format as [`TTL`](../record/TTL.md), an integer number of seconds + * The DefaultTTL duration is the same format as [`TTL`](../record-modifiers/TTL.md), an integer number of seconds * or a string with a unit such as `"4d"`. * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/defaultttl @@ -1018,7 +1111,7 @@ declare function DefaultTTL(ttl: Duration): DomainModifier; /** * DnsProvider indicates that the specified provider should be used to manage - * records for this domain. The name must match the name used with [NewDnsProvider](../global/NewDnsProvider.md). + * records for this domain. The name must match the name used with [NewDnsProvider](../top-level-functions/NewDnsProvider.md). * * The nsCount parameter determines how the nameservers will be managed from this provider. * @@ -1047,6 +1140,26 @@ declare function DnsProvider(name: string, nsCount?: number): DomainModifier; */ declare function FRAME(name: string, target: string, ...modifiers: RecordModifier[]): DomainModifier; +/** + * HTTPS adds an HTTPS record to a domain. The name should be the relative label for the record. Use `@` for the domain apex. The HTTPS record is a special form of the SVCB resource record. + * + * The priority must be a positive number, the address should be an ip address, either a string, or a numeric value obtained via [IP](../top-level-functions/IP.md). + * + * The params may be configured to specify the `alpn`, `ipv4hint`, `ipv6hint`, `ech` or `port` setting. Several params may be joined by a space. Not existing params may be specified as an empty string `""` + * + * Modifiers can be any number of [record modifiers](https://docs.dnscontrol.org/language-reference/record-modifiers) or JSON objects, which will be merged into the record's metadata. + * + * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * HTTPS("@", 1, ".", "ipv4hint=123.123.123.123 alpn=h3,h2 port=443"), + * HTTPS("@", 1, "test.com", ""), + * END); + * ``` + * + * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/https + */ +declare function HTTPS(name: string, priority: number, target: string, params: string, ...modifiers: RecordModifier[]): DomainModifier; + /** * `IGNORE()` makes it possible for DNSControl to share management of a domain * with an external system. The parameters of `IGNORE()` indicate which records @@ -1064,20 +1177,22 @@ declare function FRAME(name: string, target: string, ...modifiers: RecordModifie * * Technically `IGNORE_NAME` is a promise that DNSControl will not modify or * delete existing records that match particular patterns. It is like - * [`NO_PURGE`](../domain/NO_PURGE.md) that matches only specific records. + * [`NO_PURGE`](../domain-modifiers/NO_PURGE.md) that matches only specific records. * * Including a record that is ignored is considered an error and may have * undefined behavior. This safety check can be disabled using the - * [`DISABLE_IGNORE_SAFETY_CHECK`](../domain/DISABLE_IGNORE_SAFETY_CHECK.md) feature. + * [`DISABLE_IGNORE_SAFETY_CHECK`](../domain-modifiers/DISABLE_IGNORE_SAFETY_CHECK.md) feature. * * ## Syntax * * The `IGNORE()` function can be used with up to 3 parameters: * * ```javascript - * IGNORE(labelSpec, typeSpec, targetSpec): - * IGNORE(labelSpec, typeSpec): - * IGNORE(labelSpec): + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * IGNORE(labelSpec, typeSpec, targetSpec), + * IGNORE(labelSpec, typeSpec), + * IGNORE(labelSpec), + * END); * ``` * * * `labelSpec` is a glob that matches the DNS label. For example `"foo"` or `"foo*"`. `"*"` matches all labels, as does the empty string (`""`). @@ -1179,83 +1294,130 @@ declare function FRAME(name: string, target: string, ...modifiers: RecordModifie * ``` * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("@", "", ""), - * // Would match: - * // foo.example.com. A 1.1.1.1 - * // foo.more.example.com. A 1.1.1.1 + * END); * ``` * + * **Would match**: + * + * * `foo.example.com. A 1.1.1.1` + * * `foo.more.example.com. A 1.1.1.1` + * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("example.com.", "", ""), - * // Would match: - * // nothing + * END); * ``` * + * **Would match**: + * + * * nothing + * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("foo", "", ""), - * // Would match: - * // foo.example.com. A 1.1.1.1 + * END); * ``` * + * **Would match**: + * + * * `foo.example.com. A 1.1.1.1` + * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("foo.**", "", ""), - * // Would match: - * // foo.more.example.com. A 1.1.1.1 + * END); * ``` * + * **Would match**: + * + * * `foo.more.example.com. A 1.1.1.1` + * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("www", "", ""), - * // Would match: + * END); * // www.example.com. A 174.136.107.196 * ``` * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("www.*", "", ""), - * // Would match: + * END); * // nothing * ``` * + * **Would match**: + * + * * nothing + * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("www.example.com", "", ""), - * // Would match: + * END); * // nothing * ``` * + * **Would match**: + * + * * nothing + * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("www.example.com.", "", ""), - * // Would match: - * // none + * END); * ``` * + * **Would match**: + * + * * none + * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * //IGNORE("", "", "1.1.1.*"), - * // Would match: - * // foo.example.com. A 1.1.1.1 - * // foo.more.example.com. A 1.1.1.1 + * END); * ``` * + * **Would match**: + * + * * `foo.example.com. A 1.1.1.1` + * * `foo.more.example.com. A 1.1.1.1` + * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * //IGNORE("", "", "www"), - * // Would match: - * // none + * END); * ``` * + * **Would match**: + * + * * none + * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("", "", "*bar*"), - * // Would match: - * // cfull2.example.com. CNAME www.bar.plts.org. - * // cfull3.example.com. CNAME bar.www.plts.org. - * // mfull2.more.example.com. CNAME www.bar.plts.org. - * // mfull3.more.example.com. CNAME bar.www.plts.org. + * END); * ``` * + * **Would match**: + * + * * `cfull2.example.com. CNAME www.bar.plts.org.` + * * `cfull3.example.com. CNAME bar.www.plts.org.` + * * `mfull2.more.example.com. CNAME www.bar.plts.org.` + * * `mfull3.more.example.com. CNAME bar.www.plts.org.` + * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * IGNORE("", "", "bar.**"), - * // Would match: - * // cfull3.example.com. CNAME bar.www.plts.org. - * // mfull3.more.example.com. CNAME bar.www.plts.org. + * END); * ``` * + * **Would match**: + * + * * `cfull3.example.com. CNAME bar.www.plts.org.` + * * `mfull3.more.example.com. CNAME bar.www.plts.org.` + * * ## Conflict handling * * It is considered as an error for a `dnsconfig.js` to both ignore and insert the @@ -1291,8 +1453,10 @@ declare function FRAME(name: string, target: string, ...modifiers: RecordModifie * instead. * * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * // THIS NO LONGER WORKS! Use DISABLE_IGNORE_SAFETY_CHECK instead. See above. * TXT("myhost", "mytext", IGNORE_NAME_DISABLE_SAFETY_CHECK), + * END); * ``` * * ## Caveats @@ -1332,13 +1496,13 @@ declare function IGNORE_TARGET(pattern: string, rType: string): DomainModifier; * * ```javascript * D("example.com!external", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - * A("test", "8.8.8.8") - * ); + * A("test", "8.8.8.8"), + * END); * * D("example.com!internal", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * INCLUDE("example.com!external"), - * A("home", "127.0.0.1") - * ); + * A("home", "127.0.0.1"), + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/include @@ -1427,10 +1591,10 @@ declare function IP(ip: string): number; * One must supply the `LOC()` js helper all parameters. If that seems like too * much work, see also helper functions: * - * * [`LOC_BUILDER_DD({})`](../record/LOC_BUILDER_DD.md) - build a `LOC` by supplying only **d**ecimal **d**egrees. - * * [`LOC_BUILDER_DMS_STR({})`](../record/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E - * * [`LOC_BUILDER_DMM_STR({})`](../record/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E - * * [`LOC_BUILDER_STR({})`](../record/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works + * * [`LOC_BUILDER_DD({})`](LOC_BUILDER_DD.md) - build a `LOC` by supplying only **d**ecimal **d**egrees. + * * [`LOC_BUILDER_DMS_STR({})`](LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E + * * [`LOC_BUILDER_DMM_STR({})`](LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E + * * [`LOC_BUILDER_STR({})`](LOC_BUILDER_STR.md) - tries the coordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works * * ## Format ## * @@ -1444,17 +1608,16 @@ declare function IP(ip: string): number; * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * // LOC "subdomain", d1, m1, s1, "[NnSs]", d2, m2, s2, "[EeWw]", alt, siz, hp, vp) * //42 21 54 N 71 06 18 W -24m 30m - * , LOC("@", 42, 21, 54, "N", 71, 6, 18, "W", -24, 30, 0, 0) + * LOC("@", 42, 21, 54, "N", 71, 6, 18, "W", -24, 30, 0, 0), * //42 21 43.952 N 71 5 6.344 W -24m 1m 200m 10m - * , LOC("a", 42, 21, 43.952, "N", 71, 5, 6.344, "W", -24, 1, 200, 10) + * LOC("a", 42, 21, 43.952, "N", 71, 5, 6.344, "W", -24, 1, 200, 10), * //52 14 05 N 00 08 50 E 10m - * , LOC("b", 52, 14, 5, "N", 0, 8, 50, "E", 10, 0, 0, 0) + * LOC("b", 52, 14, 5, "N", 0, 8, 50, "E", 10, 0, 0, 0), * //32 7 19 S 116 2 25 E 10m - * , LOC("c", 32, 7, 19, "S",116, 2, 25, "E", 10, 0, 0, 0) + * LOC("c", 32, 7, 19, "S",116, 2, 25, "E", 10, 0, 0, 0), * //42 21 28.764 N 71 00 51.617 W -44m 2000m - * , LOC("d", 42, 21, 28.764, "N", 71, 0, 51.617, "W", -44, 2000, 0, 0) - * ); - * + * LOC("d", 42, 21, 28.764, "N", 71, 0, 51.617, "W", -44, 2000, 0, 0), + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/loc @@ -1470,9 +1633,9 @@ declare function LOC(deg1: number, min1: number, sec1: number, deg2: number, min * - alt (float32, optional) * - ttl (optional) * - * A helper to build [`LOC`](../domain/LOC.md) records. Supply four parameters instead of 12. + * A helper to build [`LOC`](LOC.md) records. Supply four parameters instead of 12. * - * Internally assumes some defaults for [`LOC`](../domain/LOC.md) records. + * Internally assumes some defaults for [`LOC`](LOC.md) records. * * The cartesian coordinates are decimal degrees, like you typically find in e.g. Google Maps. * @@ -1486,35 +1649,34 @@ declare function LOC(deg1: number, min1: number, sec1: number, deg2: number, min * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - * LOC_BUILDER_DD({ + * LOC_BUILDER_DD({ * label: "big-ben", * x: 51.50084265331501, * y: -0.12462541415599787, * alt: 6, - * }) - * , LOC_BUILDER_DD({ + * }), + * LOC_BUILDER_DD({ * label: "white-house", * x: 38.89775977858357, * y: -77.03655125982903, * alt: 19, - * }) - * , LOC_BUILDER_DD({ + * }), + * LOC_BUILDER_DD({ * label: "white-house-ttl", * x: 38.89775977858357, * y: -77.03655125982903, * alt: 19, * ttl: "5m", - * }) - * ); - * + * }), + * END); * ``` * * Part of the series: - * * [`LOC()`](../domain/LOC.md) - build a `LOC` by supplying all 12 parameters - * * [`LOC_BUILDER_DD({})`](../record/LOC_BUILDER_DD.md) - accepts cartesian x, y - * * [`LOC_BUILDER_DMS_STR({})`](../record/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E - * * [`LOC_BUILDER_DMM_STR({})`](../record/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E - * * [`LOC_BUILDER_STR({})`](../record/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works + * * [`LOC()`](LOC.md) - build a `LOC` by supplying all 12 parameters + * * [`LOC_BUILDER_DD({})`](LOC_BUILDER_DD.md) - accepts cartesian x, y + * * [`LOC_BUILDER_DMS_STR({})`](LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E + * * [`LOC_BUILDER_DMM_STR({})`](LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E + * * [`LOC_BUILDER_STR({})`](LOC_BUILDER_STR.md) - tries the coordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/loc_builder_dd */ @@ -1528,9 +1690,9 @@ declare function LOC_BUILDER_DD(opts: { label?: string; x: number; y: number; al * - alt (float32, optional) * - ttl (optional) * - * A helper to build [`LOC`](../domain/LOC.md) records. Supply three parameters instead of 12. + * A helper to build [`LOC`](LOC.md) records. Supply three parameters instead of 12. * - * Internally assumes some defaults for [`LOC`](../domain/LOC.md) records. + * Internally assumes some defaults for [`LOC`](LOC.md) records. * * Accepts a string with decimal minutes (DMM) coordinates in the form: 25.24°S 153.15°E * @@ -1546,17 +1708,16 @@ declare function LOC_BUILDER_DD(opts: { label?: string; x: number; y: number; al * label: "tasmania", * str: "42°S 147°E", * alt: 3, - * }) - * ); - * + * }), + * END); * ``` * * Part of the series: - * * [`LOC()`](../domain/LOC.md) - build a `LOC` by supplying all 12 parameters - * * [`LOC_BUILDER_DD({})`](../record/LOC_BUILDER_DD.md) - accepts cartesian x, y - * * [`LOC_BUILDER_DMS_STR({})`](../record/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E - * * [`LOC_BUILDER_DMM_STR({})`](../record/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E - * * [`LOC_BUILDER_STR({})`](../record/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works + * * [`LOC()`](LOC.md) - build a `LOC` by supplying all 12 parameters + * * [`LOC_BUILDER_DD({})`](LOC_BUILDER_DD.md) - accepts cartesian x, y + * * [`LOC_BUILDER_DMS_STR({})`](LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E + * * [`LOC_BUILDER_DMM_STR({})`](LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E + * * [`LOC_BUILDER_STR({})`](LOC_BUILDER_STR.md) - tries the coordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/loc_builder_dmm_str */ @@ -1570,9 +1731,9 @@ declare function LOC_BUILDER_DMM_STR(opts: { label?: string; str: string; alt?: * - alt (float32, optional) * - ttl (optional) * - * A helper to build [`LOC`](../domain/LOC.md) records. Supply three parameters instead of 12. + * A helper to build [`LOC`](LOC.md) records. Supply three parameters instead of 12. * - * Internally assumes some defaults for [`LOC`](../domain/LOC.md) records. + * Internally assumes some defaults for [`LOC`](LOC.md) records. * * Accepts a string with degrees, minutes, and seconds (DMS) coordinates in the form: 41°24'12.2"N 2°10'26.5"E * @@ -1589,17 +1750,16 @@ declare function LOC_BUILDER_DMM_STR(opts: { label?: string; str: string; alt?: * str: "33°51′31″S 151°12′51″E", * alt: 4, * ttl: "5m", - * }) - * ); - * + * }), + * END); * ``` * * Part of the series: - * * [`LOC()`](../domain/LOC.md) - build a `LOC` by supplying all 12 parameters - * * [`LOC_BUILDER_DD({})`](../record/LOC_BUILDER_DD.md) - accepts cartesian x, y - * * [`LOC_BUILDER_DMS_STR({})`](../record/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E - * * [`LOC_BUILDER_DMM_STR({})`](../record/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E - * * [`LOC_BUILDER_STR({})`](../record/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works + * * [`LOC()`](LOC.md) - build a `LOC` by supplying all 12 parameters + * * [`LOC_BUILDER_DD({})`](LOC_BUILDER_DD.md) - accepts cartesian x, y + * * [`LOC_BUILDER_DMS_STR({})`](LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E + * * [`LOC_BUILDER_DMM_STR({})`](LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E + * * [`LOC_BUILDER_STR({})`](LOC_BUILDER_STR.md) - tries the coordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/loc_builder_dms_str */ @@ -1613,41 +1773,40 @@ declare function LOC_BUILDER_DMS_STR(opts: { label?: string; str: string; alt?: * - alt (float32, optional) * - ttl (optional) * - * A helper to build [`LOC`](../domain/LOC.md) records. Supply three parameters instead of 12. + * A helper to build [`LOC`](LOC.md) records. Supply three parameters instead of 12. * - * Internally assumes some defaults for [`LOC`](../domain/LOC.md) records. + * Internally assumes some defaults for [`LOC`](LOC.md) records. * * Accepts a string and tries all `LOC_BUILDER_DM*_STR({})` methods: - * * [`LOC_BUILDER_DMS_STR({})`](../record/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E - * * [`LOC_BUILDER_DMM_STR({})`](../record/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E + * * [`LOC_BUILDER_DMS_STR({})`](LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E + * * [`LOC_BUILDER_DMM_STR({})`](LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - * , LOC_BUILDER_STR({ + * LOC_BUILDER_STR({ * label: "old-faithful", * str: "44.46046°N 110.82815°W", * alt: 2240, - * }) - * , LOC_BUILDER_STR({ + * }), + * LOC_BUILDER_STR({ * label: "ribblehead-viaduct", * str: "54.210436°N 2.370231°W", * alt: 300, - * }) - * , LOC_BUILDER_STR({ + * }), + * LOC_BUILDER_STR({ * label: "guinness-brewery", * str: "53°20′40″N 6°17′20″W", * alt: 300, - * }) - * ); - * + * }), + * END); * ``` * * Part of the series: - * * [`LOC()`](../domain/LOC.md) - build a `LOC` by supplying all 12 parameters - * * [`LOC_BUILDER_DD({})`](../record/LOC_BUILDER_DD.md) - accepts cartesian x, y - * * [`LOC_BUILDER_DMS_STR({})`](../record/LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E - * * [`LOC_BUILDER_DMM_STR({})`](../record/LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E - * * [`LOC_BUILDER_STR({})`](../record/LOC_BUILDER_STR.md) - tries the cooordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works + * * [`LOC()`](LOC.md) - build a `LOC` by supplying all 12 parameters + * * [`LOC_BUILDER_DD({})`](LOC_BUILDER_DD.md) - accepts cartesian x, y + * * [`LOC_BUILDER_DMS_STR({})`](LOC_BUILDER_DMS_STR.md) - accepts DMS 33°51′31″S 151°12′51″E + * * [`LOC_BUILDER_DMM_STR({})`](LOC_BUILDER_DMM_STR.md) - accepts DMM 25.24°S 153.15°E + * * [`LOC_BUILDER_STR({})`](LOC_BUILDER_STR.md) - tries the coordinate string in all `LOC_BUILDER_DM*_STR()` functions until one works * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/loc_builder_str */ @@ -1657,16 +1816,18 @@ declare function LOC_BUILDER_STR(opts: { label?: string; str: string; alt?: numb * DNSControl offers a `M365_BUILDER` which can be used to simply set up Microsoft 365 for a domain in an opinionated way. * * It defaults to a setup without support for legacy Skype for Business applications. - * It doesn't set up SPF or DMARC. See [`SPF_BUILDER`](/language-reference/record-modifiers/dmarc_builder) and [`DMARC_BUILDER`](/language-reference/record-modifiers/spf_builder). + * It doesn't set up SPF or DMARC. See [`SPF_BUILDER`](SPF_BUILDER.md) and [`DMARC_BUILDER`](DMARC_BUILDER.md). * * ## Example * * ### Simple example * * ```javascript - * M365_BUILDER({ - * initialDomain: "example.onmicrosoft.com", - * }); + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * M365_BUILDER("example.com", { + * initialDomain: "example.onmicrosoft.com", + * }), + * END); * ``` * * This sets up `MX` records, Autodiscover, and DKIM. @@ -1674,15 +1835,17 @@ declare function LOC_BUILDER_STR(opts: { label?: string; str: string; alt?: numb * ### Advanced example * * ```javascript - * M365_BUILDER({ - * label: "test", - * mx: false, - * autodiscover: false, - * dkim: false, - * mdm: true, - * domainGUID: "test-example-com", // Can be automatically derived in this case, if example.com is the context. - * initialDomain: "example.onmicrosoft.com", - * }); + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * M365_BUILDER("example.com", { + * label: "test", + * mx: false, + * autodiscover: false, + * dkim: false, + * mdm: true, + * domainGUID: "test-example-com", // Can be automatically derived in this case, if example.com is the context. + * initialDomain: "example.onmicrosoft.com", + * }), + * END); * ``` * * This sets up Mobile Device Management only. @@ -1712,8 +1875,8 @@ declare function M365_BUILDER(opts: { label?: string; mx?: boolean; autodiscover * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * MX("@", 5, "mail"), // mx example.com -> mail.example.com - * MX("sub", 10, "mail.foo.com.") - * ); + * MX("sub", 10, "mail.foo.com."), + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/mx @@ -1739,13 +1902,13 @@ declare function MX(name: string, priority: number, target: string, ...modifiers * // Replace the nameservers: * NAMESERVER("ns1.myserver.com."), * NAMESERVER("ns2.myserver.com."), - * ); + * END); * * D("example2.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * // Add these two additional nameservers to the existing list of nameservers. * NAMESERVER("ns1.myserver.com."), * NAMESERVER("ns2.myserver.com."), - * ); + * END); * ``` * * # The difference between NS() and NAMESERVER() @@ -1781,7 +1944,7 @@ declare function MX(name: string, priority: number, target: string, ...modifiers * If dnsconfig.js has zero `NAMESERVER()` commands for a domain, it will * use the API to remove all non-default nameservers. * - * If dnsconfig.js has 1 or more `NAMESERVER()` commands for a domain, it + * If `dnsconfig.js` has 1 or more `NAMESERVER()` commands for a domain, it * will use the API to add those nameservers (unless, of course, * they already exist). * @@ -1794,7 +1957,7 @@ declare function MX(name: string, priority: number, target: string, ...modifiers * var REG_THIRDPARTY = NewRegistrar("ThirdParty"); * D("example.com", REG_THIRDPARTY, * ... - * ) + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/nameserver @@ -1804,13 +1967,13 @@ declare function NAMESERVER(name: string, ...modifiers: RecordModifier[]): Domai /** * NAMESERVER_TTL sets the TTL on the domain apex NS RRs defined by [`NAMESERVER`](NAMESERVER.md). * - * The value can be an integer or a string. See [`TTL`](../record/TTL.md) for examples. + * The value can be an integer or a string. See [`TTL`](../record-modifiers/TTL.md) for examples. * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * NAMESERVER_TTL("2d"), - * NAMESERVER("ns") - * ); + * NAMESERVER("ns"), + * END); * ``` * * Use `NAMESERVER_TTL("3600"),` or `NAMESERVER_TTL("1h"),` for a 1h default TTL for all subsequent `NS` entries: @@ -1822,11 +1985,11 @@ declare function NAMESERVER(name: string, ...modifiers: RecordModifier[]): Domai * NAMESERVER("ns1.provider.com."), //inherits NAMESERVER_TTL * NAMESERVER("ns2.provider.com."), //inherits NAMESERVER_TTL * A("@","1.2.3.4"), // inherits DefaultTTL - * A("foo", "2.3.4.5", TTL(600)) // overrides DefaultTTL for this record only - * ); + * A("foo", "2.3.4.5", TTL(600)), // overrides DefaultTTL for this record only + * END); * ``` * - * To apply a default TTL to all other record types, see [`DefaultTTL`](../domain/DefaultTTL.md) + * To apply a default TTL to all other record types, see [`DefaultTTL`](../domain-modifiers/DefaultTTL.md) * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/nameserver_ttl */ @@ -1974,8 +2137,8 @@ declare function NAMESERVER_TTL(ttl: Duration): DomainModifier; * NAPTR("7", 10, 10, "u", "E2U+SIP", "!^.*$!sip:jane@example.com!", "."), * NAPTR("8", 10, 10, "u", "E2U+SIP", "!^.*$!sip:mike@example.com!", "."), * NAPTR("9", 10, 10, "u", "E2U+SIP", "!^.*$!sip:linda@example.com!", "."), - * NAPTR("0", 10, 10, "u", "E2U+SIP", "!^.*$!sip:fax@example.com!", ".") - * ); + * NAPTR("0", 10, 10, "u", "E2U+SIP", "!^.*$!sip:fax@example.com!", "."), + * END); * ``` * * Single e164 zone @@ -1983,8 +2146,8 @@ declare function NAMESERVER_TTL(ttl: Duration): DomainModifier; * D("4.3.2.1.5.5.5.0.0.8.1.e164.arpa.", REG_MY_PROVIDER, DnsProvider(R53), * NAPTR("@", 100, 50, "u", "E2U+SIP", "!^.*$!sip:customer-service@example.com!", "."), * NAPTR("@", 101, 50, "u", "E2U+email", "!^.*$!mailto:information@example.com!", "."), - * NAPTR("@", 101, 50, "u", "smtp+E2U", "!^.*$!mailto:information@example.com!", ".") - * ); + * NAPTR("@", 101, 50, "u", "smtp+E2U", "!^.*$!mailto:information@example.com!", "."), + * END); * ``` * * ### Examples for SIP: @@ -2002,7 +2165,7 @@ declare function NAMESERVER_TTL(ttl: Duration): DomainModifier; * A("sip", "192.0.2.2"), * AAAA("sip", "2001:db8::85a3"), * // and so on - * ); + * END); * ``` * * ### Other RFC based examples: @@ -2017,7 +2180,7 @@ declare function NAMESERVER_TTL(ttl: Duration): DomainModifier; * SRV("_z3950._tcp", 0, 0, 1000, "z3950.beast.example.com."), * SRV("_http._tcp", 10, 0, 80, "foo.example.com."), * // and so on - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/naptr @@ -2035,7 +2198,7 @@ declare function NAPTR(subdomain: string, order: number, preference: number, ter * By setting `NO_PURGE` on a domain, this tells DNSControl not to delete the * records found in the domain. * - * It is similar to [`IGNORE`](domain/IGNORE.md) but more general. + * It is similar to [`IGNORE`](IGNORE.md) but more general. * * The original reason for `NO_PURGE` was that a legacy system was adopting * DNSControl. Previously the domain was managed via Microsoft DNS Server's GUI. @@ -2050,13 +2213,13 @@ declare function NAPTR(subdomain: string, order: number, preference: number, ter * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NO_PURGE, - * A("foo","1.2.3.4") - * ); + * A("foo","1.2.3.4"), + * END); * ``` * * The main caveat of `NO_PURGE` is that intentionally deleting records becomes * more difficult. Suppose a `NO_PURGE` zone has an record such as A("ken", - * "1.2.3.4"). Removing the record from dnsconfig.js will not delete "ken" from + * "1.2.3.4"). Removing the record from `dnsconfig.js` will not delete "ken" from * the domain. DNSControl has no way of knowing the record was deleted from the * file The DNS record must be removed manually. Users of `NO_PURGE` are prone * to finding themselves with an accumulation of orphaned DNS records. That's easy @@ -2071,8 +2234,8 @@ declare function NAPTR(subdomain: string, order: number, preference: number, ter * * ## See also * - * * [`PURGE`](domain/PURGE.md) is the default, thus this command is a no-op - * * [`IGNORE`](domain/IGNORE.md) is similar to `NO_PURGE` but is more selective + * * [`PURGE`](PURGE.md) is the default, thus this command is a no-op + * * [`IGNORE`](IGNORE.md) is similar to `NO_PURGE` but is more selective * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/no_purge */ @@ -2092,7 +2255,7 @@ declare const NO_PURGE: DomainModifier; * NS("foo", "ns2.example2.com."), // Delegate ".foo.example.com" zone to another server. * A("ns1.example2.com", "10.10.10.10"), // Glue records * A("ns2.example2.com", "10.10.10.20"), // Glue records - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/ns @@ -2126,8 +2289,8 @@ declare function NS1_URLFWD(name: string, target: string, ...modifiers: RecordMo * var DNS_MYAWS = NewDnsProvider("myaws", "ROUTE53"); * * D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), - * A("@","1.2.3.4") - * ); + * A("@","1.2.3.4"), + * END); * ``` * * In [v3.16](../../v316.md) and later: @@ -2137,8 +2300,8 @@ declare function NS1_URLFWD(name: string, target: string, ...modifiers: RecordMo * var DNS_MYAWS = NewDnsProvider("myaws"); * * D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), - * A("@","1.2.3.4") - * ); + * A("@","1.2.3.4"), + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/top-level-functions/newdnsprovider @@ -2165,8 +2328,8 @@ declare function NewDnsProvider(name: string, type?: string, meta?: object): str * var DNS_MYAWS = NewDnsProvider("myaws", "ROUTE53"); * * D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), - * A("@","1.2.3.4") - * ); + * A("@","1.2.3.4"), + * END); * ``` * * In [v3.16](../../v316.md) and later: @@ -2176,8 +2339,8 @@ declare function NewDnsProvider(name: string, type?: string, meta?: object): str * var DNS_MYAWS = NewDnsProvider("myaws"); * * D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS), - * A("@","1.2.3.4") - * ); + * A("@","1.2.3.4"), + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/top-level-functions/newregistrar @@ -2203,7 +2366,7 @@ declare function PANIC(message: string): never; * * Target should be a string representing the FQDN of a host. Like all FQDNs in DNSControl, it must end with a `.`. * - * **Magic Mode:** + * # Magic Mode * * PTR records are complex and typos are common. Therefore DNSControl * enables features to save labor and @@ -2239,7 +2402,7 @@ declare function PANIC(message: string): never; * * `PTR("4.3", ...` // Assuming the domain is `2.1.in-addr.arpa` * * All magic is RFC2317-aware. We use the first format listed in the - * RFC for both [`REV()`](../global/REV.md) and `PTR()`. The format is + * RFC for both [`REV()`](../top-level-functions/REV.md) and `PTR()`. The format is * `FIRST/MASK.C.B.A.in-addr.arpa` where `FIRST` is the first IP address * of the zone, `MASK` is the netmask of the zone (25-31 inclusive), * and A, B, C are the first 3 octets of the IP address. For example @@ -2253,13 +2416,13 @@ declare function PANIC(message: string): never; * PTR("3", "baz.example.com."), * // If the first parameter is a valid IP address, DNSControl will generate the correct name: * PTR("1.2.3.10", "ten.example.com."), // "10" - * ); + * END); * ``` * * ```javascript * D(REV("9.9.9.128/25"), REGISTRAR, DnsProvider(BIND), * PTR("9.9.9.129", "first.example.com."), - * ); + * END); * ``` * * ```javascript @@ -2268,12 +2431,36 @@ declare function PANIC(message: string): never; * // If the first parameter is a valid IP address, DNSControl will generate the correct name: * PTR("2001:db8:302::2", "two.example.com."), // "2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0" * PTR("2001:db8:302::3", "three.example.com."), // "3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0" - * ); + * END); * ``` * - * In the future we plan on adding a flag to [`A()`](A.md) which will insert - * the correct PTR() record if the appropriate `.arpa` domain has been - * defined. + * # Automatic forward and reverse lookups + * + * DNSControl does not automatically generate forward and reverse lookups. However + * it is possible to write a macro that does this by using the + * [`D_EXTEND()`](../global/D_EXTEND.md) + * function to insert `A` and `PTR` records into previously-defined domains. + * + * ```javascript + * function FORWARD_AND_REVERSE(ipaddr, fqdn) { + * D_EXTEND(dom, + * A(fqdn, ipaddr) + * ); + * D_EXTEND(REV(ipaddr), + * PTR(ipaddr, fqdn) + * ); + * } + * + * D("example.com", REGISTRAR, DnsProvider(DSP_NONE), + * ..., + * END); + * D(REV("10.20.30.0/24"), REGISTRAR, DnsProvider(DSP_NONE), + * ..., + * END); + * + * FORWARD_AND_REVERSE("10.20.30.77", "foo.example.com."); + * FORWARD_AND_REVERSE("10.20.30.99", "bar.example.com."); + * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/ptr */ @@ -2300,7 +2487,7 @@ declare function PTR(name: string, target: string, ...modifiers: RecordModifier[ * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * PURGE, - * ); + * END); * ``` * * Since the "last command wins", this is the same as `PURGE`: @@ -2312,7 +2499,7 @@ declare function PTR(name: string, target: string, ...modifiers: RecordModifier[ * PURGE, * NO_PURGE, * PURGE, - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/purge @@ -2336,7 +2523,7 @@ declare const PURGE: DomainModifier; * * _S3 bucket_ (configured as website): specify the domain name of the Amazon S3 website endpoint in which you configured the bucket (for instance s3-website-us-east-2.amazonaws.com). For the available values refer to the [Amazon S3 Website Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region). * * _Another Route53 record_: specify the value of the name of another record in the same hosted zone. * - * For all the target type, excluding 'another record', you have to specify the `Zone ID` of the target. This is done by using the [`R53_ZONE`](../record/R53_ZONE.md) record modifier. + * For all the target type, excluding 'another record', you have to specify the `Zone ID` of the target. This is done by using the [`R53_ZONE`](../record-modifiers/R53_ZONE.md) record modifier. * * The zone id can be found depending on the target type: * @@ -2346,7 +2533,7 @@ declare const PURGE: DomainModifier; * * _S3 bucket_ (configured as website): specify the hosted zone ID for the region that you created the bucket in. You can find it in [the List of regions and hosted Zone IDs](https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) * * _Another Route 53 record_: you can either specify the correct zone id or do not specify anything and DNSControl will figure out the right zone id. (Note: Route53 alias can't reference a record in a different zone). * - * Target health evaluation can be enabled with the [`R53_EVALUATE_TARGET_HEALTH`](../record/R53\_EVALUATE\_TARGET\_HEALTH.md) record modifier. + * Target health evaluation can be enabled with the [`R53_EVALUATE_TARGET_HEALTH`](../record-modifiers/R53\_EVALUATE\_TARGET\_HEALTH.md) record modifier. * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider("ROUTE53"), @@ -2355,7 +2542,7 @@ declare const PURGE: DomainModifier; * R53_ALIAS("foo", "A", "blahblah.elasticloadbalancing.us-west-1.amazonaws.com.", R53_ZONE("Z368ELLRRE2KJ0"), R53_EVALUATE_TARGET_HEALTH(true)), // a classic ELB in us-west-1 with target health evaluation enabled * R53_ALIAS("foo", "A", "blahblah.elasticbeanstalk.us-west-2.amazonaws.com.", R53_ZONE("Z38NKT9BP95V3O")), // an Elastic Beanstalk environment in us-west-2 * R53_ALIAS("foo", "A", "blahblah-bucket.s3-website-us-west-1.amazonaws.com.", R53_ZONE("Z2F56UZL2M1ACD")), // a website S3 Bucket in us-west-1 - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/service-provider-specific/amazon-route-53/r53_alias @@ -2363,18 +2550,18 @@ declare const PURGE: DomainModifier; declare function R53_ALIAS(name: string, target: string, zone_idModifier: DomainModifier & RecordModifier, evaluatetargethealthModifier: RecordModifier): DomainModifier; /** - * `R53_EVALUATE_TARGET_HEALTH` lets you enable target health evaluation for a [`R53_ALIAS()`](../domain/R53_ALIAS.md) record. Omitting `R53_EVALUATE_TARGET_HEALTH()` from `R53_ALIAS()` set the behavior to false. + * `R53_EVALUATE_TARGET_HEALTH` lets you enable target health evaluation for a [`R53_ALIAS()`](../domain-modifiers/R53_ALIAS.md) record. Omitting `R53_EVALUATE_TARGET_HEALTH()` from `R53_ALIAS()` set the behavior to false. * * @see https://docs.dnscontrol.org/language-reference/record-modifiers/service-provider-specific/amazon-route-53/r53_evaluate_target_health */ declare function R53_EVALUATE_TARGET_HEALTH(enabled: boolean): RecordModifier; /** - * `R53_ZONE` lets you specify the AWS Zone ID for an entire domain ([`D()`](../global/D.md)) or a specific [`R53_ALIAS()`](../domain/R53_ALIAS.md) record. + * `R53_ZONE` lets you specify the AWS Zone ID for an entire domain ([`D()`](../top-level-functions/D.md)) or a specific [`R53_ALIAS()`](../domain-modifiers/R53_ALIAS.md) record. * - * When used with [`D()`](../global/D.md), it sets the zone id of the domain. This can be used to differentiate between split horizon domains in public and private zones. See this [example](../../providers/route53.md#split-horizon) in the [Amazon Route 53 provider page](../../providers/route53.md). + * When used with [`D()`](../top-level-functions/D.md), it sets the zone id of the domain. This can be used to differentiate between split horizon domains in public and private zones. See this [example](../../provider/route53.md#split-horizon) in the [Amazon Route 53 provider page](../../provider/route53.md). * - * When used with [`R53_ALIAS()`](../domain/R53_ALIAS.md) it sets the required Route53 hosted zone id in a R53_ALIAS record. See [`R53_ALIAS()`](../domain/R53_ALIAS.md) documentation for details. + * When used with [`R53_ALIAS()`](../domain-modifiers/R53_ALIAS.md) it sets the required Route53 hosted zone id in a R53_ALIAS record. See [`R53_ALIAS()`](../domain-modifiers/R53_ALIAS.md) documentation for details. * * @see https://docs.dnscontrol.org/language-reference/record-modifiers/service-provider-specific/amazon-route-53/r53_zone */ @@ -2384,60 +2571,122 @@ declare function R53_ZONE(zone_id: string): DomainModifier & RecordModifier; * `REV` returns the reverse lookup domain for an IP network. For * example `REV("1.2.3.0/24")` returns `3.2.1.in-addr.arpa.` and * `REV("2001:db8:302::/48")` returns `2.0.3.0.8.b.d.0.1.0.0.2.ip6.arpa.`. - * This is used in [`D()`](D.md) functions to create reverse DNS lookup zones. * - * This is a convenience function. You could specify `D("3.2.1.in-addr.arpa", - * ...` if you like to do things manually but why would you risk making - * typos? + * `REV()` is commonly used with the [`D()`](D.md) functions to create reverse DNS lookup zones. * - * `REV` complies with RFC2317, "Classless in-addr.arpa delegation" - * for netmasks of size /25 through /31. - * While the RFC permits any format, we abide by the recommended format: - * `FIRST/MASK.C.B.A.in-addr.arpa` where `FIRST` is the first IP address - * of the zone, `MASK` is the netmask of the zone (25-31 inclusive), - * and A, B, C are the first 3 octets of the IP address. For example - * `172.20.18.130/27` is located in a zone named - * `128/27.18.20.172.in-addr.arpa` + * These two are equivalent: * - * If the address does not include a "/" then `REV` assumes /32 for IPv4 addresses + * ```javascript + * D("3.2.1.in-addr.arpa", ... + * ``` + * + * ```javascript + * D(REV("1.2.3.0/24", ... + * ``` + * + * The latter is easier to type and less error-prone. + * + * If the address does not include a "/" then `REV()` assumes /32 for IPv4 addresses * and /128 for IPv6 addresses. * - * Note that the lower bits (the ones outside the netmask) must be zeros. They are not - * zeroed out automatically. Thus, `REV("1.2.3.4/24")` is an error. This is done - * to catch typos. + * # RFC compliance + * + * `REV()` implements both RFC 2317 and the newer RFC 4183. The `REVCOMPAT()` + * function selects which mode is used. If `REVCOMPAT()` is not called, a default + * is selected for you. The default will change to RFC 4183 in DNSControl v5.0. + * + * See [`REVCOMPAT()`](REVCOMPAT.md) for details. + * + * # Host bits + * + * v4.x: + * The host bits (the ones outside the netmask) must be zeros. They are not zeroed + * out automatically. Thus, `REV("1.2.3.4/24")` is an error. + * + * v5.0 and later: + * The host bits (the ones outside the netmask) are ignored. Thus + * `REV("1.2.3.4/24")` and `REV("1.2.3.0/24")` are equivalent. + * + * # Examples + * + * Here's an example reverse lookup domain: * * ```javascript * D(REV("1.2.3.0/24"), REGISTRAR, DnsProvider(BIND), * PTR("1", "foo.example.com."), * PTR("2", "bar.example.com."), * PTR("3", "baz.example.com."), - * // These take advantage of DNSControl's ability to generate the right name: + * // If the first parameter is an IP address, DNSControl automatically calls REV() for you. * PTR("1.2.3.10", "ten.example.com."), - * ); + * END); * * D(REV("2001:db8:302::/48"), REGISTRAR, DnsProvider(BIND), * PTR("1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0", "foo.example.com."), // 2001:db8:302::1 - * // These take advantage of DNSControl's ability to generate the right name: + * // If the first parameter is an IP address, DNSControl automatically calls REV() for you. * PTR("2001:db8:302::2", "two.example.com."), // 2.0.0... * PTR("2001:db8:302::3", "three.example.com."), // 3.0.0... - * ); + * END); * ``` * - * In the future we plan on adding a flag to [`A()`](../domain/A.md)which will insert - * the correct PTR() record in the appropriate `D(REV())` domain (i.e. `.arpa` domain) has been - * defined. + * # Automatic forward and reverse record generation + * + * DNSControl does not automatically generate forward and reverse lookups. However + * it is possible to write a macro that does this. See + * [`PTR()`](../domain/PTR.md) for an example. * * @see https://docs.dnscontrol.org/language-reference/top-level-functions/rev */ declare function REV(address: string): string; +/** + * `REVCOMPAT()` controls which RFC the [`REV()`](REV.md) function adheres to. + * + * Include one of these two commands near the top `dnsconfig.js` (at the global level): + * + * ```javascript + * REVCOMPAT("rfc2317"); // RFC 2117: Compatible with old files. + * REVCOMPAT("rfc4183"); // RFC 4183: Adopt the newer standard. + * ``` + * + * `REVCOMPAT()` is global for all of `dnsconfig.js`. It must appear before any + * use of `REV()`; If not, behavior is undefined. + * + * # RFC 4183 vs RFC 2317 + * + * RFC 2317 and RFC 4183 are two different ways to implement reverse lookups for + * CIDR blocks that are not on 8-bit boundaries (/24, /16, /8). + * + * Originally DNSControl implemented the older standard, which only specifies what + * to do for /8, /16, /24 - /32. Using `REV()` for /9-17 and /17-23 CIDRs was an + * error. + * + * v4 defaults to RFC 2317. In v5.0 the default will change to RFC 4183. + * `REVCOMPAT()` is provided for those that wish to retain the old behavior. + * + * For more information, see [Opinion #9](../../opinions.md#opinion-9-rfc-4183-is-better-than-rfc-2317). + * + * # Transition plan + * + * What's the default behavior if `REVCOMPAT()` is not used? + * + * | Version | /9 to /15 and /17 to /23 | /25 to 32 | Warnings | + * |---------|--------------------------|-----------|----------------------------| + * | v4 | RFC 4183 | RFC 2317 | Only if /25 - /32 are used | + * | v5 | RFC 4183 | RFC 4183 | none | + * + * No warnings are generated if the `REVCOMPAT()` function is used. + * + * @see https://docs.dnscontrol.org/language-reference/top-level-functions/revcompat + */ +declare function REVCOMPAT(rfc: string): string; + /** * `SOA` adds an `SOA` record to a domain. The name should be `@`. ns and mbox are strings. The other fields are unsigned 32-bit ints. * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * SOA("@", "ns3.example.com.", "hostmaster@example.com", 3600, 600, 604800, 1440), - * ); + * END); * ``` * * If you accidentally include an `@` in the email field DNSControl will quietly @@ -2449,7 +2698,7 @@ declare function REV(address: string): string; * * Most providers automatically generate SOA records. They will ignore any `SOA()` statements. * * The mbox field should not be set to a real email address unless you love spam and hate your privacy. * - * There is more info about `SOA` in the documentation for the [BIND provider](../../providers/bind.md). + * There is more info about `SOA` in the documentation for the [BIND provider](../../provider/bind.md). * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/soa */ @@ -2471,8 +2720,8 @@ declare function SOA(name: string, ns: string, mbox: string, refresh: number, re * * ```javascript * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - * TXT("v=spf1 ip4:198.252.206.0/24 ip4:192.111.0.0/24 include:_spf.google.com include:mailgun.org include:spf-basic.fogcreek.com include:mail.zendesk.com include:servers.mcsv.net include:sendgrid.net include:450622.spf05.hubspotemail.net ~all") - * ) + * TXT("v=spf1 ip4:198.252.206.0/24 ip4:192.111.0.0/24 include:_spf.google.com include:mailgun.org include:spf-basic.fogcreek.com include:mail.zendesk.com include:servers.mcsv.net include:sendgrid.net include:450622.spf05.hubspotemail.net ~all"), + * END) * ``` * * This has a few problems: @@ -2510,7 +2759,7 @@ declare function SOA(name: string, ns: string, mbox: string, refresh: number, re * "450622.spf05.hubspotemail.net" // Rationale: Unlikely to change without warning. * ] * }), - * ); + * END); * ``` * * By using the `SPF_BUILDER()` we gain many benefits: @@ -2545,7 +2794,7 @@ declare function SOA(name: string, ns: string, mbox: string, refresh: number, re * }), * ... * ... - * ); + * END); * ``` * * The parameters are: @@ -2728,12 +2977,12 @@ declare function SOA(name: string, ns: string, mbox: string, refresh: number, re * }); * * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - * SPF_MYSETTINGS - * ); + * SPF_MYSETTINGS, + * END); * * D("example2.tld", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), - * SPF_MYSETTINGS - * ); + * SPF_MYSETTINGS, + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/spf_builder @@ -2751,7 +3000,7 @@ declare function SPF_BUILDER(opts: { label?: string; overflow?: string; overhead * // pr w port, target * SRV("_sip._tcp", 10, 60, 5060, "bigbox.example.com."), * SRV("_sip._tcp", 10, 20, 5060, "smallbox1.example.com."), - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/srv @@ -2782,13 +3031,34 @@ declare function SRV(name: string, priority: number, weight: number, port: numbe * `value` is the fingerprint as a string. * * ```javascript - * SSHFP("@", 1, 1, "00yourAmazingFingerprint00"), + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * SSHFP("@", 1, 1, "00yourAmazingFingerprint00"), + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/sshfp */ declare function SSHFP(name: string, algorithm: 0 | 1 | 2 | 3 | 4, type: 0 | 1 | 2, value: string, ...modifiers: RecordModifier[]): DomainModifier; +/** + * SVCB adds an SVCB record to a domain. The name should be the relative label for the record. Use `@` for the domain apex. + * + * The priority must be a positive number, the address should be an ip address, either a string, or a numeric value obtained via [IP](../top-level-functions/IP.md). + * + * The params may be configured to specify the `alpn`, `ipv4hint`, `ipv6hint`, `ech` or `port` setting. Several params may be joined by a space. Not existing params may be specified as an empty string `""` + * + * Modifiers can be any number of [record modifiers](https://docs.dnscontrol.org/language-reference/record-modifiers) or JSON objects, which will be merged into the record's metadata. + * + * ```javascript + * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), + * SVCB("@", 1, ".", "ipv4hint=123.123.123.123 alpn=h3,h2 port=443"), + * END); + * ``` + * + * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/svcb + */ +declare function SVCB(name: string, priority: number, target: string, params: string, ...modifiers: RecordModifier[]): DomainModifier; + /** * `TLSA` adds a `TLSA` record to a domain. The name should be the relative label for the record. * @@ -2800,7 +3070,7 @@ declare function SSHFP(name: string, algorithm: 0 | 1 | 2 | 3 | 4, type: 0 | 1 | * D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), * // Create TLSA record for certificate used on TCP port 443 * TLSA("_443._tcp", 3, 1, 1, "abcdef0"), - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/tlsa @@ -2809,7 +3079,7 @@ declare function TLSA(name: string, usage: number, selector: number, type: numbe /** * TTL sets the TTL for a single record only. This will take precedence - * over the domain's [DefaultTTL](../domain/DefaultTTL.md) if supplied. + * over the domain's [DefaultTTL](../domain-modifiers/DefaultTTL.md) if supplied. * * The value can be: * @@ -2833,7 +3103,7 @@ declare function TLSA(name: string, usage: number, selector: number, type: numbe * A("foo", "2.3.4.5", TTL(500)), // overrides default * A("demo1", "3.4.5.11", TTL("5d")), // 5 days * A("demo2", "3.4.5.12", TTL("5w")), // 5 weeks - * ); + * END); * ``` * * @see https://docs.dnscontrol.org/language-reference/record-modifiers/ttl @@ -2860,8 +3130,8 @@ declare function TTL(ttl: Duration): RecordModifier; * TXT("multiple", ["one", "two", "three"]), // Multiple strings * TXT("quoted", "any "quotes" and escapes? ugh; no worries!"), * TXT("_domainkey", "t=y; o=-;"), // Escapes are done for you automatically. - * TXT("long", "X".repeat(300)) // Long strings are split automatically. - * ); + * TXT("long", "X".repeat(300)), // Long strings are split automatically. + * END); * ``` * * NOTE: In the past, long strings had to be annotated with the keyword @@ -2913,7 +3183,7 @@ declare function TTL(ttl: Duration): RecordModifier; * * #### How can you tell if a provider will support a particular `TXT()` record? * - * Include the `TXT()` record in a [`D()`](../global/D.md) as usual, along + * Include the `TXT()` record in a [`D()`](../top-level-functions/D.md) as usual, along * with the `DnsProvider()` for that provider. Run `dnscontrol check` to * see if any errors are produced. The check command does not talk to * the provider's API, thus permitting you to do this without having an diff --git a/web/index.html b/web/index.html deleted file mode 100644 index 84494049..00000000 --- a/web/index.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - A free subdomain for developers on the web - - - - - - - - - - - - - -
-
- https://.is-an.app -
-
-

- Are you a developer exploring an awesome domain name for your application, personal website, or project? - You came to the right place! -

-

- This service offers a handy subdomain service for you to have a subdomain via CNAME, - A, AAAA, or NS DNS records. - In limited cases, you can use a wildcard subdomain. -

-

- Fork the repository, add a subdomain, and send a Pull Request. We will make it - work! -

-

- Crafted with ❤ by @tarampampam -

-
-
- - - - - diff --git a/web/webmanifest.json b/web/webmanifest.json deleted file mode 100644 index 634e07af..00000000 --- a/web/webmanifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "", - "short_name": "", - "icons": [ - { - "src": "/favicon/android-chrome-144x144.png", - "sizes": "144x144", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} diff --git a/zones/1bt.uk.js b/zones/1bt.uk.js new file mode 100644 index 00000000..99737d4b --- /dev/null +++ b/zones/1bt.uk.js @@ -0,0 +1,20 @@ +// read more about the dnscontrol tool here: + +D('1bt.uk', NewRegistrar('none'), DnsProvider(NewDnsProvider('cloudflare')), DefaultTTL(1), + // service records + TXT("@", "v=spf1 -all"), + TXT("_dmarc", "v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s;"), + TXT("*._domainkey", "v=DKIM1; p="), + + // cloudflare redirect www to the root domain + A("www", "192.0.2.1", CF_PROXY_ON), + AAAA("www", "100::", CF_PROXY_ON), + + // redirect 1bt.uk -> is-an.app + A("@", "192.0.2.1", CF_PROXY_ON), + AAAA("@", "100::", CF_PROXY_ON), + + // subdomains, given for free previously + CNAME("domjs", "sx-9.github.io.", CF_PROXY_ON), + CNAME("zeusgang", "zeusgangproject.github.io.", CF_PROXY_ON), +END) diff --git a/zones/is-an.app.js b/zones/is-an.app.js new file mode 100644 index 00000000..4cdc7ab1 --- /dev/null +++ b/zones/is-an.app.js @@ -0,0 +1,52 @@ +// read more about the dnscontrol tool here: + +D('is-an.app', NewRegistrar('none'), DnsProvider(NewDnsProvider('cloudflare')), DefaultTTL(1), + // service records + TXT('_dmarc', 'v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s;'), + TXT('*._domainkey', 'v=DKIM1; p='), + TXT('@', 'v=spf1 -all'), + + // cloudflare redirect www to the root domain + A('www', '192.0.2.1', CF_PROXY_ON), + AAAA('www', '100::', CF_PROXY_ON), + + // index page (github pages) + A('@', '185.199.111.153'), + A('@', '185.199.110.153'), + A('@', '185.199.109.153'), + A('@', '185.199.108.153'), + AAAA('@', '2606:50c0:8003::153'), + AAAA('@', '2606:50c0:8002::153'), + AAAA('@', '2606:50c0:8001::153'), + AAAA('@', '2606:50c0:8000::153'), + + // subdomains, given for free previously + A('medlexo', '185.27.134.137', CF_PROXY_ON), + CNAME('abhirockz', 'yopremium21.github.io.'), + CNAME('aviana', 'cname.vercel-dns.com.'), + CNAME('azumi', 'azumi-development.github.io.', CF_PROXY_ON), + CNAME('blog.azumi', 'hashnode.network.'), + CNAME('docs.azumi', 'azumidocs.github.io.'), + CNAME('cat', 'cname.vercel-dns.com.'), + CNAME('codedit', 'cname.vercel-dns.com.', CF_PROXY_ON), + CNAME('devprofiles', 'cname.vercel-dns.com.'), + CNAME('devtweet', 'cname.vercel-dns.com.'), + CNAME('dishdiscovery', 'cname.vercel-dns.com.'), + CNAME('flier', 'cname-china.vercel-dns.com.'), + CNAME('geo', 'gopirathod.github.io.'), + CNAME('gravity', 'cname.vercel-dns.com.', CF_PROXY_ON), + CNAME('indexer', 'oshekharo.github.io.'), + CNAME('linkkar', 'cname.vercel-dns.com.', CF_PROXY_ON), + CNAME('lunaori', 'app-220.pages.dev.'), + CNAME('morpion', 'nonolanlan1007.github.io.'), + CNAME('nikudizer', 'fabiusbile.github.io.', CF_PROXY_ON), + CNAME('oop', 'sergeyverevkin.github.io.'), + CNAME('postit', 'cname.vercel-dns.com.', CF_PROXY_ON), + CNAME('qwertx', 'notqwertz.github.io.'), + CNAME('rewards', 'legendsayantan.github.io.'), + CNAME('samyakgptui', 'cname.vercel-dns.com.', CF_PROXY_ON), + CNAME('shredmod', 'shredmod.github.io.', CF_PROXY_ON), + CNAME('smp', 'yandao0313.github.io.'), + CNAME('snapscript', 'cname.vercel-dns.com.'), + CNAME('yt2mp3', 'cname.vercel-dns.com.'), +END)