fix: account for HTTP/S traffic and separate network curves

This commit is contained in:
2026-11-02 14:13:26 +08:00
parent 5291b2ab72
commit 4c3b7ead4e
10 changed files with 336 additions and 13 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ try:
result = subprocess.run(['/usr/sbin/nft', '-j', 'list', 'counters', 'table', 'inet', 'mirrorouc_monitor'], capture_output=True, timeout=4, check=True)
for item in json.loads(result.stdout).get('nftables', []):
counter = item.get('counter', {})
if counter.get('name') in ('https4', 'https6', 'rsync4', 'rsync6'):
if counter.get('name') in ('http4', 'http6', 'rsync4', 'rsync6'):
counters[counter['name']] = counter['bytes']
except (OSError, ValueError, subprocess.SubprocessError):
pass