10 Commits

Author SHA1 Message Date
f7a52a1be5 feat(config): Add max file size threshold and improve path configuration
- Extend PathConfig with MaxSize parameter to define upper file size limit
- Update routing logic to handle both minimum and maximum file size thresholds
- Enhance frontend configuration UI to support max size input
- Improve file routing decision-making with comprehensive size range checks
2025-02-17 18:12:16 +08:00
69050adf57 refactor(routing): Improve file size detection and alternative target routing
- Enhance file size retrieval with fallback mechanisms for alternative and default sources
- Improve logging for file size detection and routing decisions
- Remove unused cache hit check function
- Optimize routing logic for extension-mapped targets
2025-02-17 17:56:29 +08:00
429664b598 feat(routing): Add target URL accessibility check for extension mapping
- Implement `isTargetAccessible` function to validate alternative target URLs
- Add fallback mechanism when alternative target is not reachable
- Enhance routing logic to prevent potential broken redirects
- Log detailed information about routing decisions and accessibility checks
2025-02-17 17:28:25 +08:00
e89ef02205 特性(代理):通过端口和身份验证更新来增强服务器配置和安全性。
- 更新 docker-compose.yml 文件,使用端口 3336
- 修改 Dockerfile 以暴露端口 3336
- 重构 main.go 以支持新的路由和管理端点
- 在 auth.go 中实现健壮的身份验证中间件
- 通过加强错误检查来改进指标处理。
- 添加用于安全类型转换的实用函数
- 引入请求ID生成功能,以便更好地进行追踪。
2025-02-15 08:07:28 +08:00
f8a5999d36 fix(utils): update default size threshold and enhance logging for extension mapping 2025-01-12 18:14:27 +08:00
26c945a3f9 feat(metrics): enhance metrics dashboard and data handling
- Improved the metrics dashboard layout with new styles for better visual presentation, including enhanced chart and control elements.
- Added functionality for auto-refreshing metrics and exporting data to CSV, improving user interaction and data accessibility.
- Implemented persistent statistics tracking in the collector, allowing for historical data retrieval and better performance monitoring.
- Enhanced database operations with optimizations for saving metrics and cleaning up old data, ensuring efficient data management.
- Introduced performance metrics tracking, providing insights into average response times and throughput.

These changes significantly enhance the usability and functionality of the metrics dashboard, providing a more robust framework for performance monitoring and data analysis.
2024-12-05 07:08:08 +08:00
c416c76790 feat(metrics): implement full metrics saving and enhance database schema
- Added functionality to save full metrics periodically and on application shutdown, improving data persistence.
- Introduced new database tables for performance metrics, status code history, popular paths, and referer history, enhancing data tracking capabilities.
- Updated the GetRecentMetrics function to utilize window functions for more accurate metrics retrieval and ensure non-negative values.
- Improved data handling by ensuring empty records are returned instead of null when no metrics are available.

These changes significantly enhance the metrics collection and storage process, providing a more robust framework for performance monitoring.
2024-12-05 06:47:39 +08:00
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
fe6d604600 feat(internal/handler/proxy): enhance proxy handler to handle image requests and important headers
feat(internal/utils): add IsImageRequest function to identify image requests
2024-11-17 09:01:19 +08:00
3c380ef5e9 refactor(internal/handler, internal/middleware): Move getClientIP and formatBytes to utils package 2024-10-31 08:38:07 +08:00