mirror of
https://github.com/Ysurac/openmptcprouter-vps-admin.git
synced 2025-03-09 15:40:05 +00:00
Fix status
This commit is contained in:
parent
4e6b8ea2d5
commit
83a21e7d49
1 changed files with 5 additions and 0 deletions
|
@ -867,6 +867,11 @@ async def status(userid: Optional[int] = Query(None), current_user: User = Depen
|
|||
v2ray_tx = get_bytes_v2ray('tx',username)
|
||||
v2ray_rx = get_bytes_v2ray('rx',username)
|
||||
vpn = 'glorytun_tcp'
|
||||
with open('/etc/openmptcprouter-vps-admin/omr-admin-config.json') as f:
|
||||
try:
|
||||
omr_config_data = json.load(f)
|
||||
except ValueError as e:
|
||||
omr_config_data = {}
|
||||
if 'vpn' in omr_config_data['users'][0][username]:
|
||||
vpn = omr_config_data['users'][0][username]['vpn']
|
||||
vpn_traffic_rx = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue