From c8fe9bb1484c37d499fd561490edde79fb195ab5 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Fri, 26 Jun 2026 17:42:31 +0200 Subject: [PATCH] =?UTF-8?q?fix(toolbox):=20clarify=20#ads=20labels=20?= =?UTF-8?q?=E2=80=94=20Trackers=20&=20pubs,=20bytes=20marked=20as=20estima?= =?UTF-8?q?te=20(ref=20#735)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The #ads panel mixes ad + tracker + telemetry blocks, and 'bytes saved' is a flat ~45 KB/block estimate (a blocked request is never downloaded, so real bytes cannot be measured). Relabel 'Pubs bloquées' → 'Trackers & pubs bloqués' and mark the byte figure as an estimate (~ + tooltip). Pairs with an operator allowlist update excluding generic AWS API-gateway hosts (execute-api.*) from the ad classifier. --- .../secubox-toolbox/www/toolbox/index.html | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/secubox-toolbox/www/toolbox/index.html b/packages/secubox-toolbox/www/toolbox/index.html index 55341c14..62f65772 100644 --- a/packages/secubox-toolbox/www/toolbox/index.html +++ b/packages/secubox-toolbox/www/toolbox/index.html @@ -179,7 +179,7 @@
-

🛑 Pubs bloquées (24h)

+

🛑 Trackers & pubs bloqués (24h)

loading…
@@ -191,7 +191,7 @@
loading…
-

👤 Top visiteurs (pubs bloquées)

+

👤 Top visiteurs (trackers/pubs bloqués)

loading…
@@ -617,24 +617,24 @@ async function loadAds() { const kpi = document.getElementById('ads-kpi'); const esc = s => String(s).replace(/&/g,'&').replace(//g,'>'); if (!d || d.__error) { kpi.innerHTML = `err${(d&&d.__error)||'no data'}`; return; } - kpi.innerHTML = `Pubs bloquées ${d.total_blocked||0}` - + ` Ko économisés ${Math.round((d.total_bytes||0)/1024)}` + kpi.innerHTML = `Trackers & pubs bloqués ${d.total_blocked||0}` + + ` Ko évités (est.) ~${Math.round((d.total_bytes||0)/1024)}` + ` Silenced ${(d.by_action&&d.by_action.silent)||0}` + ` Fenêtre ${d.window_hours||24}h`; - const hostRows = (d.top_hosts||[]).slice(0, 5).map(r=>`${esc(r.host)}${r.hits}${Math.round((r.bytes||0)/1024)}`).join(''); + const hostRows = (d.top_hosts||[]).slice(0, 5).map(r=>`${esc(r.host)}${r.hits}~${Math.round((r.bytes||0)/1024)}`).join(''); const siteRows = (d.top_sites||[]).slice(0, 5).map(r=>`${esc(r.site)}${r.hits}`).join(''); document.getElementById('ads-hosts').innerHTML = hostRows - ? ''+hostRows+'
Ad hostbloquésKo
' - : '
aucune pub bloquée dans la fenêtre
'; + ? ''+hostRows+'
Tracker / pub hostbloquésKo (est.)
' + : '
rien de bloqué dans la fenêtre
'; document.getElementById('ads-sites').innerHTML = siteRows - ? ''+siteRows+'
Sitepubs bloquées
' + ? ''+siteRows+'
Sitetrackers/pubs bloqués
' : ''; const visRows = (d.top_visitors||[]).slice(0, 5).map(r=>{ const mh = esc(r.mac_hash); return `${mh}${r.hits}`; }).join(''); document.getElementById('ads-visitors').innerHTML = visRows - ? ''+visRows+'
Visiteurpubs bloquées
' + ? ''+visRows+'
Visiteurtrackers/pubs
' : '
aucun visiteur dans la fenêtre
'; } @@ -645,7 +645,7 @@ async function loadAdsClient(mh) { const d = await J('/admin/ad-stats/client/'+encodeURIComponent(mh)); if (!d || d.__error) { detail.innerHTML = `
${(d&&d.__error)||'no data'}
`; return; } const rows = (d.top_hosts||[]).slice(0, 5).map(r=>`${esc(r.host)}${r.hits}${Math.round((r.bytes||0)/1024)}`).join(''); - detail.innerHTML = `

👤 ${esc(d.mac_hash)} — ${d.total||0} pubs bloquées

` + detail.innerHTML = `

👤 ${esc(d.mac_hash)} — ${d.total||0} trackers/pubs bloqués

` + (rows ? ''+rows+'
Ad hostbloquésKo
' : '
aucune pub bloquée pour ce visiteur
');