Skip to content

Commit

Permalink
修复流量统计
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Jul 14, 2023
1 parent 9fee00e commit 8f1d22a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v2ray_util/global_setting/stats_ctr.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def __run_command(self, command):
value = 0
result = bytes.decode(subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL).stdout.strip())
result_list = re.findall(r"\d+", result)
if "v2ctl" not in result and len(result_list) == 1:
value = int(result_list[0])
if len(result_list) > 0:
value = int(result_list[-1])
return value

def get_stats(self, meta_info, is_reset=False, is_group=False):
Expand Down

0 comments on commit 8f1d22a

Please sign in to comment.