Collect V2Ray traffic stats by API.
Project description
V2Ray.Stats
Collect V2Ray traffic stats by API.
Install
pip install v2ray_stats
Usage
usage: v2ray_stats [-h] [-d [database]] [-c [config_path]] [--debug]
[-s [server]] [--interval [INTERVAL]] [-q] [-y [YEAR]]
[-m [MONTH]] [-e]
Collect V2Ray user traffic stats.
optional arguments:
-h, --help show this help message and exit
General:
General settings.
-d [database] Database file path.
-c [config_path] Config file path.
--debug Debug mode.
Daemon:
Daemon settings.
-s [server] V2Ray API server address.
--interval [INTERVAL]
Collector interval.
Query:
Query settings.
-q Query mode, with -y and -m to specific month.
-y [YEAR] Query year.
-m [MONTH] Query month.
-e Send traffic report email to user.
Start daemon to collect v2ray account's traffic stats.
python -m v2ray_stats -s 127.0.0.1:2335
[INFO][2019-03-24 22:35:14] [V2Ray.Stats][utils]: Running in background.
Query account's traffic stats.
python -m v2ray_stats -q -y 2019 -m 3
Table: outband
+------------------+---------+
| Email | Usage |
+==================+=========+
| a959695@live.com | 38.61M |
+------------------+---------+
Table: inbound
+------------------+---------+
| Email | Usage |
+==================+=========+
| a959695@live.com | 8.90M |
+------------------+---------+
Query account's traffic stats and send email to user. (Only outbound)
python -m v2ray_stats -c /etc/v2ray_stats/config.json -q -m 3 -e
Table: outband
+------------------+---------+
| Email | Usage |
+==================+=========+
| a959695@live.com | 38.61M |
+------------------+---------+
Table: inbound
+------------------+---------+
| Email | Usage |
+==================+=========+
| a959695@live.com | 8.90M |
+------------------+---------+
[INFO][2019-03-24 22:33:07] [V2Ray.Stats][utils]: Start to send email.
[INFO][2019-03-24 22:33:08] [V2Ray.Stats][utils]: Send traffic to: a959695@live.com.
[INFO][2019-03-24 22:33:08] [V2Ray.Stats][utils]: Done.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
V2ray.Stats-0.3.2.tar.gz
(10.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file V2ray.Stats-0.3.2.tar.gz.
File metadata
- Download URL: V2ray.Stats-0.3.2.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0e1dc487b08211c793d63fef9abfe9748a83e79a1180c3a5f6b2dcdee19f98e
|
|
| MD5 |
d999b5209bbb46bf982d432d230c4c20
|
|
| BLAKE2b-256 |
db9e71f7698630a2bbdd31b4d580c92ddcb68061b768c4151d9285c240b0865c
|
File details
Details for the file V2ray.Stats-0.3.2-py3-none-any.whl.
File metadata
- Download URL: V2ray.Stats-0.3.2-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5b60822274ce04c4da69a6b5cc5b838e332ddc2a006e2a5d2cd5769d84889e1
|
|
| MD5 |
cc351d9e4012d27f5e186ba15c1b0241
|
|
| BLAKE2b-256 |
a914a23b54cf22e47699b9a003d86784ee49b1ea258c2c93f7104ee39d4b0881
|