summaryrefslogtreecommitdiff
path: root/README.md
blob: 6ac248184082fbab87dc250eb57fa0ad08750503 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# v2stat

**v2stat** is a lightweight Go application designed to periodically record and store statistics from a V2Ray gRPC API into an SQLite database. It supports clean hourly logging and graceful shutdown.

## Features

- Connects to a V2Ray gRPC stats API
- Records statistics every hour
- Stores stats in a local SQLite database
- Gracefully handles shutdown on SIGINT/SIGTERM
- Configurable via command-line flags

## Requirements

- Go 1.18 or newer
- V2Ray with stats API enabled
- SQLite3
- gRPC client dependencies

## Installation

1. Clone the repository:
    ```bash
    git clone https://github.com/yourusername/v2stat.git
    cd v2stat
    ```

2. Build the project:
    ```bash
    go build -o v2stat
    ```

## Usage

```bash
v2stat --db path/to/v2stat.db --server 127.0.0.1:8080 --log-level info
```

## License

MIT