proxy-go/data/config.json
wood chen 68c27b544b feat(metrics): enhance metrics functionality and configuration
- Added new dependency on github.com/mattn/go-sqlite3 for improved metrics storage.
- Updated main.go to initialize metrics collector with a new database path and configuration settings.
- Enhanced config.json to include additional metrics settings such as alert configurations and latency thresholds.
- Refactored internal metrics handling to support new metrics structures and improve data retrieval.
- Introduced a new metrics history endpoint for retrieving historical data, enhancing monitoring capabilities.
- Improved UI for metrics dashboard to include historical data visualization options.
2024-12-03 17:48:11 +08:00

60 lines
1.4 KiB
JSON

{
"MAP": {
"/path1": {
"DefaultTarget": "https://path1.com/path/path/path",
"ExtensionMap": {
"jpg,png,avif": "https://path1-img.com/path/path/path",
"mp4,webm": "https://path1-video.com/path/path/path"
},
"SizeThreshold": 204800
},
"/path2": "https://path2.com",
"/path3": {
"DefaultTarget": "https://path3.com",
"SizeThreshold": 512000
}
},
"Compression": {
"Gzip": {
"Enabled": false,
"Level": 6
},
"Brotli": {
"Enabled": false,
"Level": 4
}
},
"FixedPaths": [
{
"Path": "/cdnjs",
"TargetHost": "cdnjs.cloudflare.com",
"TargetURL": "https://cdnjs.cloudflare.com"
},
{
"Path": "/jsdelivr",
"TargetHost": "cdn.jsdelivr.net",
"TargetURL": "https://cdn.jsdelivr.net"
}
],
"Metrics": {
"Password": "admin123",
"TokenExpiry": 86400,
"FeishuWebhook": "https://open.feishu.cn/open-apis/bot/v2/hook/****",
"Alert": {
"WindowSize": 12,
"WindowInterval": "5m",
"DedupeWindow": "15m",
"MinRequests": 10,
"ErrorRate": 0.5
},
"Latency": {
"SmallFileSize": 1048576,
"MediumFileSize": 10485760,
"LargeFileSize": 104857600,
"SmallLatency": "3s",
"MediumLatency": "8s",
"LargeLatency": "30s",
"HugeLatency": "300s"
}
}
}