Merge branch 'main' into patch-5

This commit is contained in:
Cedrick Feze
2025-03-13 20:11:43 +01:00
committed by GitHub
9 changed files with 38 additions and 31 deletions
-1
View File
@@ -7,7 +7,6 @@
<img alt="Open Pull Requests" src="https://img.shields.io/github/issues-raw/is-a-dev/register?color=5c46eb&label=issues&style=for-the-badge">
<img alt="Open Issues" src="https://img.shields.io/github/issues-pr-raw/is-a-dev/register?color=5c46eb&label=pull%20requests&style=for-the-badge">
<br>
<img alt="Publish" src="https://github.com/is-a-dev/register/actions/workflows/publish.yml/badge.svg">
</p>
<h1 align="center">is-a.dev</h1>
+7 -7
View File
@@ -133,7 +133,7 @@ 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));
records.push(TXT("_redirect." + subdomainName, "\"" + domainData.record.URL + "\""));
}
}
@@ -141,14 +141,14 @@ var reserved = require("./util/reserved.json");
// Handle reserved domains
for (var i = 0; i < reserved.length; i++) {
var subdomain = reserved[i];
var subdomainName = reserved[i];
if (
subdomain !== "ns1" &&
subdomain !== "ns2" &&
subdomain !== "ns3" &&
subdomain !== "ns4"
subdomainName !== "ns1" &&
subdomainName !== "ns2" &&
subdomainName !== "ns3" &&
subdomainName !== "ns4"
) {
records.push(CNAME(subdomain, "reserved.is-a.dev.", CF_PROXY_ON));
records.push(A(subdomainName, IP("192.0.2.1"), CF_PROXY_ON));
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"owner": {
"username": "sperea",
"email": "perea@mailfence.com"
},
"record": {
"TXT": "vc-domain-verify=sergioperea.is-a.dev,ff9bc4d6b26eca2587d7"
}
}
+4
View File
@@ -12,6 +12,10 @@
"185.199.109.153",
"185.199.110.153",
"185.199.111.153"
],
"TXT": [
"google-site-verification=BbYZhMhwA6qo69R2udUA6wKJidmrTiWflfU01Kjm7eI",
"yandex-verification: 7cc47fa77df61676"
]
}
}
-11
View File
@@ -1,11 +0,0 @@
{
"description": "Serving my PERSONAL website",
"repo": "https://pog-frog.github.io/my-resume/",
"owner": {
"username": "Pog-Frog",
"email": "fireangle5621@gmail.com"
},
"record": {
"URL": "https://pog-frog.github.io/my-resume/"
}
}
-9
View File
@@ -1,9 +0,0 @@
{
"owner": {
"username": "is-a-dev",
"email": "admin@is-a.dev"
},
"record": {
"URL": "https://is-a.dev/reserved"
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"owner": {
"username": "sperea",
"email": "perea@mailfence.com"
},
"record": {
"A": ["76.76.21.21"]
}
}
+8 -3
View File
@@ -21,9 +21,14 @@ function getDomainData(file) {
}
function validateProxiedRecords(t, data, file) {
// Convert the Set to an array for message display (moved outside the loop to optimize performance)
const recordTypes = Array.from(requiredRecordsToProxy).join(", ");
// Forcefully stop raw.is-a.dev from being proxied
if (file === "raw.json") {
t.true(!data.proxied, `${file}: raw.is-a.dev cannot be proxied`);
return;
}
if (data.proxied) {
const hasProxiedRecord = Object.keys(data.record).some((key) => requiredRecordsToProxy.has(key));
@@ -39,8 +44,8 @@ const files = fs.readdirSync(domainsPath).filter((file) => file.endsWith(".json"
t("Domains with proxy enabled must have at least one proxy-able record", (t) => {
files.forEach((file) => {
const domain = getDomainData(file);
const data = getDomainData(file);
validateProxiedRecords(t, domain, file);
validateProxiedRecords(t, data, file);
});
});
+1
View File
@@ -100,6 +100,7 @@
"redirect",
"registrar",
"registry",
"reserved",
"root",
"secure",
"security",