initial commit

This commit is contained in:
Minecon724 2024-05-12 16:45:33 +02:00
commit 26fadc96ba
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8
8 changed files with 488 additions and 0 deletions

34
deploy.py Normal file
View file

@ -0,0 +1,34 @@
from ftplib import FTP
import requests
import minify_html
from os import listdir, getenv
from io import BytesIO
# init ftp
ftp = FTP(getenv('FTP_SERVER'))
ftp.login(getenv('FTP_USER'), getenv('FTP_PASSWORD'))
for f in [i for i in listdir('html') if i.endswith('.html')]:
# 1. Minify the index.html file using minify-html
minified_content = minify_html.minify(open(f, 'r').read(), minify_css=True, minify_css_level_3=True, do_not_minify_doctype=True)
# 2. Upload the file to an FTP server
ftp.storbinary('STOR ' + f, BytesIO(minified_content.encode()))
ftp.storbinary('STOR geofeed.csv', BytesIO(open('../geofeed.csv', 'r').read().encode()))
# refresh cache
url = 'https://api.bunny.net/purge?url=https%3A%2F%2Fdn42.724.rocks&async=false' # replace with your URL
headers = {
'AccessKey': getenv("ACCESS_KEY")
}
response = requests.get(url, headers=headers)
# Quit ftp
ftp.quit()

0
geofeed.csv Normal file
View file

196
html/index-old.html Normal file
View file

@ -0,0 +1,196 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>dn724</title>
<style>
html {
padding-top: 1.5vh;
}
body {
background: #111;
color: #fff;
font: 1.5em/1.48em Arial, Helvetica, sans-serif;
}
h1, p {
font-weight: 700;
}
p {
font-size: 1.2em;
}
a {
color: #f0e0ff;
text-decoration: none;
border-radius: 20%;
transition: all 20ms ease-out;
}
a:hover {
border-bottom: 1px solid #f0e0ff;
border-radius: 0;
}
#m {
width: min-content;
min-width: 20vw;
max-width: 93vw;
margin: 0 auto;
margin-bottom: 15px;
}
small {
font-weight: 500;
font-size: 0.8em;
margin: 0;
}
li {
padding: 2px 15px;
border-radius: 15px;
transition: background-color .05s ease-out;
}
li[data-nid] {
margin-bottom: 3px;
padding: 5px 13px;
}
li[data-nid]:hover {
background-color: rgb(30,30,30);
}
.big {
width: 100%;
text-align: center;
display: block;
}
.sep {
width: 100%;
height: 1px;
background: rgba(255,255,255,0.1);
margin-top: 15px;
}
.dark {
color: rgba(255,255,255,0.1);
}
li[data-nid]:hover > .hidden > div {
margin-top: 5px;
border-radius: 15px;
opacity: 1;
}
.hidden {
overflow: hidden;
}
.hidden > div {
border-radius: 0 0 15px 15px;
margin-top: -35%;
margin-bottom: 10px;
transition: margin .17s ease, opacity .05s ease-out;
padding: 5px 13px;
font-size: 1.2rem;
line-height: 1.4rem;
background-color: rgb(40,40,40);
opacity: 0;
}
</style>
<div id="m">
<h1>
<span style="color: #ebebeb;">AS424242</span><span>0129</span>
</h1>
open for peering!
<div class="sep"></div>
<p class="big">nodes</p>
<ul>
<li data-nid="de-fra">
Frankfurt, Germany
<br>
<strong>de-fra.420129.xyz</strong>
<br>
dual, 1 Gbps
<div class="hidden">
<div>
<a href="https://bgp.tools/as/213250">AS213250 (Combahton)</a>
<br>
fe80::129:93a8
</div>
</div>
</li>
<li data-nid="de-nue">
Nuremberg, Germany
<br>
<strong>de-nue.420129.xyz</strong>
<br>
dual, 10 Gbps
<div class="hidden">
<div>
<a href="https://bgp.tools/as/206216">AS206216 (Cogent)</a>
<br>
fe80::129:c550
</div>
</div>
</li>
<li data-nid="nl-ams">
Amsterdam, Netherlands
<br>
<strong>nl-ams.420129.xyz</strong>
<br>
dual, ½ Gbps
<div class="hidden">
<div>
<a href="https://bgp.tools/as/31898">AS31898 (Oracle)</a>
<br>
fe80::129:c9db
</div>
</div>
</li>
<li data-nid="nl-ams">
Warsaw, Poland
<br>
<strong>pl-waw.420129.xyz</strong>
<br>
dual, 1 Gbps
<div class="hidden">
<div>
<a href="https://bgp.tools/as/215467">AS215467</a>
<br>
fe80::129:669a
</div>
</div>
</li>
</ul>
<div class="sep"></div>
<p class="big">peering</p>
Requirements:
<ul>
<li>same continent</li>
<li>WireGuard</li>
<li>one peering per region</li>
</ul>
Also:
<ul>
<li>if you require a psk, ask</li>
<li>dig TXT for public keys</li>
<li><a href="https://mxroutedocs.com/troubleshooting/microsoftnoreceive/">if you use outlook, stop</a></li>
</ul>
<div class="sep"></div>
<p class="big">contact</p>
<ul>
<li><a href="mailto:dn42@724.rocks">dn42@724.rocks</a> (<a href="/dn724%20dn42%40724.rocks-(0xCF4D2C93D80C10AC)-public.asc">PGP</a>)</li>
<li>Telegram: <a href="https://t.me/minecon724">@minecon724</a></li>
</ul>
<span class="big"><a href="https://status.inferior.network">Status</a> | <a href="/services.html">Services</a></span>
<small class="big dark">newtork is fast my man</small>
</div>
</html>

64
html/index.html Normal file
View file

@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>dn724</title>
<style>
html {
font-size: large;
}
body {
margin: 0 auto;
width: fit-content;
}
ul {
margin-bottom: 1.4em;
}
p {
line-height: 0.6em;
}
.hostname {
font-weight: bold;
user-select: all;
}
.meta {
color: darkslategray;
user-select: all;
max-width: 200px;
overflow:scroll;
white-space: nowrap;
}
</style>
<h2>AS4242420129</h2>
<p>Open for peering in:</p>
<ul>
<li>Warsaw, Poland</li>
<li>Frankfurt, Germany </li>
<li>Nuremberg, Germany</li>
<li>Netherlands, Amsterdam</li>
<li><a href="https://git.724.rocks/Minecon724/dn42-info/src/branch/master/nodes.md">Details</a></li>
</ul>
<p>Requirements</p>
<ul>
<li>same continent</li>
<li>one peering per node</li>
<li>WireGuard</li>
</ul>
<p>Other</p>
<ul>
<li>Port is last 5 digits of your ASN</li>
<li>If your ASN is not 424242xxxx, <a href="/port-calc.html">use this</a></li>
</ul>
<p>Contact</p>
<ul>
<li><a href="mailto:dn42@724.rocks">dn42@724.rocks</a> <a href="/dn724%20dn42%40724.rocks-(0xCF4D2C93D80C10AC)-public.asc">(PGP)</a></li>
<li>Telegram: <a href="https://t.me/minecon724">@minecon724</a></li>
</ul>
</html>

48
html/port-calc.html Normal file
View file

@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>dn724</title>
<input type="number" min="0" placeholder="your ASN" oninput="calculate(this)">
<p>Port: <span id="result"></span></p>
<script>
const result = document.getElementById('result');
const isNumber = (s) => /^\d+$/.test(s);
function calculate(el) {
console.log(el);
if (el.value == '') {
result.innerText = '';
return;
}
let cand = cyrb53(el.value).toString().slice(0, 5);
if (cand > 65535 || cand < 30000) {
cand = (cand % 3 + 3) * 10000 + (cand % 10000);
}
result.innerText = cand;
}
const cyrb53 = (str, seed = 0) => {
let h1 = 0xdeadbeef ^ seed, h2 = 0x41c6ce57 ^ seed;
for(let i = 0, ch; i < str.length; i++) {
ch = str.charCodeAt(i);
h1 = Math.imul(h1 ^ ch, 2654435761);
h2 = Math.imul(h2 ^ ch, 1597334677);
}
h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507);
h1 ^= Math.imul(h2 ^ (h2 >>> 13), 3266489909);
h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507);
h2 ^= Math.imul(h1 ^ (h1 >>> 13), 3266489909);
return 4294967296 * (2097151 & h2) + (h1 >>> 0);
};
</script>
</html>

67
html/services.html Normal file
View file

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>dn724</title>
<style>
html {
font: 1.1rem/1.4rem Verdana, Geneva, Tahoma, sans-serif;
margin: 10px 20px;
}
tr {
border-radius: 10px;
box-shadow: 0 1px 2px #eee;
}
td, th {
padding: 0 20px;
text-align: left;
}
th {
padding-bottom: 6px;
border-right: 1px solid #eee;
}
th:last-child {
border-right: none;
}
td:nth-child(even) {
box-shadow: 0 0px 1px #eee;
}
a {
text-decoration: none;
color: blue;
}
</style>
</head>
<body>
<table>
<tr>
<th>Service</th>
<th>Address</th>
<th>Description</th>
</tr>
<tr>
<td>Minetest</td>
<td>nodecode.pivipi.dn42<br></td>
<td>
<ul>
<li>Game: NodeCore</li>
<li>Hosted in Netherlands</li>
</ul>
</td>
</tr>
<tr>
<td>Minecraft</td>
<td>fd11:ef8b:72ac::<br></td>
<td>
<ul>
<li>Running on Cuberite</li>
<li>Hosted in Poland</li>
</ul>
</td>
</tr>
</table>
</body>
</html>

39
nodes.md Normal file
View file

@ -0,0 +1,39 @@
Port is last 5 digits of your ASN\
If your ASN is not 424242xxxx, [use this](https://dn42.724.rocks/port-calc.html)
Warsaw, Poland
- `pl-waw.420129.xyz` 1 Gbps
- Pingables:
- `172.20.183.91`
- `fdfe:8d0:7450:300::`
- `v854+5m4Diqh8oGo6/sGVS7LELsreIjMujkWqwc6bWo=`
- `fe80::129:669a`
- Hosting: [Skhron](https://skhron.com.ua/aff.php?aff=20)
Frankfurt, Germany
- `de-fra.420129.xyz` 1 Gbps
- ⚠️ High latency over IPv6
- Pingables:
- `172.20.183.89`
- `fdfe:8d0:7450:100::`
- `u7Pes8qR8m+/4kc4sNTYani90M2MEbaxRsnXKujqik4=`
- `fe80::129:93a8`
- Hosting: [Datalix](https://datalix.de/a/inff)
Amsterdam, Netherlands
- `nl-ams.420129.xyz` ½ Gbps
- Pingables:
- `172.20.183.93`
- `fdfe:8d0:7450:500::`
- `5iGqF1Cs0r7dvHV6Juarb5ZkFDu7Mc2ke1mgQGVbEXU=`
- `fe80::129:c9db`
- Hosting: Oracle
Nuremberg, Germany
- `de-nue.420129.xyz` 10 Gbps
- Pingables:
- `172.20.183.90`
- `fdfe:8d0:7450:200::`
- `lBYpESYKv+3u/d4Van4EzgOngfPLiCTilAatIFT2gXk=`
- `fe80::129:c550`
- Hosting: [Advin](https://clients.advinservers.com/aff.php?aff=323)

40
pinger.sh Executable file
View file

@ -0,0 +1,40 @@
#!/bin/bash
# List of targets to ping (replace with your desired addresses/hostnames)
targets=("google.com" "cloudflare.com" "example.com")
ipv4=false
ipv6=false
# --- Main Script ---
echo "Checking network connectivity:"
if ping -c 1 -W 1 "8.8.8.8" &>/dev/null; then
echo "IPv4: yes"
ipv4=true
else
echo "IPv4: no"
fi
if ping -c 1 -W 1 "2001:4860:4860::8844" &>/dev/null; then
echo "IPv6: yes"
ipv6=true
else
echo "IPv6: no"
fi
echo "Pings to targets:"
# Ping each target over IPv4 and IPv6
for target in "${targets[@]}"; do
echo "--- $target ---"
# IPv4 ping
ping -i 0.2 -c 4 $target
# IPv6 ping
ping6 -c 4 $target
echo "" # Add a blank line for separation
done