1
Fork 0

add metrics
All checks were successful
/ deploy (push) Successful in 6s

This commit is contained in:
toufic ar 2026-02-05 22:19:32 +02:00
parent 7f29a1f315
commit b0786a03a9
Signed by: toufic ar
SSH key fingerprint: SHA256:/NaO5I1nG3gYKzrzSiTYIdRyaIYxDWfr1U+d+yfJ/4k
2 changed files with 75 additions and 1 deletions

View file

@ -19,6 +19,7 @@
:root {
--background: #38383d;
--text: #ececec;
--text-alt: #868689;
--primary: #cc80ff;
--accent: #68b030;
::selection {
@ -68,7 +69,20 @@
>adonis</a
>
runs a tor relay node and a snowflake proxy.<br />
this helps people stay anonymous and circumvent censorship.
this helps people stay anonymous and circumvent censorship:<br />
<span
style="
color: var(--accent);
font-weight: bolder;
text-decoration: underline;
text-decoration-color: var(--accent);
"
id="snowflake_conns"
></span>
<span style="color: var(--text-alt); font-weight: bolder"
>snowflake connections since last restart</span
>
<br />
</p>
</div>
@ -95,4 +109,23 @@
></iframe>
</div>
</body>
<script>
async function fetchConnections() {
try {
const res = await fetch("https://tor.toufy.me/metrics.php", {
method: "GET",
headers: { Accept: "application/json" }
});
if (!res.ok) {
console.log(res);
snowflake_conns.innerHTML = 0;
return;
}
snowflake_conns.innerHTML = (await res.json()).snowflake_connections;
} catch (_) {
snowflake_conns.innerHTML = 0;
}
}
fetchConnections();
</script>
</html>