Compare commits
2 commits
5c8103e84e
...
c92640e098
Author | SHA1 | Date | |
---|---|---|---|
c92640e098 | |||
0db9f8e871 |
7 changed files with 68 additions and 84 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
cp geofeed.csv dist
|
||||
|
||||
ncftp -u $FTP_USER -p $FTP_PASSWORD $FTP_SERVER -c "rmdir -r *"
|
||||
ncftpput -R -u $FTP_USER -p $FTP_PASSWORD $FTP_SERVER . dist/*
|
||||
|
||||
curl -H "AccessKey: $ACCESS_KEY" "https://api.bunny.net/purge?url=https%3A%2F%2Fdn42.m724.eu&async=false"
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
"scripts": {
|
||||
"start": "parcel src/index.html src/**/index.html",
|
||||
"build": "parcel build src/index.html src/**/index.html"
|
||||
},
|
||||
"devDependencies": {
|
||||
"parcel": "^2.12.0"
|
||||
},
|
||||
|
|
19
src/calculator/index.html
Normal file
19
src/calculator/index.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>dn724</title>
|
||||
|
||||
<script src="./script.js" defer></script>
|
||||
|
||||
<style>
|
||||
html {
|
||||
background: black;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
|
||||
<input type="number" min="0" placeholder="your ASN" oninput="calculate(this)">
|
||||
<p>Port: <span id="result"></span></p>
|
||||
|
||||
</html>
|
32
src/calculator/script.js
Normal file
32
src/calculator/script.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
const result = document.getElementById('result');
|
||||
const isNumber = (s) => /^\d+$/.test(s);
|
||||
|
||||
function calculate(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);
|
||||
};
|
|
@ -10,6 +10,7 @@
|
|||
}
|
||||
body {
|
||||
margin: 0 auto;
|
||||
padding-right: 20px; /* make it look aligned */
|
||||
max-width: calc(100vw - 40px);
|
||||
word-wrap: break-word;
|
||||
width: fit-content;
|
||||
|
@ -20,17 +21,6 @@
|
|||
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;
|
||||
}
|
||||
.sel {
|
||||
user-select: all;
|
||||
}
|
||||
|
@ -44,7 +34,6 @@
|
|||
<li>Rome. Italy</li>
|
||||
<li>Nuremberg, Germany</li>
|
||||
<li>Netherlands, Amsterdam</li>
|
||||
<li><a href="./map/index.html">Network map</a> (uses thunderforest.com API)</li>
|
||||
</ul>
|
||||
|
||||
<p>Peering requirements</p>
|
||||
|
@ -56,11 +45,11 @@
|
|||
<li>I can make an exception for you in most cases</li>
|
||||
</ul>
|
||||
|
||||
<p>Other</p>
|
||||
<p>How to</p>
|
||||
<ul>
|
||||
<li><a href="https://git.m724.eu/Minecon724/dn42-info/src/branch/master/nodes.md">Nodes with details</a></li>
|
||||
<li>Port is last 5 digits of your ASN (2xxx), unless</li>
|
||||
<li>your ASN is not 424242xxxx, then <a href="port-calc.html">use this</a></li>
|
||||
<li>your ASN is not 424242xxxx, then <a href="./calculator">use this</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Contact</p>
|
||||
|
@ -71,4 +60,10 @@
|
|||
<li>Session: <span class=sel>05293535c0f0b5ae76a663f3f875582590edd77abd72ab9b12f3acbe4bb078aa49</span></li>
|
||||
</ul>
|
||||
|
||||
<p>Other</p>
|
||||
<ul>
|
||||
<li><a href="./map">Network map</a> (uses thunderforest.com API)</li>
|
||||
<li><a href="./services.html">Services</a></li>
|
||||
</ul>
|
||||
|
||||
</html>
|
|
@ -1,55 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>dn724</title>
|
||||
|
||||
<style>
|
||||
html {
|
||||
background: black;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
|
||||
<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>
|
|
@ -42,22 +42,12 @@
|
|||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Minetest</td>
|
||||
<td>nodecode.pivipi.dn42<br></td>
|
||||
<td>None yet</td>
|
||||
<td>m724.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>
|
||||
<li>lorem ipsum</li>
|
||||
<li>dolor sit amet</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue