No description
Find a file
2025-05-12 15:50:39 +08:00
.github/workflows fix workflow 2025-04-15 10:54:42 +08:00
cmd/v2stat use influx db instead 2025-05-12 15:50:39 +08:00
command init 2025-04-07 16:11:26 +08:00
.gitignore init 2025-04-07 16:11:26 +08:00
go.mod use influx db instead 2025-05-12 15:50:39 +08:00
go.sum use influx db instead 2025-05-12 15:50:39 +08:00
README.md Add readme 2025-04-13 16:32:28 +08:00
v2stat.amd64 use influx db instead 2025-05-12 15:50:39 +08:00

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:

    git clone https://github.com/yourusername/v2stat.git
    cd v2stat
    
  2. Build the project:

    go build -o v2stat
    

Usage

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

License

MIT