fix(satellite): Selbstdiagnose fuers Netz — warnt bei Docker-/NAT-Netz
Symptom: Satellit fand nur Docker-Container (192.168.65.x / 172.18.x) statt der echten LAN-Geraete. Ursache ist kein Bug, sondern das Deployment-Netz: auf Docker Desktop (Mac/Windows) ist network_mode:host das Docker-VM-NAT, nicht das echte LAN — mDNS/SSDP erreichen die realen Geraete nicht. - satellite.py: _net_context() ermittelt primary_ip + alle IPs und WARNT, wenn der Satellit in einem Docker-/NAT-Netz laeuft (192.168.65.x oder 172.16-31.x). Netz- Info wird in sat_hello + sat_devices mitgeschickt und beim Start geloggt. - Diagnostic: zeigt Netz (primary_ip) pro Satellit + eine rote ⚠-Box mit der Warnung, wenn er im falschen Netz sitzt. - README/compose: klar dokumentiert, dass der Satellit im ECHTEN Ziel-LAN laufen muss (Linux Docker Engine ODER nativ python satellite.py); Docker-Desktop-Falle. py/node clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -4140,7 +4140,9 @@
|
||||
'<button class="btn secondary" onclick="scanSatellite(\'' + escapeHtml(s.id) + '\')" style="padding:3px 8px;font-size:11px;"' +
|
||||
(scanning ? ' disabled' : '') + '>Geraete scannen</button>' +
|
||||
'</div>' +
|
||||
'<div style="color:#8888AA;font-size:11px;margin-top:4px;">kann: ' + escapeHtml(caps) + ' · ' + ctrl + '</div>' +
|
||||
'<div style="color:#8888AA;font-size:11px;margin-top:4px;">kann: ' + escapeHtml(caps) + ' · ' + ctrl +
|
||||
(s.net && s.net.primary_ip ? ' · Netz: ' + escapeHtml(s.net.primary_ip) : '') + '</div>' +
|
||||
(s.net && s.net.warning ? '<div style="color:#FF6E6E;font-size:11px;margin-top:6px;padding:6px;background:#3A1F1F;border-radius:4px;">⚠ ' + escapeHtml(s.net.warning) + '</div>' : '') +
|
||||
devHtml +
|
||||
'</div>';
|
||||
}).join('');
|
||||
|
||||
@@ -481,7 +481,7 @@ const satellites = new Map(); // id → {id, location, caps, control, last_seen}
|
||||
function satelliteList() {
|
||||
const now = Date.now();
|
||||
return Array.from(satellites.values()).map(s => ({
|
||||
id: s.id, location: s.location, caps: s.caps, control: s.control,
|
||||
id: s.id, location: s.location, caps: s.caps, control: s.control, net: s.net || null,
|
||||
online: (now - (s.last_seen || 0)) < 300000,
|
||||
}));
|
||||
}
|
||||
@@ -924,7 +924,8 @@ function connectRVS(forcePlain) {
|
||||
if (p.id) {
|
||||
satellites.set(p.id, {
|
||||
id: p.id, location: p.location || p.id,
|
||||
caps: p.caps || [], control: !!p.control, last_seen: Date.now(),
|
||||
caps: p.caps || [], control: !!p.control, net: p.net || null,
|
||||
last_seen: Date.now(),
|
||||
});
|
||||
broadcastSatellites();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user