MathNodes / meile-gui

Meile dVPN GUI for Linux, OS X, and Windows - Powered by the Sentinel Network
https://meile.app
GNU General Public License v3.0
34 stars 6 forks source link

BUG: Real-time bandwidth is higher after switching nodes #30

Closed MathNodes closed 1 year ago

MathNodes commented 1 year ago

Due to limitations of NICs on *nix systems, the reported bytes sent/bytes recieved on the wireguard interface is not immediately flushed and so those totals do not reflect accurate data.

This can be workedaround by storing bytes sent/bytes received upon connection in the NodeSwitch dictionary and subtracting those initial amounts from the scheduler task checking to make sure it is greater than or equal to zero.

MathNodes commented 1 year ago

This seems to be occurring on all platforms. I believe this is due to data not clearing out from the previous node and each node's used bandwidth is being summed. It would be good to create a dictionary of each nodes utilized bandwidth and sum ongoing usage from that with the starting point of the on-chain data.

MathNodes commented 1 year ago

https://github.com/MathNodes/meile-gui/commit/2190fc9c6bf80f8ec6f29f94dfdcb3046e82b162