diff --git a/dnsconfig.js b/dnsconfig.js index c2ee90aa03..833d3d6a58 100644 --- a/dnsconfig.js +++ b/dnsconfig.js @@ -159,6 +159,16 @@ for (var subdomain in domains) { if (data.services.bluesky) { records.push(TXT("_atproto." + subdomainName, "\"" + data.services.bluesky + "\"")); } + + if (data.services.gitlab) { + if (Array.isArray(data.services.gitlab)) { + for (var txt in data.services.gitlab) { + records.push(TXT("_gitlab-pages-verification-code." + subdomainName, "\"" + data.services.gitlab[txt] + "\"")); + } + } else { + records.push(TXT("_gitlab-pages-verification-code." + subdomainName, "\"" + data.services.gitlab + "\"")); + } + } } } diff --git a/domains/_discord.aryan-gupta.json b/domains/_discord.aryan-gupta.json deleted file mode 100644 index 1477e98d48..0000000000 --- a/domains/_discord.aryan-gupta.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "Apoo711", - "email": "aryan18guptaggs@gmail.com" - }, - "records": { - "TXT": "dh=1b2d00cb449cab67bedd1c9f40961835a261a92d" - } -} diff --git a/domains/_github-pages-challenge-sharafatkarim.sharafat.json b/domains/_github-pages-challenge-sharafatkarim.sharafat.json new file mode 100644 index 0000000000..8256d40c51 --- /dev/null +++ b/domains/_github-pages-challenge-sharafatkarim.sharafat.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "SharafatKarim", + "email": "sharafat2004@gmail.com" + }, + "records": { + "TXT": "e825ca76e3de3ae6b513ac4ff35726" + } +} diff --git a/domains/_gitlab-pages-verification-code.frost-voltage-wiki.json b/domains/_gitlab-pages-verification-code.frost-voltage-wiki.json deleted file mode 100644 index 9fa66a5e5d..0000000000 --- a/domains/_gitlab-pages-verification-code.frost-voltage-wiki.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "Karan-Frost", - "email": "frost.github@gmail.com" - }, - "records": { - "TXT": "gitlab-pages-verification-code=57f76737bb8badd568b055bc4ff9d405" - } -} diff --git a/domains/_gitlab-pages-verification-code.meerkats.shays.json b/domains/_gitlab-pages-verification-code.meerkats.shays.json deleted file mode 100644 index 6f4ce4dacd..0000000000 --- a/domains/_gitlab-pages-verification-code.meerkats.shays.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "SHays24", - "email": "SHays24@student.sacs.nsw.edu.au" - }, - "records": { - "TXT": "gitlab-pages-verification-code=621b768139e0bfaf6eb43d60db03cabf" - } -} diff --git a/domains/_gitlab-pages-verification-code.pinage404.json b/domains/_gitlab-pages-verification-code.pinage404.json deleted file mode 100644 index 701ef97502..0000000000 --- a/domains/_gitlab-pages-verification-code.pinage404.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "pinage404", - "email": "pinage404+is-a.dev@gmail.com" - }, - "records": { - "TXT": "gitlab-pages-verification-code=d43eb39124dec340bdbb11a4d6aa6b52" - } -} diff --git a/domains/_gitlab-pages-verification-code.pretzel.json b/domains/_gitlab-pages-verification-code.pretzel.json deleted file mode 100644 index 81dc1f268e..0000000000 --- a/domains/_gitlab-pages-verification-code.pretzel.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "tobaiscrowley", - "discord": "gus_polinksi" - }, - "records": { - "TXT": "gitlab-pages-verification-code=d1d70cb094c2f16f83caed76145fc105" - } -} diff --git a/domains/_gitlab-pages-verification-code.sadkon.json b/domains/_gitlab-pages-verification-code.sadkon.json deleted file mode 100644 index 28e2168831..0000000000 --- a/domains/_gitlab-pages-verification-code.sadkon.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "MohammedKHC0", - "email": "mohammedkhc@outlook.com" - }, - "records": { - "TXT": "gitlab-pages-verification-code=478e4a7c8445704809ba0fa31e003df3" - } -} diff --git a/domains/_vercel.adhl.json b/domains/_vercel.adhl.json deleted file mode 100644 index abdb4eb15b..0000000000 --- a/domains/_vercel.adhl.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "adhl-0216", - "email": "hanlim2002@gmail.com" - }, - "records": { - "TXT": "vc-domain-verify=adhl.is-a.dev,c29a7cbae5de907f4347" - } -} diff --git a/domains/_vercel.aimaneammar.json b/domains/_vercel.aimaneammar.json deleted file mode 100644 index b2f496c841..0000000000 --- a/domains/_vercel.aimaneammar.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "AymanAegon", - "email": "ayo12ammar24@gmail.com" - }, - "records": { - "TXT": "vc-domain-verify=aimaneammar.is-a.dev,4b673716f741e17e5281" - } -} diff --git a/domains/_vercel.illy.json b/domains/_vercel.illy.json deleted file mode 100644 index 37fd31f2ec..0000000000 --- a/domains/_vercel.illy.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "illy-dev", - "email": "illythehase@gmail.com" - }, - "records": { - "TXT": "vc-domain-verify=illy.is-a.dev,043aa6b06299bebf5ad1" - } -} diff --git a/domains/_vercel.trild.json b/domains/_vercel.trild.json deleted file mode 100644 index 31d287648a..0000000000 --- a/domains/_vercel.trild.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "tuoitho", - "email": "tuoithokhoc1414@gmail.com" - }, - "records": { - "TXT": "vc-domain-verify=trild.is-a.dev,c355ae3f7ef9923a15c4" - } -} diff --git a/domains/_vercel.yashvs.json b/domains/_vercel.yashvs.json deleted file mode 100644 index f0c90425cf..0000000000 --- a/domains/_vercel.yashvs.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "pythonicboat", - "email": "vs21yash@gmail.com" - }, - "records": { - "TXT": "vc-domain-verify=yashvs.is-a.dev,c288565fced784647cef" - } -} diff --git a/domains/adhl.json b/domains/adhl.json index 3e3a3a4a17..0456f273e8 100644 --- a/domains/adhl.json +++ b/domains/adhl.json @@ -1,9 +1,12 @@ { - "owner": { - "username": "adhl-0216", - "email": "hanlim2002@gmail.com" - }, - "records": { - "CNAME": "cname.vercel-dns.com" - } -} + "owner": { + "username": "adhl-0216", + "email": "hanlim2002@gmail.com" + }, + "records": { + "CNAME": "cname.vercel-dns.com" + }, + "services": { + "vercel": "vc-domain-verify=adhl.is-a.dev,c29a7cbae5de907f4347" + } +} \ No newline at end of file diff --git a/domains/aga.json b/domains/aga.json index 76d471478f..ed8e1202f6 100644 --- a/domains/aga.json +++ b/domains/aga.json @@ -9,6 +9,9 @@ "TXT": "google-site-verification=p24qfEdTMTlahtU3hQxVU_txDQkifpoJH1xS4jmCmlw" }, "services": { - "vercel": "vc-domain-verify=aga.is-a.dev,c9684d0007365a74f553" + "vercel": [ + "vc-domain-verify=aga.is-a.dev,c9684d0007365a74f553", + "vc-domain-verify=www.aga.is-a.dev,60923a901e9bb8670c51" + ] } } diff --git a/domains/aimaneammar.json b/domains/aimaneammar.json index 70689625dc..19affd7a10 100644 --- a/domains/aimaneammar.json +++ b/domains/aimaneammar.json @@ -1,9 +1,12 @@ { - "owner": { - "username": "AymanAegon", - "email": "ayo12ammar24@gmail.com" - }, - "records": { - "CNAME": "ayman-portfolio-fawn.vercel.app" - } -} + "owner": { + "username": "AymanAegon", + "email": "ayo12ammar24@gmail.com" + }, + "records": { + "CNAME": "ayman-portfolio-fawn.vercel.app" + }, + "services": { + "vercel": "vc-domain-verify=aimaneammar.is-a.dev,4b673716f741e17e5281" + } +} \ No newline at end of file diff --git a/domains/anonymousik.json b/domains/anonymousik.json index 4eab04083d..183478d511 100644 --- a/domains/anonymousik.json +++ b/domains/anonymousik.json @@ -1,9 +1,14 @@ { "owner": { "username": "anonymousik", - "email": "anonymousxtutaj@gmail.com" + "email": "anonymousxtutaj@gmail.com", + "discord": "D3KkRKP8" }, "records": { "CNAME": "anonymousik.github.io" - } + }, + "services": { + "discord": "dh=bf41c141edc5338371bdcd2f5224d1e23f030b9f" + }, + "proxied": true } diff --git a/domains/api.bala.json b/domains/api.bala.json index acee87d5f8..c3c53bde4f 100644 --- a/domains/api.bala.json +++ b/domains/api.bala.json @@ -1,9 +1,9 @@ { - "owner": { - "username": "parzi-val", - "email": "krbala1511@gmail.com" - }, - "records": { - "CNAME": "s37e9nua.up.railway.app" - } -} + "owner": { + "username": "parzi-val", + "email": "krbala1511@gmail.com" + }, + "records": { + "A": ["216.24.57.1"] + } +} \ No newline at end of file diff --git a/domains/aryan-gupta.json b/domains/aryan-gupta.json index 9209a70839..2e5e1a82ac 100644 --- a/domains/aryan-gupta.json +++ b/domains/aryan-gupta.json @@ -6,5 +6,8 @@ "description": "Aryan Gupta's personal portfolio, blog, and VCE resource website.", "records": { "CNAME": "apoo711.github.io" + }, + "services": { + "discord": "dh=1b2d00cb449cab67bedd1c9f40961835a261a92d" } -} +} \ No newline at end of file diff --git a/domains/aswin-hariram.json b/domains/aswin-hariram.json index 531fb9aacd..564d10e7e1 100644 --- a/domains/aswin-hariram.json +++ b/domains/aswin-hariram.json @@ -1,9 +1,12 @@ { - "owner": { - "username": "aswin-hariram", - "email": "aswincseskct@gmail.com" - }, - "records": { - "CNAME": "aswin-hariram.vercel.app" - } + "owner": { + "username": "Aswin-Hariram", + "email": "aswincseskct@gmail.com" + }, + "records": { + "CNAME": "aswin-hariram.vercel.app" + }, + "services": { + "vercel": "vc-domain-verify=aswin-hariram.is-a.dev,f97ad879689875658150" + } } diff --git a/domains/cdn.akshtt.json b/domains/cdn.akshtt.json index 246ebefbd7..4f929e2172 100644 --- a/domains/cdn.akshtt.json +++ b/domains/cdn.akshtt.json @@ -4,6 +4,6 @@ "discord": "1056531806763102218" }, "records": { - "A": ["69.62.118.156"] + "A": ["69.30.249.53"] } } diff --git a/domains/cyberlink.json b/domains/cyberlink.json index 1b9848e1ab..2effa16e96 100644 --- a/domains/cyberlink.json +++ b/domains/cyberlink.json @@ -9,5 +9,5 @@ "services": { "vercel": "vc-domain-verify=cyberlink.is-a.dev,ccef0f5f7c77ae12f085" }, - "proxied": true + "proxied": false } diff --git a/domains/eldarlrd.json b/domains/eldarlrd.json index 3fd4eabab1..30a1ff5615 100644 --- a/domains/eldarlrd.json +++ b/domains/eldarlrd.json @@ -6,5 +6,10 @@ "records": { "CNAME": "eldarlrd.github.io" }, + "redirect_config": { + "custom_paths": { + "/github": "https://github.com/eldarlrd" + } + }, "proxied": true } diff --git a/domains/_github-pages-challenge-anonymousik.anonymousik.json b/domains/ferroart.anonymousik.json similarity index 67% rename from domains/_github-pages-challenge-anonymousik.anonymousik.json rename to domains/ferroart.anonymousik.json index dbb93667f1..a2f95a349c 100644 --- a/domains/_github-pages-challenge-anonymousik.anonymousik.json +++ b/domains/ferroart.anonymousik.json @@ -4,6 +4,6 @@ "email": "anonymousxtutaj@gmail.com" }, "records": { - "TXT": "8c8810749d371c0c3f759bbda6761d" + "URL": "https://nieznanynikomu.github.io/FerroART" } } diff --git a/domains/frost-voltage-wiki.json b/domains/frost-voltage-wiki.json index 7a0bc798e3..08ca191e73 100644 --- a/domains/frost-voltage-wiki.json +++ b/domains/frost-voltage-wiki.json @@ -5,5 +5,8 @@ }, "records": { "CNAME": "wiki-frost-me-f3415d.gitlab.io" + }, + "services": { + "gitlab": "gitlab-pages-verification-code=57f76737bb8badd568b055bc4ff9d405" } -} +} \ No newline at end of file diff --git a/domains/gg.shockbs.json b/domains/gg.shockbs.json index e94a264adc..949b7339b6 100644 --- a/domains/gg.shockbs.json +++ b/domains/gg.shockbs.json @@ -5,6 +5,5 @@ }, "records": { "CNAME": "ziplineshockbs.onrender.com" - }, - "proxied": true + } } diff --git a/domains/harvey.json b/domains/harvey.json deleted file mode 100644 index cb7fa22902..0000000000 --- a/domains/harvey.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "hrv3y", - "discord": "969129892614660096" - }, - "records": { - "CNAME": "hosted.omg.lol" - } -} diff --git a/domains/illy.json b/domains/illy.json index e6af6aec7b..d45738bfec 100644 --- a/domains/illy.json +++ b/domains/illy.json @@ -5,5 +5,8 @@ }, "records": { "CNAME": "illy-dev-github-io.vercel.app" + }, + "services": { + "vercel": "vc-domain-verify=illy.is-a.dev,043aa6b06299bebf5ad1" } -} +} \ No newline at end of file diff --git a/domains/im.anonymousik.json b/domains/im.anonymousik.json new file mode 100644 index 0000000000..c70fd00ed9 --- /dev/null +++ b/domains/im.anonymousik.json @@ -0,0 +1,15 @@ +{ + "owner": { + "username": "anonymousik", + "email": "anonymousxtutaj@gmail.com" + }, + "records": { + "MX": [ + "mx1.improvmx.com", + "mx2.improvmx.com" + ], + "TXT": [ + "v=spf1 include:spf.improvmx.com ~all" + ] + } +} \ No newline at end of file diff --git a/domains/kito.json b/domains/kito.json index f381c3501e..b7e4a9e1b7 100644 --- a/domains/kito.json +++ b/domains/kito.json @@ -1,9 +1,13 @@ { - "owner": { - "username": "KitoMCVN", - "discord": "915876843884777472" - }, - "records": { - "CNAME": "kitomc.site" - } + "owner": { + "username": "KitoMCVN", + "discord": "915876843884777472", + "email": "kitomcchill@gmail.com" + }, + "records": { + "CNAME": "cname.vercel-dns.com" + }, + "services": { + "vercel": "vc-domain-verify=kito.is-a.dev,8b8fd875eead5c03ef65" + } } diff --git a/domains/meerkats.shays.json b/domains/meerkats.shays.json index f32a63f308..4eb9285a25 100644 --- a/domains/meerkats.shays.json +++ b/domains/meerkats.shays.json @@ -5,5 +5,8 @@ }, "records": { "CNAME": "the-meerkats-projects-shays24-90484013ec4c0067187cd3a154c706ad6.gitlab.io" + }, + "services": { + "gitlab": "gitlab-pages-verification-code=621b768139e0bfaf6eb43d60db03cabf" } -} +} \ No newline at end of file diff --git a/domains/nicholas.json b/domains/nicholas.json new file mode 100644 index 0000000000..6fcdf842cd --- /dev/null +++ b/domains/nicholas.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "UndeadRonin99", + "email": "themalanboy@gmail.com" + }, + "records": { + "CNAME": "undeadronin99.github.io" + } +} diff --git a/domains/nickkcode.json b/domains/nickkcode.json new file mode 100644 index 0000000000..54e7674d1c --- /dev/null +++ b/domains/nickkcode.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "nickkcode", + "email": "tobecoolaf@gmail.com" + }, + "records": { + "CNAME": "portfolio-smoky-chi-69.vercel.app" + } +} diff --git a/domains/pinage404.json b/domains/pinage404.json index c9efe6a3f8..decd81378b 100644 --- a/domains/pinage404.json +++ b/domains/pinage404.json @@ -5,5 +5,8 @@ }, "records": { "CNAME": "pinage404.gitlab.io" + }, + "services": { + "gitlab": "gitlab-pages-verification-code=d43eb39124dec340bdbb11a4d6aa6b52" } -} +} \ No newline at end of file diff --git a/domains/pretzel.json b/domains/pretzel.json index 562d5f911c..a276a0f881 100644 --- a/domains/pretzel.json +++ b/domains/pretzel.json @@ -1,9 +1,12 @@ { - "owner": { - "username": "tobaiscrowley", - "discord": "gus_polinksi" - }, - "records": { - "CNAME": "microblog-aa389f.gitlab.io" - } -} + "owner": { + "username": "tobaiscrowley", + "discord": "gus_polinksi" + }, + "records": { + "CNAME": "microblog-aa389f.gitlab.io" + }, + "services": { + "gitlab": "gitlab-pages-verification-code=d1d70cb094c2f16f83caed76145fc105" + } +} \ No newline at end of file diff --git a/domains/rajagrawal.json b/domains/rajagrawal.json index 7edbc9f63b..dc19cac182 100644 --- a/domains/rajagrawal.json +++ b/domains/rajagrawal.json @@ -5,6 +5,5 @@ }, "records": { "CNAME": "raj-page.vercel.app" - }, - "proxy": true + } } diff --git a/domains/refh4ck.json b/domains/refh4ck.json index 4dc92c4b82..2eef40e020 100644 --- a/domains/refh4ck.json +++ b/domains/refh4ck.json @@ -1,10 +1,12 @@ { - "description": "REFH4CK - Portfolio", "owner": { "username": "REFH4CK", "email": "refh4ck.dev@gmail.com" }, "records": { "CNAME": "refh4ck.vercel.app" + }, + "services": { + "vercel": "vc-domain-verify=refh4ck.is-a.dev,cbc2088fe8cd6849093c" } } diff --git a/domains/rvc11.json b/domains/rvc11.json index 4775ef9c79..ec7b414ddf 100644 --- a/domains/rvc11.json +++ b/domains/rvc11.json @@ -4,6 +4,6 @@ "email": "membermadde.insiddev25120@hotmail.com" }, "records": { - "CNAME": "rvc11twil.github.io" + "NS": ["arnold.ns.cloudflare.com", "mia.ns.cloudflare.com"] } } diff --git a/domains/sadkon.json b/domains/sadkon.json index 5915410994..8842fd2697 100644 --- a/domains/sadkon.json +++ b/domains/sadkon.json @@ -5,5 +5,8 @@ }, "records": { "CNAME": "sadkon.gitlab.io" + }, + "services": { + "gitlab": "gitlab-pages-verification-code=478e4a7c8445704809ba0fa31e003df3" } -} +} \ No newline at end of file diff --git a/domains/snipeisdead.json b/domains/snipeisdead.json index 789f2a48bf..a9510a1f20 100644 --- a/domains/snipeisdead.json +++ b/domains/snipeisdead.json @@ -1,7 +1,7 @@ { "owner": { "username": "snipeisdead", - "email": "snipehere@gmail.com" + "email": "shubhjais2609@gmail.com" }, "records": { "CNAME": "snipeisdead.github.io" diff --git a/domains/status.akshtt.json b/domains/status.akshtt.json index 246ebefbd7..4f929e2172 100644 --- a/domains/status.akshtt.json +++ b/domains/status.akshtt.json @@ -4,6 +4,6 @@ "discord": "1056531806763102218" }, "records": { - "A": ["69.62.118.156"] + "A": ["69.30.249.53"] } } diff --git a/domains/trild.json b/domains/trild.json index 8dc1f80ff2..3c082c9e0f 100644 --- a/domains/trild.json +++ b/domains/trild.json @@ -1,9 +1,12 @@ { - "owner": { - "username": "tuoitho", - "email": "tuoithokhoc1414@gmail.com" - }, - "records": { - "CNAME": "portfolio-sand-two-74.vercel.app" - } -} + "owner": { + "username": "tuoitho", + "email": "tuoithokhoc1414@gmail.com" + }, + "records": { + "CNAME": "portfolio-sand-two-74.vercel.app" + }, + "services": { + "vercel": "vc-domain-verify=trild.is-a.dev,c355ae3f7ef9923a15c4" + } +} \ No newline at end of file diff --git a/domains/wh.json b/domains/wh.json new file mode 100644 index 0000000000..0ae96e2abe --- /dev/null +++ b/domains/wh.json @@ -0,0 +1,17 @@ +{ + "owner": { + "username": "wdhdev", + "email": "william@is-a.dev" + }, + "records": { + "NS": ["kyrie.ns.cloudflare.com", "tara.ns.cloudflare.com"], + "DS": [ + { + "key_tag": 2371, + "algorithm": 13, + "digest_type": 2, + "digest": "020A83220521658994103EE306D9B7968DEDF82555639059EB05A69E4C6C36E6" + } + ] + } +} diff --git a/domains/www.eldarlrd.json b/domains/www.eldarlrd.json index 1a326d219b..a4a31b437b 100644 --- a/domains/www.eldarlrd.json +++ b/domains/www.eldarlrd.json @@ -5,11 +5,5 @@ }, "records": { "URL": "https://eldarlrd.is-a.dev" - }, - "redirect_config": { - "custom_paths": { - "/github": "https://github.com/eldarlrd" - }, - "redirect_paths": true } } diff --git a/domains/yashvs.json b/domains/yashvs.json index 575343391b..36a66ba51f 100644 --- a/domains/yashvs.json +++ b/domains/yashvs.json @@ -1,9 +1,12 @@ { - "owner": { - "username": "pythonicboat", - "email": "vs21yash@gmail.com" - }, - "records": { - "CNAME": "cname.vercel-dns.com" - } -} + "owner": { + "username": "pythonicboat", + "email": "vs21yash@gmail.com" + }, + "records": { + "CNAME": "cname.vercel-dns.com" + }, + "services": { + "vercel": "vc-domain-verify=yashvs.is-a.dev,c288565fced784647cef" + } +} \ No newline at end of file diff --git a/tests/domains.test.js b/tests/domains.test.js index 28fa2b5b6b..607f5bd0ef 100644 --- a/tests/domains.test.js +++ b/tests/domains.test.js @@ -128,6 +128,13 @@ t("Disallow nested subdomains when parent has specific service records", (t) => `${file}: Nested subdomain "_atproto.${subdomain}" should not exist when services.bluesky is present` ); } + + if (data?.services?.gitlab) { + t.false( + files.includes(`_gitlab-pages-verification-code.${file}`), + `${file}: Nested subdomain "_gitlab-pages-verification-code.${subdomain}" should not exist when services.gitlab is present` + ); + } }); t.pass(); diff --git a/tests/json.test.js b/tests/json.test.js index fa81c0cb9a..6c5ec2b46d 100644 --- a/tests/json.test.js +++ b/tests/json.test.js @@ -28,7 +28,7 @@ const optionalRedirectConfigFields = { redirect_paths: "boolean" }; -const blockedFields = ["domain", "internal", "reserved", "subdomain"]; +const blockedFields = ["domain", "internal", "proxy", "reserved", "subdomain"]; const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; const hostnameRegex = /^(?=.{1,253}$)(?:(?:[_a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)\.)+[a-zA-Z]{2,63}$/; diff --git a/tests/proxy.test.js b/tests/proxy.test.js index 1c3d983006..bc11d477a3 100644 --- a/tests/proxy.test.js +++ b/tests/proxy.test.js @@ -49,3 +49,40 @@ t("Domains with proxy enabled must have at least one proxy-able record", (t) => validateProxiedRecords(t, data, file); }); }); + +const disallowedRecords = [ + { + type: "CNAME", + value: "*.onrender.com" + } +]; + +t("Domains with specific records must not have proxy enabled", (t) => { + files.forEach((file) => { + const data = getDomainData(file); + + if (data.proxied) { + disallowedRecords.forEach((record) => { + let recordExists = false; + + if (!data.records[record.type]) { + t.pass(); + return; + } else if (Array.isArray(data.records[record.type])) { + recordExists = data.records[record.type].some((r) => + record.value.startsWith("*.") ? r.endsWith(record.value.slice(2)) : r === record.value + ); + } else { + recordExists = record.value.startsWith("*.") + ? data.records[record.type].endsWith(record.value.slice(2)) + : data.records[record.type] === record.value; + } + + t.false( + recordExists, + `${file}: Records matching \`${record.type}: "${record.value}"\` cannot be proxied` + ); + }); + } + }); +}); diff --git a/tests/records.test.js b/tests/records.test.js index 7bc851397d..773de6bb61 100644 --- a/tests/records.test.js +++ b/tests/records.test.js @@ -334,27 +334,23 @@ t("All files should have valid service records", (t) => { files.forEach((file) => { const data = getDomainData(file); + const discordRegex = /^dh=[a-f0-9]{40}$/; + if (data?.services?.discord) { const discord = Array.isArray(data.services.discord) ? data.services.discord : [data.services.discord]; discord.forEach((value) => { - const token = value.split("=")[1]; - - t.true(value.startsWith("dh="), `${file}: Invalid Discord service record format`); - t.true(token.length === 40, `${file}: Discord service token should be 40 characters long`); - t.true( - isValidHexadecimal(token), - `${file}: Discord service token should be a valid hexadecimal string` - ); + t.true(discordRegex.test(value), `${file}: Invalid Discord service record format`); }); } + const vercelRegex = /^vc-domain-verify=([a-z0-9.-]+),([a-f0-9]{20})$/; + if (data?.services?.vercel) { const vercel = Array.isArray(data.services.vercel) ? data.services.vercel : [data.services.vercel]; vercel.forEach((value) => { - t.true(value.startsWith("vc-domain-verify="), `${file}: Invalid Vercel service record format`); - t.true(value.length >= 48, `${file}: Vercel service token should be 48 characters or longer`); + t.true(vercelRegex.test(value), `${file}: Invalid Vercel service record format`); }); } @@ -363,6 +359,16 @@ t("All files should have valid service records", (t) => { if (data?.services?.bluesky) { t.true(atprotoRegex.test(data.services.bluesky), `${file}: Invalid Bluesky service record format`); } + + const gitlabRegex = /^gitlab-pages-verification-code=[a-f0-9]{32}$/; + + if (data?.services?.gitlab) { + const gitlab = Array.isArray(data.services.gitlab) ? data.services.gitlab : [data.services.gitlab]; + + gitlab.forEach((value) => { + t.true(gitlabRegex.test(value), `${file}: Invalid GitLab service record format`); + }); + } }); t.pass(); diff --git a/util/reserved.json b/util/reserved.json index 87d5df52c3..2c73f8d32b 100644 --- a/util/reserved.json +++ b/util/reserved.json @@ -81,6 +81,8 @@ "private", "prod", "production", + "proxied", + "proxy", "rdap", "redirect", "register",