diff --git a/.github/workflows/url-validation.yml b/.github/workflows/url-validation.yml deleted file mode 100644 index 9818ba4f7..000000000 --- a/.github/workflows/url-validation.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: URL Validation -on: - schedule: - - cron: '0 0 * * 1' # At 00:00 on Monday - workflow_dispatch: - -jobs: - validation: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - name: Setup Up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - run: pip install requests - - run: python tests/url-validation.py - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - name: URL Validiation Result - path: url-validation-result.json - retention-days: 7 diff --git a/domains/_discord.bulkypanda.json b/domains/_discord.bulkypanda.json new file mode 100644 index 000000000..c6bf8ea5e --- /dev/null +++ b/domains/_discord.bulkypanda.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "bulkypanda", + "email": "arya@gummadi.net" + }, + "record": { + "TXT": "dh=b44771133966394ffba23bbd409696a6a58356b4" + } +} diff --git a/domains/_github-challenge-yfadev-org.yfa.json b/domains/_github-challenge-yfadev-org.yfa.json index 09477840e..99114f25d 100644 --- a/domains/_github-challenge-yfadev-org.yfa.json +++ b/domains/_github-challenge-yfadev-org.yfa.json @@ -9,6 +9,6 @@ "Mastodon": "@YouFoundAlpha@mastodon.social" }, "record": { - "TXT": "c136bd65da" + "TXT": "3436b41d67" } } diff --git a/domains/adityaredflag.json b/domains/adityaredflag.json index 777f21a73..c527f3892 100644 --- a/domains/adityaredflag.json +++ b/domains/adityaredflag.json @@ -1,12 +1,12 @@ { - "owner": { - "username": "adityaREDFLAG", - "email": "adi.redflag@gmail.com", - "discord": "983386510235680888" - }, - - "record": { - "CNAME": "adityaredflag.github.io" - } + "owner": { + "username": "adityaREDFLAG", + "email": "adi.redflag@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "AAAA": ["2a00:da00:1800:83a4::1"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" } - +} \ No newline at end of file diff --git a/domains/app.allancoding.json b/domains/app.allancoding.json new file mode 100644 index 000000000..6637d5561 --- /dev/null +++ b/domains/app.allancoding.json @@ -0,0 +1,14 @@ +{ + "owner": { + "username": "allancoding", + "email": "allancoding.dev@gmail.com", + "twitter": "allancoding", + "discord": "allancoding" + }, + "record": { + "A": ["217.174.245.249"], + "AAAA": ["2a00:da00:1800:83a4::1"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/ave.json b/domains/ave.json new file mode 100644 index 000000000..456a3e924 --- /dev/null +++ b/domains/ave.json @@ -0,0 +1,11 @@ +{ + "description": "Personal website for @ayvacs", + "repo": "https://github.com/ayvacs/ayvacs.github.io", + "owner": { + "username": "ayvacs", + "email": "ayvacs@proton.me" + }, + "record": { + "CNAME": "ayvacs.github.io" + } +} diff --git a/domains/berztech.json b/domains/berztech.json new file mode 100644 index 000000000..d7f43da5b --- /dev/null +++ b/domains/berztech.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "Sxurabh", + "email": "saurabhkirve@gmail.com" + }, + "record": { + "CNAME": "berztech.vercel.app" + } +} diff --git a/domains/doge-v4-proxy.json b/domains/doge-v4-proxy.json new file mode 100644 index 000000000..91118dda8 --- /dev/null +++ b/domains/doge-v4-proxy.json @@ -0,0 +1,12 @@ +{ + "owner": { + "username": "Zumwaltboi68", + "email": "alexander662022@outlook.com" + }, + "record": { + "A": ["217.174.245.249"], + "AAAA": ["2a00:da00:1800:83a4::1"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/files.allancoding.json b/domains/files.allancoding.json new file mode 100644 index 000000000..8590559c0 --- /dev/null +++ b/domains/files.allancoding.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "allancoding", + "email": "allancoding.dev@gmail.com", + "twitter": "allancoding", + "discord": "allancoding" + }, + "record": { + "CNAME": "allancoding.github.io" + } +} diff --git a/domains/grusio.json b/domains/grusio.json new file mode 100644 index 000000000..96e9fa8ba --- /dev/null +++ b/domains/grusio.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "mattiagrusio", + "email": "mattiagrusio@gmail.com" + }, + "record": { + "A": ["2.231.198.113"] + } +} diff --git a/domains/johan-stickman.json b/domains/johan-stickman.json deleted file mode 100644 index 0877408d5..000000000 --- a/domains/johan-stickman.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "description": "My personal website", - "owner": { - "username": "johan-perso", - "email": "johan_stickman@proton.me", - "twitter": "Johan_Stickman", - "discord": "jsuismoi" - }, - "record": { - "URL": "https://johanstick.fr" - } -} diff --git a/domains/lumix.json b/domains/lumix.json new file mode 100644 index 000000000..d9b480874 --- /dev/null +++ b/domains/lumix.json @@ -0,0 +1,12 @@ +{ + "owner": { + "username": "o-lumix", + "email": "lumixofficiel@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "AAAA": ["2a00:da00:1800:83a4::1"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/norkart.json b/domains/norkart.json new file mode 100644 index 000000000..711b5d325 --- /dev/null +++ b/domains/norkart.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "norkart1", + "email": "navasforwork@gmail.com" + }, + "record": { + "CNAME": "personal-website-26y.pages.dev" + } +} diff --git a/domains/phoenix.json b/domains/phoenix.json index 2df38dc56..440402966 100644 --- a/domains/phoenix.json +++ b/domains/phoenix.json @@ -5,7 +5,7 @@ }, "record": { "A": ["130.162.166.134"], - "MX": ["mx1.forwardemail.net", "mx2.forwardemail.net"], + "MX": ["mx1.improvmx.com", "mx2.improvmx.com"], "TXT": "forward-email=phoenixorigin171@gmail.com" } } diff --git a/domains/querko.json b/domains/querko.json new file mode 100644 index 000000000..5c4b6ace6 --- /dev/null +++ b/domains/querko.json @@ -0,0 +1,12 @@ +{ + "owner": { + "username": "ProfKrzys", + "email": "krzysztof2011@hotmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "AAAA": ["2a00:da00:1800:83a4::1"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/senix.json b/domains/senix.json new file mode 100644 index 000000000..895e87bbe --- /dev/null +++ b/domains/senix.json @@ -0,0 +1,12 @@ +{ + "owner": { + "username": "cjolivier15", + "email": "oliviercj195@yahoo.com" + }, + "record": { + "A": ["217.174.245.249"], + "AAAA": ["2a00:da00:1800:83a4::1"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/stefdp.json b/domains/stefdp.json index 62b2bcf6e..56c2fc2fd 100644 --- a/domains/stefdp.json +++ b/domains/stefdp.json @@ -9,12 +9,10 @@ "217.174.245.249" ], "MX": [ - "mx1.forwardemail.net", - "mx2.forwardemail.net" + "mail.is-a.dev" ], "TXT": [ - "forward-email=admin:admin.main@mail.stefdp.is-a.dev", - "forward-email=/^(?!admin$).*/:main@mail.stefdp.is-a.dev" + " v=spf1 mx a:mail.is-a.dev ip4:217.174.245.249 ~all" ] } } diff --git a/domains/sxurxbh.json b/domains/sxurxbh.json new file mode 100644 index 000000000..0f9937444 --- /dev/null +++ b/domains/sxurxbh.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "Sxurabh", + "email": "saurabhkirve@gmail.com" + }, + "record": { + "CNAME": "sxurabh.github.io" + } +} diff --git a/domains/ziyad.json b/domains/ziyad.json new file mode 100644 index 000000000..ffa2413b8 --- /dev/null +++ b/domains/ziyad.json @@ -0,0 +1,10 @@ +{ + "owner": { + "username": "o-lumix", + "email": "lumixofficiel@gmail.com" + }, + + "record": { + "CNAME": "o-lumix.github.io" + } +} diff --git a/scripts/migrate.js b/scripts/migrate.js deleted file mode 100644 index 7ae1c3daa..000000000 --- a/scripts/migrate.js +++ /dev/null @@ -1,30 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const R = require('ramda'); -const { DOMAINS_PATH } = require('../utils/constants'); - -const migrate = ([file, domain]) => [ - file, - { - ...domain, - record: file !== '@.json' && /\.is-a\.dev$/.test(domain.record.URL || '') - ? R.dissoc('URL', domain.record) - : domain.record, - } -]; - -const main = async () => { - const domains = await fs.promises.readdir(DOMAINS_PATH).then(R.map(async file => [ - file, - JSON.parse(await fs.promises.readFile(path.join(DOMAINS_PATH, file), 'utf-8')), - ])).then(ps => Promise.all(ps)); - - const newDomains = domains.map(migrate); - - await Promise.all(newDomains.map(([file, json]) => { - return fs.promises.writeFile(path.join(DOMAINS_PATH, file), JSON.stringify(json, null, 2)); - })); -}; - -main(); - diff --git a/tests/url-validation.py b/tests/url-validation.py deleted file mode 100644 index 25d2f7b70..000000000 --- a/tests/url-validation.py +++ /dev/null @@ -1,60 +0,0 @@ -import os -import json -import requests -import concurrent.futures - -repository_directory = os.getcwd() -domains_directory = os.path.join(repository_directory, "domains") - -def has_url_field(file_path): - with open(file_path, "r") as file: - data = json.load(file) - record = data.get("record") - if record and "URL" in record: - return record["URL"] - return None - -def is_url_reachable(url: str): - try: - response = requests.head(url, allow_redirects=True) - return response.status_code // 100 in [1, 2, 3] # Check if status code is in the 1xx or 2xx or 3xx range (success) - except requests.exceptions.RequestException: - return False - -urls_data = { - "valid": {}, - "invalid": {}, - "non-http": {} -} - -def handle_url_validation(file_path): - url: str = has_url_field(file_path) - if url: - if url.startswith("http://") or url.startswith("https://"): - if is_url_reachable(url): - urls_data["valid"][file_path] = url - print(f"URL '{url}' in file '{file_path}' is reachable.") - else: - urls_data["invalid"][file_path] = url - print(f"URL '{url}' in file '{file_path}' is not reachable.") - else: - urls_data["non-http"][file_path] = url - print(f"URL '{url}' in file '{file_path}' is neither HTTP nor HTTPS.") - -max_threads = 20 - -with concurrent.futures.ThreadPoolExecutor(max_workers=max_threads) as executor: - file_paths = [] - - for root, _, files in os.walk(domains_directory): - for filename in files: - file_paths.append(os.path.join(root, filename)) - - for file_path in file_paths: - future = executor.submit(handle_url_validation, file_path) - -result_file_path = os.path.join(repository_directory, "url-validation-result.json") -with open(result_file_path, "w") as result_file: - json.dump(urls_data, result_file, indent=4) - -print(f"Results saved to {result_file_path}")