mirror of
https://github.com/Ysurac/openmptcprouter-vps-admin.git
synced 2025-02-12 10:31:52 +00:00
Fix Shadowsocks Rust stats error
This commit is contained in:
parent
f6e6f218d1
commit
f974719ddc
2 changed files with 10 additions and 3 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
|||
omr-vps-admin (0.9+20240324) unstable; urgency=medium
|
||||
|
||||
* Fix Shadowsocks Rust stats error
|
||||
|
||||
-- OpenMPTCProuter <contact@openmptcprouter.com> Sun, 24 Mar 2024 21:35:13 +0200
|
||||
|
||||
omr-vps-admin (0.9+20240322) unstable; urgency=medium
|
||||
|
||||
* Fix OpenVPN stats
|
||||
|
|
|
@ -171,9 +171,10 @@ def get_bytes_ss_go(user):
|
|||
return { 'downlinkBytes': 0, 'uplinkBytes': 0 }
|
||||
if 'error' in r.json():
|
||||
return { 'downlinkBytes': 0, 'uplinkBytes': 0 }
|
||||
for userdata in r.json()['users']:
|
||||
if userdata['username'] == user:
|
||||
return { 'downlinkBytes': userdata['downlinkBytes'], 'uplinkBytes': userdata['uplinkBytes'] }
|
||||
if 'users' in r.json():
|
||||
for userdata in r.json()['users']:
|
||||
if userdata['username'] == user:
|
||||
return { 'downlinkBytes': userdata['downlinkBytes'], 'uplinkBytes': userdata['uplinkBytes'] }
|
||||
return { 'downlinkBytes': 0, 'uplinkBytes': 0 }
|
||||
|
||||
def get_bytes_v2ray(t,user):
|
||||
|
|
Loading…
Reference in a new issue