Skip to content

Commit

Permalink
Merge branch 'main' into ririn-hq-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteDog5695 authored Nov 9, 2024
2 parents 71dcf68 + 9cd1f83 commit 5221525
Show file tree
Hide file tree
Showing 241 changed files with 1,064 additions and 1,291 deletions.
6 changes: 1 addition & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
* @phenax @wdhdev
* @wdhdev

/.github/ @wdhdev
/domains/ @is-a-dev/maintainers

*.md @is-a-dev/maintainers
/LICENSE @phenax
/dnsconfig.js @wdhdev
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ on:
branches: [main]
paths:
- "domains/*"
- ".github/workflows/validation.yml"
- "tests/*"
- "utils/*"
- ".github/workflows/validate.yml"
- "dnsconfig.js"

workflow_dispatch:
Expand All @@ -28,15 +30,12 @@ jobs:
with:
args: check

json:
name: JSON
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: JSON Syntax Check
uses: limitusus/json-syntax-check@v2
with:
pattern: "\\.json$"
env:
BASE: "domains/"
- run: npm install

- run: npm test
130 changes: 130 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
68 changes: 18 additions & 50 deletions dnsconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,80 +23,55 @@ var records = [];

for (var subdomain in domains) {
var subdomainName = domains[subdomain].name;
var fullSubdomain = subdomainName + "." + domainName;
var domainData = domains[subdomain].data;
var proxyState = domainData.proxied ? CF_PROXY_ON : CF_PROXY_OFF;

// Handle A records
if (domainData.record.A) {
for (var a in domainData.record.A) {
records.push(
A(subdomainName, IP(domainData.record.A[a]), proxyState)
);
records.push(A(subdomainName, IP(domainData.record.A[a]), proxyState));
}
}

// Handle AAAA records
if (domainData.record.AAAA) {
for (var aaaa in domainData.record.AAAA) {
records.push(
AAAA(subdomainName, domainData.record.AAAA[aaaa], proxyState)
);
records.push(AAAA(subdomainName, domainData.record.AAAA[aaaa], proxyState));
}
}

// Handle CAA records
if (domainData.record.CAA) {
for (var caa in domainData.record.CAA) {
var caaRecord = domainData.record.CAA[caa];
records.push(
CAA(
subdomainName,
caaRecord.flags,
caaRecord.tag,
caaRecord.value
)
);
records.push(CAA(subdomainName, caaRecord.flags, caaRecord.tag, caaRecord.value));
}
}

// Handle CNAME records
if (domainData.record.CNAME) {
// Allow CNAME record on root
if (subdomainName === "@") {
records.push(
ALIAS(subdomainName, domainData.record.CNAME + ".", proxyState)
);
records.push(ALIAS(subdomainName, domainData.record.CNAME + ".", proxyState));
} else {
records.push(
CNAME(subdomainName, domainData.record.CNAME + ".", proxyState)
);
records.push(CNAME(subdomainName, domainData.record.CNAME + ".", proxyState));
}
}

// Handle DS records
if (domainData.record.DS) {
records.push(
DS(
subdomainName,
domainData.record.DS.key_tag,
domainData.record.DS.algorithm,
domainData.record.DS.digest_type,
domainData.record.DS.digest
)
);
for (var ds in domainData.record.DS) {
var dsRecord = domainData.record.DS[ds];
records.push(
DS(subdomainName, dsRecord.key_tag, dsRecord.algorithm, dsRecord.digest_type, dsRecord.digest)
);
}
}

// Handle MX records
if (domainData.record.MX) {
for (var mx in domainData.record.MX) {
records.push(
MX(
subdomainName,
10 + parseInt(mx),
domainData.record.MX[mx] + "."
)
);
records.push(MX(subdomainName, 10 + parseInt(mx), domainData.record.MX[mx] + "."));
}
}

Expand All @@ -112,13 +87,7 @@ for (var subdomain in domains) {
for (var srv in domainData.record.SRV) {
var srvRecord = domainData.record.SRV[srv];
records.push(
SRV(
subdomainName,
srvRecord.priority,
srvRecord.weight,
srvRecord.port,
srvRecord.target + "."
)
SRV(subdomainName, srvRecord.priority, srvRecord.weight, srvRecord.port, srvRecord.target + ".")
);
}
}
Expand All @@ -127,22 +96,22 @@ for (var subdomain in domains) {
if (domainData.record.TXT) {
if (Array.isArray(domainData.record.TXT)) {
for (var txt in domainData.record.TXT) {
records.push(TXT(subdomainName, domainData.record.TXT[txt]));
records.push(TXT(subdomainName, "\"" + domainData.record.TXT[txt] + "\""));
}
} else {
records.push(TXT(subdomainName, domainData.record.TXT));
records.push(TXT(subdomainName, "\"" + domainData.record.TXT + "\""));
}
}

// 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 + "\""));
}

// Handle reserved domains
if (domainData.reserved) {
records.push(TXT(subdomainName, "RESERVED"));
records.push(TXT(subdomainName, "\"" + "RESERVED" + "\""));
}
}

Expand All @@ -152,7 +121,6 @@ var options = {

var ignored = [
IGNORE("@", "MX,TXT"),
IGNORE("\\*"),
IGNORE("_acme-challenge", "TXT"),
IGNORE("_autodiscover._tcp", "SRV"),
IGNORE("_dmarc", "TXT"),
Expand All @@ -162,6 +130,6 @@ var ignored = [
];

// Push TXT record of when the zone was last updated
records.push(TXT("_zone-updated", Date.now().toString()));
records.push(TXT("_zone-updated", "\"" + Date.now().toString() + "\""));

D(domainName, registrar, dnsProvider, options, ignored, records);
9 changes: 0 additions & 9 deletions domains/2fa.phoenix.json

This file was deleted.

10 changes: 0 additions & 10 deletions domains/_acme-challenge.ai.esb.json

This file was deleted.

10 changes: 0 additions & 10 deletions domains/_acme-challenge.cdn.esb.json

This file was deleted.

10 changes: 0 additions & 10 deletions domains/_discord.akatsuki2555.json

This file was deleted.

10 changes: 10 additions & 0 deletions domains/_discord.akk1to.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"owner": {
"username": "akk1to",
"email": "[email protected]",
"discord": "727497287777124414"
},
"record": {
"TXT": ["dh=1b549c9ba1012a210482879df31eaddc4dbf0c7e"]
}
}
13 changes: 0 additions & 13 deletions domains/_discord.cupglass.json

This file was deleted.

Loading

0 comments on commit 5221525

Please sign in to comment.