jekyll build from Action a683f970ada151cbc00ed10e67c494f3f9494243
This commit is contained in:
parent
f433761367
commit
c3f9416805
28
DISCLAIMER.md
Normal file
28
DISCLAIMER.md
Normal file
@ -0,0 +1,28 @@
|
||||
# Liability Disclaimer for morlana.page Subdomains
|
||||
|
||||
## 1. No Guarantee or Warranty
|
||||
|
||||
- This service is provided **as-is** with no warranty of any kind.
|
||||
- There is **no guarantee** of uptime, stability, or continued operation.
|
||||
|
||||
## 2. User Responsibility
|
||||
|
||||
- Users are **solely responsible** for the content and usage of their subdomains.
|
||||
- The maintainers of `morlana.page` **are not liable** for any damages resulting from the use or removal of a subdomain.
|
||||
|
||||
## 3. Content Responsibility
|
||||
|
||||
- The maintainers **do not monitor** or review the content hosted under subdomains.
|
||||
- If a subdomain is reported for violating laws, it may be **removed without notice**.
|
||||
|
||||
## 4. Right to Modify or Remove Subdomains
|
||||
|
||||
- The maintainers reserve the right to **modify, suspend, or delete** any subdomain at their discretion.
|
||||
- If a subdomain is found to be abusive or misleading, it will be taken down.
|
||||
|
||||
## 5. Legal Compliance
|
||||
|
||||
- Users must comply with all applicable laws and regulations.
|
||||
- The service **will not be held liable** for any illegal or harmful use of a subdomain.
|
||||
|
||||
By using a `morlana.page` subdomain, you acknowledge and accept this disclaimer.
|
41
TERMS_OF_SERVICE.md
Normal file
41
TERMS_OF_SERVICE.md
Normal file
@ -0,0 +1,41 @@
|
||||
# Terms of Service for morlana.page Subdomains
|
||||
|
||||
_Last updated: March 3, 2025_
|
||||
|
||||
## 1. Acceptance of Terms
|
||||
|
||||
By requesting and using a subdomain under `morlana.page`, you agree to these Terms of Service. If you do not agree, you may not use this service.
|
||||
|
||||
## 2. Free Service Disclaimer
|
||||
|
||||
- This service is provided **free of charge** on a best-effort basis.
|
||||
- There is **no guarantee of uptime, performance, or continued availability**.
|
||||
- The maintainers may **suspend or revoke** any subdomain at any time.
|
||||
|
||||
## 3. Allowed Usage
|
||||
|
||||
- Subdomains must **not** be used for illegal, fraudulent, misleading, or malicious activities.
|
||||
- You may only request subdomains for **legitimate websites or services**.
|
||||
- No phishing, spam, malware, or harmful content is allowed.
|
||||
- Subdomains **must not impersonate** official brands, companies, or individuals.
|
||||
|
||||
## 4. Reserved & Restricted Subdomains
|
||||
|
||||
- Some subdomains are **reserved** for administrative or official use.
|
||||
- Requests for these subdomains will be **automatically rejected**.
|
||||
- The maintainers may add or remove reserved names at any time.
|
||||
|
||||
## 5. Liability Disclaimer
|
||||
|
||||
- The maintainers **do not** take responsibility for the content hosted under any subdomain.
|
||||
- You are **fully responsible** for any legal issues arising from your subdomain.
|
||||
- If a subdomain is found in violation of these terms, it may be removed without notice.
|
||||
|
||||
## 6. Modifications to These Terms
|
||||
|
||||
- These terms may be updated at any time without prior notice.
|
||||
- Continued use of a subdomain after updates constitutes acceptance of the revised terms.
|
||||
|
||||
---
|
||||
|
||||
If you have any questions regarding these terms, please contact the maintainers.
|
File diff suppressed because one or more lines are too long
18
domains.yaml
Normal file
18
domains.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
reserved_domains:
|
||||
- "^(www\\.|api\\.|mail\\.|status\\.)morlana\\.page$"
|
||||
- "^admin\\..*"
|
||||
- "^internal\\..*"
|
||||
|
||||
subdomains:
|
||||
- name: www
|
||||
target: pages.morlana-pages.morlana.morlana.space
|
||||
proxy: false
|
||||
note: "Currently the cloudflare proxy service is not supported by Morlana Git Pages service"
|
||||
# - name: "example"
|
||||
# target: "example.com"
|
||||
# proxy: true
|
||||
# note: "Test Subdomain"
|
||||
# - name: "test"
|
||||
# target: "test.example.com"
|
||||
# proxy: false
|
||||
# note: "Proxy deaktiviert"
|
2
feed.xml
2
feed.xml
@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="https://morlana.page/feed.xml" rel="self" type="application/atom+xml" /><link href="https://morlana.page/" rel="alternate" type="text/html" /><updated>2025-03-03T00:03:15+00:00</updated><id>https://morlana.page/feed.xml</id><title type="html">Morlana - Pages</title><subtitle>Free Subdomains provided by Morlana</subtitle></feed>
|
||||
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="https://morlana.page/feed.xml" rel="self" type="application/atom+xml" /><link href="https://morlana.page/" rel="alternate" type="text/html" /><updated>2025-03-03T00:15:41+00:00</updated><id>https://morlana.page/feed.xml</id><title type="html">Morlana - Pages</title><subtitle>Free Subdomains provided by Morlana</subtitle></feed>
|
66
index.html
Normal file
66
index.html
Normal file
@ -0,0 +1,66 @@
|
||||
<h1 id="morlana-pages-free-subdomain-service">Morlana Pages Free Subdomain Service</h1>
|
||||
|
||||
<h2 id="overview">Overview</h2>
|
||||
<p>This repository provides a free subdomain service for the <code class="language-plaintext highlighter-rouge">morlana.page</code> domain, similar to <code class="language-plaintext highlighter-rouge">js.org</code>. Users can request a subdomain by forking this repository, adding their domain entry to <code class="language-plaintext highlighter-rouge">domains.yaml</code>, and submitting a pull request.</p>
|
||||
|
||||
<h2 id="how-it-works">How It Works</h2>
|
||||
<ol>
|
||||
<li>Fork this repository.</li>
|
||||
<li>Add your subdomain entry to <code class="language-plaintext highlighter-rouge">domains.yaml</code>, ensuring it is in alphabetical order.</li>
|
||||
<li>Submit a pull request.</li>
|
||||
<li>Once the PR is approved and merged, an automated workflow updates the DNS records via the Cloudflare API.</li>
|
||||
</ol>
|
||||
|
||||
<h2 id="subdomain-requirements">Subdomain Requirements</h2>
|
||||
<ul>
|
||||
<li>Only <strong>CNAME</strong> records are allowed.</li>
|
||||
<li>The Cloudflare proxy is <strong>enabled by default</strong>, but can be disabled per subdomain.</li>
|
||||
<li>Reserved domains cannot be registered (e.g., <code class="language-plaintext highlighter-rouge">www.morlana.page</code>).</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="how-to-request-a-subdomain">How to Request a Subdomain</h2>
|
||||
<h3 id="1-edit-domainsyaml">1. Edit <code class="language-plaintext highlighter-rouge">domains.yaml</code></h3>
|
||||
<p>Add your subdomain under the <code class="language-plaintext highlighter-rouge">subdomains</code> section:</p>
|
||||
|
||||
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">subdomains</span><span class="pi">:</span>
|
||||
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">your-subdomain"</span>
|
||||
<span class="na">target</span><span class="pi">:</span> <span class="s2">"</span><span class="s">your-site.example.com"</span>
|
||||
<span class="na">proxy</span><span class="pi">:</span> <span class="kc">true</span> <span class="c1"># Set to false if you want to disable the Cloudflare proxy</span>
|
||||
<span class="na">note</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Optional</span><span class="nv"> </span><span class="s">description"</span>
|
||||
</code></pre></div></div>
|
||||
|
||||
<h3 id="2-submit-a-pull-request">2. Submit a Pull Request</h3>
|
||||
<ul>
|
||||
<li>Ensure that your subdomain entry is in <strong>alphabetical order</strong>.</li>
|
||||
<li>Verify that your CNAME target is correct.</li>
|
||||
<li>Create a pull request with your changes.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="reserved-domains">Reserved Domains</h2>
|
||||
<p>Some subdomains are <strong>reserved</strong> and cannot be registered. The list includes:</p>
|
||||
<ul>
|
||||
<li><code class="language-plaintext highlighter-rouge">www.morlana.page</code></li>
|
||||
<li><code class="language-plaintext highlighter-rouge">api.morlana.page</code></li>
|
||||
<li><code class="language-plaintext highlighter-rouge">mail.morlana.page</code></li>
|
||||
<li>Domains matching specific patterns (e.g., <code class="language-plaintext highlighter-rouge">admin.*</code>, <code class="language-plaintext highlighter-rouge">internal.*</code>).</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="automation">Automation</h2>
|
||||
<p>Once a pull request is merged, a GitHub Action will:</p>
|
||||
<ol>
|
||||
<li>Validate the <code class="language-plaintext highlighter-rouge">domains.yaml</code> file.</li>
|
||||
<li>Check for duplicate or reserved domains.</li>
|
||||
<li>Update the Cloudflare DNS settings automatically.</li>
|
||||
</ol>
|
||||
|
||||
<h2 id="setup-for-maintainers">Setup for Maintainers</h2>
|
||||
<h3 id="environment-variables">Environment Variables</h3>
|
||||
<p>To enable Cloudflare DNS updates, set the following secrets in Gitea:</p>
|
||||
<ul>
|
||||
<li><code class="language-plaintext highlighter-rouge">CLOUDFLARE_API_TOKEN</code>: API token with DNS write access.</li>
|
||||
<li><code class="language-plaintext highlighter-rouge">CLOUDFLARE_ZONE_ID</code>: Cloudflare Zone ID for <code class="language-plaintext highlighter-rouge">morlana.page</code>.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="license">License</h2>
|
||||
<p>This project is open-source and licensed under the BSD-3-Clause.</p>
|
||||
|
56
index.md
56
index.md
@ -1,56 +0,0 @@
|
||||
---\nlayout: default\ntitle: Documentation\n---\n\n
|
||||
# Morlana Pages Free Subdomain Service
|
||||
|
||||
## Overview
|
||||
This repository provides a free subdomain service for the `morlana.page` domain, similar to `js.org`. Users can request a subdomain by forking this repository, adding their domain entry to `domains.yaml`, and submitting a pull request.
|
||||
|
||||
## How It Works
|
||||
1. Fork this repository.
|
||||
2. Add your subdomain entry to `domains.yaml`, ensuring it is in alphabetical order.
|
||||
3. Submit a pull request.
|
||||
4. Once the PR is approved and merged, an automated workflow updates the DNS records via the Cloudflare API.
|
||||
|
||||
## Subdomain Requirements
|
||||
- Only **CNAME** records are allowed.
|
||||
- The Cloudflare proxy is **enabled by default**, but can be disabled per subdomain.
|
||||
- Reserved domains cannot be registered (e.g., `www.morlana.page`).
|
||||
|
||||
## How to Request a Subdomain
|
||||
### 1. Edit `domains.yaml`
|
||||
Add your subdomain under the `subdomains` section:
|
||||
|
||||
```yaml
|
||||
subdomains:
|
||||
- name: "your-subdomain"
|
||||
target: "your-site.example.com"
|
||||
proxy: true # Set to false if you want to disable the Cloudflare proxy
|
||||
note: "Optional description"
|
||||
```
|
||||
|
||||
### 2. Submit a Pull Request
|
||||
- Ensure that your subdomain entry is in **alphabetical order**.
|
||||
- Verify that your CNAME target is correct.
|
||||
- Create a pull request with your changes.
|
||||
|
||||
## Reserved Domains
|
||||
Some subdomains are **reserved** and cannot be registered. The list includes:
|
||||
- `www.morlana.page`
|
||||
- `api.morlana.page`
|
||||
- `mail.morlana.page`
|
||||
- Domains matching specific patterns (e.g., `admin.*`, `internal.*`).
|
||||
|
||||
## Automation
|
||||
Once a pull request is merged, a GitHub Action will:
|
||||
1. Validate the `domains.yaml` file.
|
||||
2. Check for duplicate or reserved domains.
|
||||
3. Update the Cloudflare DNS settings automatically.
|
||||
|
||||
## Setup for Maintainers
|
||||
### Environment Variables
|
||||
To enable Cloudflare DNS updates, set the following secrets in Gitea:
|
||||
- `CLOUDFLARE_API_TOKEN`: API token with DNS write access.
|
||||
- `CLOUDFLARE_ZONE_ID`: Cloudflare Zone ID for `morlana.page`.
|
||||
|
||||
## License
|
||||
This project is open-source and licensed under the BSD-3-Clause.
|
||||
|
71
update_cloudflare_dns.py
Normal file
71
update_cloudflare_dns.py
Normal file
@ -0,0 +1,71 @@
|
||||
import yaml
|
||||
import requests
|
||||
import re
|
||||
import os
|
||||
|
||||
# Cloudflare API Konfiguration
|
||||
CLOUDFLARE_API_TOKEN = os.getenv("CLOUDFLARE_API_TOKEN")
|
||||
CLOUDFLARE_ZONE_ID = os.getenv("CLOUDFLARE_ZONE_ID")
|
||||
CLOUDFLARE_API_URL = f"https://api.cloudflare.com/client/v4/zones/{CLOUDFLARE_ZONE_ID}/dns_records"
|
||||
|
||||
HEADERS = {
|
||||
"Authorization": f"Bearer {CLOUDFLARE_API_TOKEN}",
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
|
||||
def load_domains(file_path="domains.yaml"):
|
||||
with open(file_path, "r") as file:
|
||||
return yaml.safe_load(file)
|
||||
|
||||
def is_reserved(domain, reserved_patterns):
|
||||
return any(re.match(pattern, domain) for pattern in reserved_patterns)
|
||||
|
||||
def get_existing_records():
|
||||
response = requests.get(CLOUDFLARE_API_URL, headers=HEADERS)
|
||||
if response.status_code == 200:
|
||||
return {rec["name"]: rec for rec in response.json().get("result", [])}
|
||||
return {}
|
||||
|
||||
def update_cloudflare():
|
||||
data = load_domains()
|
||||
reserved_patterns = data.get("reserved_domains", [])
|
||||
subdomains = {f"{sub['name']}.morlana.page": sub for sub in data.get("subdomains", [])}
|
||||
|
||||
existing_records = get_existing_records()
|
||||
|
||||
# Entferne Einträge, die nicht mehr in domains.yaml stehen
|
||||
for existing_domain in existing_records:
|
||||
if existing_domain.endswith(".morlana.page") and existing_domain not in subdomains:
|
||||
record_id = existing_records[existing_domain]["id"]
|
||||
response = requests.delete(f"{CLOUDFLARE_API_URL}/{record_id}", headers=HEADERS)
|
||||
if response.status_code == 200:
|
||||
print(f"Successfully removed {existing_domain}")
|
||||
else:
|
||||
print(f"Failed to remove {existing_domain}: {response.text}")
|
||||
|
||||
# Neue Einträge hinzufügen oder bestehende aktualisieren
|
||||
for full_domain, subdomain in subdomains.items():
|
||||
if is_reserved(full_domain, reserved_patterns):
|
||||
print(f"Skipping reserved domain: {full_domain}")
|
||||
continue
|
||||
|
||||
record_data = {
|
||||
"type": "CNAME",
|
||||
"name": full_domain,
|
||||
"content": subdomain["target"],
|
||||
"proxied": subdomain.get("proxy", True)
|
||||
}
|
||||
|
||||
if full_domain in existing_records:
|
||||
record_id = existing_records[full_domain]["id"]
|
||||
response = requests.put(f"{CLOUDFLARE_API_URL}/{record_id}", json=record_data, headers=HEADERS)
|
||||
else:
|
||||
response = requests.post(CLOUDFLARE_API_URL, json=record_data, headers=HEADERS)
|
||||
|
||||
if response.status_code in [200, 201]:
|
||||
print(f"Successfully updated {full_domain}")
|
||||
else:
|
||||
print(f"Failed to update {full_domain}: {response.text}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
update_cloudflare()
|
Reference in New Issue
Block a user