Merge branch 'main' into main

This commit is contained in:
Artem Makarov
2025-04-04 11:30:37 +03:00
committed by GitHub
33 changed files with 153 additions and 175 deletions
-7
View File
@@ -10,7 +10,6 @@ on:
- "tests/*"
- "util/*"
- ".github/workflows/ci.yml"
- "dnsconfig.js"
workflow_dispatch:
@@ -44,11 +43,5 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
- name: Run DNSControl tests
if: github.event_name == 'pull_request' && contains(fromJson(env.CHANGED_FILES), 'dnsconfig.js')
uses: is-a-dev/dnscontrol-action@main
with:
args: check
- name: Run tests
run: npx ava tests/*.test.js --timeout=1m
+25
View File
@@ -0,0 +1,25 @@
name: DNSControl
on:
push:
branches: [main]
paths:
- ".github/workflows/dnscontrol.yml"
- "dnsconfig.js"
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-dnscontrol
cancel-in-progress: true
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: is-a-dev/dnscontrol-action@main
with:
args: check
+6 -3
View File
@@ -1,12 +1,15 @@
name: Pull Request Labeler
name: Label
on:
schedule:
- cron: "*/10 * * * *"
jobs:
labeler:
pull-requests:
name: Pull Requests
runs-on: ubuntu-latest
steps:
- uses: docker://docker.io/ilyam8/periodic-pr-labeler:v0.1.1
- uses: ilyam8/periodic-pr-labeler@v0.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
-5
View File
@@ -22,11 +22,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Run DNSControl tests
uses: is-a-dev/dnscontrol-action@main
with:
args: check
- name: Generate creds.json
run: echo '{"cloudflare":{"TYPE":"CLOUDFLAREAPI","apitoken":"$CLOUDFLARE_API_TOKEN"}}' > ./creds.json
+6 -4
View File
@@ -1,12 +1,14 @@
name: StaleBOT
name: Stale
on:
workflow_dispatch:
schedule:
- cron: "30 14 * * *"
- cron: "0 12 * * *"
workflow_dispatch:
jobs:
stale:
label:
name: Label
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
+1 -1
View File
@@ -35,7 +35,7 @@ Not all of these will be posted on GitHub[^1], however they will always be poste
### NS Records
When applying for NS records, please be aware we already support a [wide range of DNS records](https://docs.is-a.dev/faq/#which-records-are-supported), so you may not need them.
In your PR, please explain why you need NS records, including examples, to help mitigate potential abuse. Refer to the [FAQ](https://docs.is-a.dev/faq/#who-can-use-ns-records) for guidelines on allowed usage. Good examples of NS record requests are [#17592](https://github.com/is-a-dev/register/pull/17592) and [#18026](https://github.com/is-a-dev/register/pull/18026).
In your PR, please explain why you need NS records, including examples, to help mitigate potential abuse. Refer to the [FAQ](https://docs.is-a.dev/faq/#who-can-use-ns-records) for guidelines on allowed usage.
***Pull requests adding NS records without sufficient reasoning will be closed.***
-3
View File
@@ -133,7 +133,6 @@ for (var subdomain in domains) {
// Handle URL records
if (domainData.record.URL) {
records.push(A(subdomainName, IP("192.0.2.1"), CF_PROXY_ON));
records.push(TXT("_redirect." + subdomainName, "\"" + domainData.record.URL + "\""));
}
}
@@ -150,8 +149,6 @@ for (var i = 0; i < reserved.length; i++) {
) {
records.push(A(subdomainName, IP("192.0.2.1"), CF_PROXY_ON));
}
records.push(TXT("_redirect." + subdomainName, "\"https://is-a.dev/reserved\""));
}
var options = {
-11
View File
@@ -1,11 +0,0 @@
{
"owner": {
"username": "ThangLe9999",
"discord": "872078632565215282",
"OWL": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiUlNBLU9BRVAiLCJraWQiOiJaa1VsRmRqVThiUEstLXVVM2JJR09PVHFYYVFFS1ZINFVXOW53MTR6WTJnIn0.G5BtkuOaAUmFdixUP1IN4ZTmec-NZCllzsliK6q8sggJkBzasXefGfeEh6pBOiZ6ZkV2gr-GCdTN7LkP7QLPgLN6FglXac8BP1DSGDF3Lo8ULvrM-CpLUdeR0mqes6OQVvWdmPhZgVFGF3ItzDXQ7SqB6zrMbEWEwuZeg2KLHyPqvHsdrWLjzNpvVUwZRBuxicPyNTT70oMbPaOn3cvg4J_mVxNywnrIY5F34-T4tmiOEijsHmPwG2RzHsTCzC3cGYfNmokQtAsL0jhIMH4GzYdbTUsjDOrqbLdT-W2y33pQkeQuCjdf8KkeYCfacE0oWAZKFhrW2X0zJLYvGQBeuw.3qY1yT9H2x2WH2DePTziiw.PJvjWBGxfTgCKqZiHuAsRaUEdjld3XeMAw7NwX9P28VSFOS3-xsSiOvbLrCo1n1nTF-4g8EIRkkFJPn2P1T6YUDNuHVqbvnGg2wfhpfdSaM.yxghx67x9iGLMjDEKJdeAw"
},
"record": {
"TXT": "dh=8d98fb5fefbb1915e89d5dc43c9fdd9fa801557f"
}
}
@@ -1,9 +0,0 @@
{
"owner": {
"username": "riviox",
"email": "rivioxyt@hotmail.com"
},
"record": {
"TXT": "15bce163359555d636e6bd2cc5903f"
}
}
+1 -1
View File
@@ -9,7 +9,7 @@
"priority": 0,
"weight": 5,
"port": 32279,
"target": "gold.magmanode.com"
"target": "mc.3gee.is-a.dev"
}
]
}
-9
View File
@@ -1,9 +0,0 @@
{
"owner": {
"username": "chewieleaf",
"email": "cchirrpy@outlook.com"
},
"record": {
"TXT": "dh=440ef941b9b55391f86cf985e87ed861fc6e9512"
}
}
-11
View File
@@ -1,11 +0,0 @@
{
"description": "api for karyakarsa",
"repo": "https://github.com/WilloIzCitron/karyakarsa-rest-api",
"owner": {
"username": "WilloIzCitron",
"twitter": "willoizcitron"
},
"record": {
"CNAME": "karyakarsa-rest-api-production.up.railway.app"
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"owner": {
"username": "alvinsjoy",
"discord": "825382504353234954"
},
"record": {
"TXT": "Created to allow nested subdomains to exist."
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"owner": {
"username": "akk1to",
"email": "akk1to.dev@gmail.com",
"discord": "727497287777124414"
},
"record": {
"TXT": "Created to allow nested subdomains to exist."
}
}
-9
View File
@@ -1,9 +0,0 @@
{
"owner": {
"username": "cedrickdev",
"email": "cedrickv.tchindaf@hes-so.ch"
},
"record": {
"CNAME": "cedrickfeze.vercel.app"
}
}
-10
View File
@@ -1,10 +0,0 @@
{
"owner": {
"username": "chewieleaf",
"email": "cchirrpy@outlook.com",
"discord": "898255050592366642"
},
"record": {
"TXT": "dh=440ef941b9b55391f86cf985e87ed861fc6e9512"
}
}
+12
View File
@@ -0,0 +1,12 @@
{
"owner": {
"username": "turbomaster95",
"email": "devamidhun.3c.kmbvm@gmail.com"
},
"record": {
"NS": [
"aria.ns.cloudflare.com",
"leonard.ns.cloudflare.com"
]
}
}
-9
View File
@@ -1,9 +0,0 @@
{
"owner": {
"username": "YeahhColix",
"email": "yeahhcolix@gmail.com"
},
"record": {
"CNAME": "colix.pages.dev"
}
}
-9
View File
@@ -1,9 +0,0 @@
{
"owner": {
"username": "DenisKlimenko",
"email": "denis.klimenko.92@gmail.com"
},
"record": {
"NS": ["destiny.ns.cloudflare.com", "kirk.ns.cloudflare.com"]
}
}
+2 -2
View File
@@ -1,9 +1,9 @@
{
"owner": {
"username": "exrand",
"username": "randomyaps",
"email": "totallynota903@gmail.com"
},
"record": {
"A": ["207.180.248.6"]
"A": ["212.91.26.79"]
}
}
-9
View File
@@ -1,9 +0,0 @@
{
"owner": {
"username": "xqxyzl",
"email": "exemailhelp+3@gmail.com"
},
"record": {
"TXT": "_discord.exx.is-a.dev"
}
}
-10
View File
@@ -1,10 +0,0 @@
{
"owner": {
"username": "FaultyFaulty-glitch",
"email": "faultywindows+github@gmail.com",
"discord": "1041028534690386051"
},
"record": {
"TXT": "google-site-verification=ix1jczu2q87igryc4eaexvdv1vrzjxolu14sjfpsnko"
}
}
-9
View File
@@ -1,9 +0,0 @@
{
"owner": {
"username": "jacksoncraft859",
"email": "pollardjackson@outlook.com"
},
"record": {
"TXT": "replit-verify=ac38945f-f53b-4b1b-980d-e2a1d64175c6"
}
}
-13
View File
@@ -1,13 +0,0 @@
{
"description": "🌸 This is nicer with it's own site of discord app named Luo Xiaohei",
"repo": "https://github.com/lxhapp/lxhapp.github.io",
"owner": {
"username": "Melishy",
"email": "themelishy@outlook.com",
"twitter": "themelishy",
"discord": "1053012080812359750"
},
"record": {
"CNAME": "lxhapp.github.io"
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"owner": {
"username": "3geETR",
"email": "egemacun@gmail.com"
},
"record": {
"CNAME": "gold.magmanode.com"
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"owner": {
"username": "reejit",
"email": "guardiansofspartax@gmail.com"
},
"record": {
"NS": ["gloria.ns.cloudflare.com", "west.ns.cloudflare.com"]
}
}
-9
View File
@@ -1,9 +0,0 @@
{
"owner": {
"username": "thangle9999",
"discord": "thangle9999"
},
"record": {
"TXT": "vc-domain-verify=thangle.is-a.dev,bd6f80914ee2949ce900"
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"owner": {
"username": "thinhdnn",
"email": "nguyenvanthinh.dnn@gmail.com"
},
"record": {
"A": ["152.69.196.244"]
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"description": "vulehuan.is-a.dev : This is my personal notebook",
"owner": {
"username": "vulehuan",
"email": "vulehuan@gmail.com"
},
"record": {
"URL": "https://vulehuan.com"
}
}
-12
View File
@@ -1,12 +0,0 @@
{
"owner": {
"username": "wdhdev",
"email": "william@is-a.dev"
},
"record": {
"URL": "https://william.is-a.dev"
},
"redirect_config": {
"redirect_paths": true
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"owner": {
"username": "yunexiz",
"discord": "1040303561847881729"
},
"record": {
"CNAME": "redirecting-for-yu.pages.dev"
}
}
+14 -9
View File
@@ -24,26 +24,31 @@ function getDomainData(subdomain) {
t("Nested subdomains should not exist without a parent subdomain", (t) => {
files.forEach((file) => {
const subdomain = file.replace(/\.json$/, "");
const parentDomain = subdomain.split(".").reverse()[0];
const parts = subdomain.split(".");
for (let i = 1; i < parts.length; i++) {
const parent = parts.slice(i).join(".");
if (parent.startsWith("_")) continue;
if (parentDomain !== subdomain) {
t.true(
parentDomain && files.includes(`${parentDomain}.json`),
`${file}: Parent subdomain does not exist`
files.includes(`${parent}.json`),
`${file}: Parent subdomain "${parent}" does not exist`
);
}
});
});
t("Nested subdomains should not exist if the parent subdomain has NS records", (t) => {
t("Nested subdomains should not exist if any parent subdomain has NS records", (t) => {
files.forEach((file) => {
const subdomain = file.replace(/\.json$/, "");
const parentDomain = subdomain.split(".").reverse()[0];
const parts = subdomain.split(".");
if (parentDomain !== subdomain) {
const parentData = getDomainData(parentDomain);
for (let i = 1; i < parts.length; i++) {
const parent = parts.slice(i).join(".");
if (parent.startsWith("_") || !files.includes(`${parent}.json`)) continue;
const parentData = getDomainData(parent);
t.true(!parentData.record.NS, `${file}: Parent subdomain has NS records`);
t.true(!parentData.record.NS, `${file}: Parent subdomain "${parent}" has NS records`);
}
});
});
+21 -1
View File
@@ -216,7 +216,10 @@ function validateRecordValues(t, data, file) {
Number.isInteger(record.matchingType) && record.matchingType >= 0 && record.matchingType <= 255,
`${file}: Invalid matchingType for ${key} at index ${idx}`
);
t.true(isValidHexadecimal(record.certificate), `${file}: Invalid certificate for ${key} at index ${idx}`);
t.true(
isValidHexadecimal(record.certificate),
`${file}: Invalid certificate for ${key} at index ${idx}`
);
}
});
}
@@ -310,3 +313,20 @@ t("All files should have valid record types", (t) => {
t.pass();
});
t("Root subdomains should have at least one usable record", (t) => {
const usableRecordTypes = ["A", "AAAA", "CNAME", "MX", "NS", "URL"];
files.forEach((file) => {
const subdomain = file.replace(/\.json$/, "");
if (subdomain.includes(".") || subdomain.startsWith("_")) return;
const data = getDomainData(file);
const recordKeys = Object.keys(data.record);
t.true(
usableRecordTypes.some((record) => recordKeys.includes(record)),
`${file}: Root subdomains must have at least one A, AAAA, CNAME, MX, NS, or URL record`
);
});
});