mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2026-01-07 22:10:39 +08:00
fix traffic report
This commit is contained in:
parent
fc0b4bf72e
commit
3fa7deacb8
@ -19,7 +19,7 @@ require (
|
||||
google.golang.org/protobuf v1.36.6
|
||||
)
|
||||
|
||||
replace github.com/sagernet/sing-box => github.com/Mahdi-zarei/sing-box v1.3.5-0.20250330212248-5e1acd1fa0b1
|
||||
replace github.com/sagernet/sing-box => github.com/Mahdi-zarei/sing-box v1.3.5-0.20250401221729-163beb8eadb1
|
||||
|
||||
replace github.com/sagernet/sing-dns => github.com/Mahdi-zarei/sing-dns v0.3.0-beta.14.0.20250201180230-3ed9d1ef74d5
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
github.com/Mahdi-zarei/sing-box v1.3.5-0.20250330212248-5e1acd1fa0b1 h1:jgIecHHaWJMjrRgSbNUz1DaYPuze2DC9w1i7qOxTzK8=
|
||||
github.com/Mahdi-zarei/sing-box v1.3.5-0.20250330212248-5e1acd1fa0b1/go.mod h1:Qj9fRk26crpl3H8MTtLtZ+q5Jme0Kj3Lnxdvku/Mgos=
|
||||
github.com/Mahdi-zarei/sing-box v1.3.5-0.20250401221729-163beb8eadb1 h1:JXGnvTuSyVA251hAhYtLv0d7NpjERQvwCrt3lkPvdOI=
|
||||
github.com/Mahdi-zarei/sing-box v1.3.5-0.20250401221729-163beb8eadb1/go.mod h1:Qj9fRk26crpl3H8MTtLtZ+q5Jme0Kj3Lnxdvku/Mgos=
|
||||
github.com/Mahdi-zarei/sing-dns v0.3.0-beta.14.0.20250201180230-3ed9d1ef74d5 h1:AdwcBEKyia7lvdqJq77G0imGej8IFkHGENfjif+OwHs=
|
||||
github.com/Mahdi-zarei/sing-dns v0.3.0-beta.14.0.20250201180230-3ed9d1ef74d5/go.mod h1:8wuFcoFkWM4vJuQyg8e97LyvDwe0/Vl7G839WLcKDs8=
|
||||
github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
|
||||
|
||||
@ -31,8 +31,8 @@ namespace NekoGui_traffic {
|
||||
auto down = resp.downs().at(item->tag);
|
||||
item->uplink += up;
|
||||
item->downlink += down;
|
||||
item->uplink_rate = up * 1000 / interval;
|
||||
item->downlink_rate = down * 1000 / interval;
|
||||
item->uplink_rate = static_cast<double>(up) * 1000.0 / static_cast<double>(interval);
|
||||
item->downlink_rate = static_cast<double>(down) * 1000.0 / static_cast<double>(interval);
|
||||
auto isInter = false;
|
||||
for (const auto& inter_tag : resp.intermediate_tags())
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user