summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRikki <i@rikki.moe>2025-04-13 16:32:28 +0800
committerRikki <i@rikki.moe>2025-04-13 16:32:28 +0800
commit9e92b326e4d27d1ed21aaac84945c2076e09c5fe (patch)
treee9e1b9c04998dd5936f9ac7d9e7b2caf4a750951
parent4023d721d560c8b7c715e0ee7f98398126fd9ca3 (diff)
Add readme
-rw-r--r--README.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6ac2481
--- /dev/null
+++ b/README.md
@@ -0,0 +1,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 \ No newline at end of file