Hush Network Map https://map.hush.is
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

14 lines
2.2 KiB

<!DOCTYPE html>
<html>
<head>
<title>Hush Node World Map</title>
<link rel="icon" href="favicon.ico">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css" integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI=" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js" integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM=" crossorigin=""></script>
<style>html,body{height:100%;margin:0;padding:0;background-color:#606060}#map{height:calc(100vh - 14px);width:calc(100vw - 14px);margin:7px}.marker-pulse{width:8px;height:8px;border-radius:50%;background:transparent;box-shadow:0 0 0 0 rgba(255,255,255,1);animation:pulse 1.2s infinite}.marker-pulse.online{background:#00FF00}.marker-pulse.offline{background:red}@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255,255,255,0.7)}70%{box-shadow:0 0 0 10px rgba(255,255,255,0)}100%{box-shadow:0 0 0 0 rgba(255,255,255,0)}}.leaflet-popup-content-wrapper{background-color:#333;color:#fff;border-radius:0px;box-shadow:0 2px 4px rgba(0,0,0,0.3)}.leaflet-popup-content{margin:10px;line-height:1.5}.leaflet-popup-tip{display:none}</style>
</head>
<body>
<div id="map"></div>
<script>var map=L.map('map',{maxBounds:L.latLngBounds([-90,-180],[90,180]),minZoom:3,zoomControl:false}).setView([0,0],2);L.tileLayer('https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png',{attribution:'<a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> | <a href="https://carto.com/attributions">CARTO</a>',subdomains:'abcd',maxZoom:20}).addTo(map);fetch('nodes.dat').then(response=>response.text()).then(data=>{const nodes=data.trim().split('\n').map(line=>{const[lat,lon,owner,location,ip,status,version]=line.split(',');return{lat:parseFloat(lat),lon:parseFloat(lon),owner,location,ip,status,version}});nodes.forEach(node=>{const markerIcon=L.divIcon({className:`marker-pulse ${node.status.toLowerCase()}`,iconSize:[8,8]});const marker=L.marker([node.lat,node.lon],{icon:markerIcon}).addTo(map);marker.bindPopup(`<b>${node.owner}</b><br>Location: ${node.location}<br>IP Address: ${node.ip}<br>Version: ${node.version}<br>Status: ${node.status}`)})}).catch(error=>console.error('Error reading nodes.dat:',error));</script>
</body>
</html>