mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-05 18:44:03 +08:00
🌈 Sync 2026-09-29 11:54:37
This commit is contained in:
1 parent
eb664281f6
commit
7eac2a209f
44 files changed
+1356
-869
No files matched your search
@@ -2,7 +2,9 @@
|
||||
|
||||
`luci.client-rates get` accepts up to 1024 IP addresses and returns cached upload
|
||||
and download bytes/second for each address, plus cumulative upload + download
|
||||
bytes keyed by MAC in `totals`. It reads `NETLINK_NETFILTER` connection
|
||||
bytes keyed by MAC in `totals`. The `traffic` table also exposes cumulative
|
||||
`upload` and `download` bytes per MAC, each combining IPv4 and IPv6. The homepage
|
||||
displays upload / download and sorts by their sum. It reads `NETLINK_NETFILTER` connection
|
||||
counters; it never installs packet-filter rules or resets kernel counters.
|
||||
|
||||
On QSDK, ECM's NSS/SFE/PPE statistics synchronization updates these conntrack
|
||||
|
||||
@@ -33,6 +33,13 @@ assert.equal(view.rateValue(view.clientAddresses(lease,hints),totals,'total',mac
|
||||
assert.equal(view.rateValue(['192.168.0.2'],totals,'total',mac)[0],123456);
|
||||
assert.equal(view.rateValue([],totals,'total',mac.toLowerCase())[0],123456);
|
||||
assert.equal(view.rateValue([],{},'total',mac)[1],'-');
|
||||
const split = {traffic:{[mac]:{upload:1200,download:12200}}};
|
||||
assert.deepEqual(view.rateValue([], split, 'total', mac.toLowerCase()),
|
||||
[13400, '%1024.2mB'.format(1200) + ' / ' + '%1024.2mB'.format(12200)]);
|
||||
assert.equal(view.rateValue([], {traffic:{[mac]:{upload:0,download:0}}}, 'total', mac)[0], 0);
|
||||
assert.equal(view.rateValue([], {traffic:{[mac]:{upload:0,download:50}}}, 'total', mac)[1],
|
||||
'%1024.2mB'.format(0) + ' / ' + '%1024.2mB'.format(50));
|
||||
|
||||
assert.equal(view.rateValue([], {totals:{[mac]:0}}, 'total',mac)[0],0);
|
||||
assert.deepEqual(view.rateValue([], {connections:{[mac]:12}}, 'connections', mac), [12,'12']);
|
||||
assert.deepEqual(view.rateValue([], {connections:{[mac]:0}}, 'connections', mac), [0,'0']);
|
||||
|
||||
Reference in new issue
Block a user