-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.env.example
More file actions
33 lines (25 loc) · 1.84 KB
/
config.env.example
File metadata and controls
33 lines (25 loc) · 1.84 KB
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
# Hiddify Usage Engine (HUE) - Environment Variables Configuration
HUE is designed to be fully configurable via Environment Variables to minimize the need for complex configuration files and to simplify Docker/K8s deployments.
## 1. Core & Database
- `HUE_DB_URL`: The database connection string. (e.g., `sqlite://./hue.db`, `postgres://user:pass@host:5432/huedb`)
- `HUE_PORT`: The listening port for the Core API/gRPC server (default: `50051`).
- `HUE_LOG_LEVEL`: Logging verbosity (`debug`, `info`, `warn`, `error`).
- `HUE_LOG_FILE`: Path to a text log file if file-based logging is preferred (default: `stdout`).
## 2. Performance & Quota Engine
- `HUE_REPORT_INTERVAL`: How often services should be polled or push usage (default: `60s`).
- `HUE_DB_FLUSH_INTERVAL`: Interval for batch-writing usage from memory to the database (default: `5m`).
- `HUE_DISCONNECT_BATCH_SIZE`: Number of disconnect commands to group together (default: `50`).
- `HUE_USAGE_DATA_RETENTION`: Duration to keep granular usage logs before deletion or aggregation (default: `30d`).
- `HUE_HIST_DATA_RETENTION`: Duration to keep aggregated historical data (default: `365d`).
## 3. Concurrent & Penalty Logic
- `HUE_CONCURRENT_WINDOW`: Time window in seconds to count unique IPs for concurrency (default: `5m`).
- `HUE_PENALTY_DURATION`: Duration in minutes a user is suspended when exceeding `max_concurrent` (default: `10m`).
## 4. Geo-IP & Privacy
- `HUE_MAXMIND_DB_PATH`: Path to the MaxMind GeoLite2-City.mmdb file.
## 5. Security
- `HUE_AUTH_SECRET`: Master secret for generating/signing internal tokens (if not using mTLS).
- `HUE_TLS_CERT`: Path to the TLS certificate file.
- `HUE_TLS_KEY`: Path to the TLS private key file.
- `HUE_ALLOWED_NODE_IPS`: IP whitelist for Node connections (cidr list).
## 6. Event Sourcing
- `HUE_EVENT_STORE_TYPE`: Where to store events (`db`, `file`, `none`).