mirror of
https://github.com/wweir/sower.git
synced 2026-10-19 16:14:33 +00:00
The console now records the client source IP for every connection and DNS query, shows the top clients, and can filter the domain list by one: - WrapConn captures conn.RemoteAddr into the counting conn; RecordDNS takes the client IP from the DNS ResponseWriter. Domain stats keep a per-client breakdown alongside the per-source one. - /api/traffic?client=<ip> restricts domains to that client and reports the client's conns/bytes/lastSeen; it composes with ?source=. - The snapshot now carries clients: top 50 per-IP aggregates (conns, bytes up/down, last seen) for display. - Traffic page shows a client chip row (全部客户端 + IPs with counts); clicking one filters, tooltips show byte totals. Verified live: ?client=192.168.1.1 lists that device's domains with its counts; ?source=dns&client=... composes correctly.
15 lines
444 B
HTML
15 lines
444 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="color-scheme" content="light" />
|
|
<title>Sower Admin</title>
|
|
<script type="module" crossorigin src="/assets/index-WVE-D9IS.js"></script>
|
|
<link rel="stylesheet" crossorigin href="/assets/index-BmVtM7ex.css">
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
</body>
|
|
</html>
|