fix: 流量判断阈值去除=号

This commit is contained in:
wyx2685
2025-08-07 15:46:12 +09:00
parent f7b588fb45
commit 06441afa79
3 changed files with 3 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ func (h *Hysteria2) GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTra
traffic := value.(*counter.TrafficStorage) traffic := value.(*counter.TrafficStorage)
up := traffic.UpCounter.Load() up := traffic.UpCounter.Load()
down := traffic.DownCounter.Load() down := traffic.DownCounter.Load()
if up+down >= hook.ReportMinTrafficBytes { if up+down > hook.ReportMinTrafficBytes {
if reset { if reset {
traffic.UpCounter.Store(0) traffic.UpCounter.Store(0)
traffic.DownCounter.Store(0) traffic.DownCounter.Store(0)

View File

@@ -146,7 +146,7 @@ func (b *Sing) GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic,
traffic := value.(*counter.TrafficStorage) traffic := value.(*counter.TrafficStorage)
up := traffic.UpCounter.Load() up := traffic.UpCounter.Load()
down := traffic.DownCounter.Load() down := traffic.DownCounter.Load()
if up+down >= b.nodeReportMinTrafficBytes[tag] { if up+down > b.nodeReportMinTrafficBytes[tag] {
if reset { if reset {
traffic.UpCounter.Store(0) traffic.UpCounter.Store(0)
traffic.DownCounter.Store(0) traffic.DownCounter.Store(0)

View File

@@ -60,7 +60,7 @@ func (x *Xray) GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic,
traffic := value.(*counter.TrafficStorage) traffic := value.(*counter.TrafficStorage)
up := traffic.UpCounter.Load() up := traffic.UpCounter.Load()
down := traffic.DownCounter.Load() down := traffic.DownCounter.Load()
if up+down >= x.nodeReportMinTrafficBytes[tag] { if up+down > x.nodeReportMinTrafficBytes[tag] {
if reset { if reset {
traffic.UpCounter.Store(0) traffic.UpCounter.Store(0)
traffic.DownCounter.Store(0) traffic.DownCounter.Store(0)