32 Commits

Author SHA1 Message Date
c04f600332 添加favicon支持,更新docker-compose配置以挂载favicon目录,并在主程序中实现favicon.ico处理器,提供自定义favicon功能。 2025-06-22 12:53:27 +08:00
da3200c605 添加IP封禁功能,增强安全管理,支持配置IP封禁策略,包括错误阈值、统计窗口、封禁时长和清理间隔。更新配置页面以支持安全设置的可视化管理。 2025-06-21 21:33:12 +08:00
83c544bd5b 添加动态压缩管理器支持,优化配置更新逻辑,确保压缩配置可动态调整。更新配置处理器以使用ConfigManager,简化配置保存和加载流程。 2025-06-02 07:52:33 +08:00
ef1bec7710 移除不再使用的godotenv依赖和相关代码,简化主程序逻辑。 2025-03-22 19:57:16 +08:00
cc45cac622 feat(config): 更新配置管理和扩展名规则处理
- 在配置中添加新的扩展名规则支持,允许用户定义文件扩展名与目标URL的映射
- 优化配置加载逻辑,确保路径配置的扩展名规则在初始化时得到处理
- 更新前端配置页面,支持添加、编辑和删除扩展名规则
- 增强错误处理和用户提示,确保用户体验流畅
2025-03-22 18:17:30 +08:00
8fb5dec9a4 refactor(routes): 重构API路由处理逻辑
- 引入 Route 结构体定义路由配置
- 使用路由切片替换原有的 switch 语句处理 API 请求
- 简化路由匹配和授权中间件处理流程
- 优化 API 路由的定义和处理方式,提高代码可读性和可维护性
2025-03-10 22:28:09 +08:00
f0c806292b feat(metrics): 完善指标存储服务集成
- 在主程序中添加指标存储服务初始化和停止逻辑
- 更新指标收集器的保存方法,支持外部指标存储服务
- 优化静态文件服务路径,使用新的 web/dist 目录
- 调整静态文件处理逻辑,支持更灵活的路由
2025-03-09 11:00:39 +08:00
4af1592021 删除固定路径代理配置, 因为普通代理好像已经支持了 2025-03-03 06:47:52 +08:00
a4437b9a39 feat(auth): Implement OAuth-based authentication with Q58 platform
- Replace password-based login with OAuth authentication
- Add OAuth login and callback handlers
- Support user whitelist via environment variables
- Update login page to use OAuth flow
- Remove legacy metrics-related authentication configuration
- Enhance token management with username tracking
2025-02-17 05:43:23 +08:00
c51d4869ba feat(auth): Add authentication to cache management API and frontend
- Implement token-based authentication for cache-related API endpoints
- Add authorization headers to frontend fetch requests
- Handle unauthorized access by redirecting to login page
- Improve security for cache configuration and management routes
2025-02-16 14:06:04 +08:00
ffc64bb73a feat(cache): Add fixed path cache support to admin dashboard and API
- Integrate fixed path cache into cache admin handler and API endpoints
- Update cache admin dashboard to display fixed path cache statistics
- Modify cache management functions to support fixed path cache operations
- Add new cache type to frontend cache management UI
2025-02-15 17:32:27 +08:00
c4cd99a827 feat(cache): Implement comprehensive caching system for proxy requests
- Add CacheManager to handle caching for proxy and mirror handlers
- Introduce cache-related API endpoints for stats, enabling, and clearing
- Modify proxy and mirror handlers to support caching GET requests
- Remove rate limiting and simplify request handling
- Update go.mod dependencies and remove unused imports
- Add cache hit/miss headers to responses
- Enhance metrics collection for cached requests
2025-02-15 17:00:16 +08:00
33d6a51416 refactor(web): Migrate to modern web frontend and simplify admin routes
- Remove legacy static files, templates, and JavaScript
- Update main.go to serve SPA-style web application
- Modify admin route handling to support client-side routing
- Simplify configuration and metrics API endpoints
- Remove server-side template rendering in favor of static file serving
- Update Dockerfile and GitHub Actions to build web frontend
2025-02-15 11:44:09 +08:00
ab8684d4c5 refactor(admin): Enhance template rendering and routing for admin pages
- Update template rendering to use a dynamic layout with configurable title
- Modify template parsing to use template.Must for simplified error handling
- Update static file serving path from /web/static to /admin/static
- Improve template execution with dynamic content mapping
- Simplify template loading and error management in main.go
2025-02-15 09:45:36 +08:00
8a2207bd29 feat(templates): Implement template rendering for admin routes
- Replace static file serving with Go template rendering
- Add template parsing for login, metrics, and config pages
- Set appropriate content type headers for HTML responses
- Improve error handling for template rendering
- Enhance logging for template-related errors
2025-02-15 09:40:52 +08:00
fa5cbff486 feat(web): Update file paths for static and template serving in Docker environment
- Modify Dockerfile to copy web directory into /app
- Update main.go to serve static and template files from absolute paths (/app/web)
- Add debug logging for static file and template route handling
- Ensure consistent file serving across admin and web routes
2025-02-15 09:29:55 +08:00
ca79cc7dac feat(routing): Enhance main handler with admin route management and debug logging
- Refactor routing logic to use a more modular handler approach
- Add dedicated admin route handler with explicit path matching
- Implement comprehensive debug logging for request handling
- Simplify main handler by removing nested admin route logic
- Add fallback NotFound handler for unmatched routes
2025-02-15 08:51:16 +08:00
e89ef02205 特性(代理):通过端口和身份验证更新来增强服务器配置和安全性。
- 更新 docker-compose.yml 文件,使用端口 3336
- 修改 Dockerfile 以暴露端口 3336
- 重构 main.go 以支持新的路由和管理端点
- 在 auth.go 中实现健壮的身份验证中间件
- 通过加强错误检查来改进指标处理。
- 添加用于安全类型转换的实用函数
- 引入请求ID生成功能,以便更好地进行追踪。
2025-02-15 08:07:28 +08:00
1440eec7ed refactor(metrics): remove deprecated metrics history endpoint and clean up related code
- Removed the MetricsHistoryHandler and associated historical data export functionality to streamline the metrics handling process.
- Updated the metrics template to improve label translations and ensure default values are used for optional data fields.
- Enhanced the JavaScript code for metrics display by adding checks for undefined data arrays, improving robustness.
- Cleaned up unused variables and functions to maintain code clarity and reduce complexity.

These changes simplify the metrics system by eliminating outdated features and improving the overall reliability of data presentation.
2024-12-05 11:09:44 +08:00
058244cc70 feat(metrics): enhance configuration and performance monitoring
- Added new performance monitoring settings in the configuration, including maximum requests per minute and data transfer limits.
- Introduced validation parameters for metrics, ensuring data integrity and consistency checks during collection.
- Refactored the metrics collector to streamline initialization and improve error handling.
- Removed deprecated database-related code and optimized metrics saving processes.
- Enhanced historical data management with regular clean-up routines to maintain performance.

These changes improve the configurability and reliability of the metrics system, ensuring accurate data handling and enhanced monitoring capabilities.
2024-12-05 10:56:27 +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
ef97e833e6 refactor(main): streamline metrics route handling in main function 2024-11-30 21:19:05 +08:00
e9e932b0b7 feat(main): add metrics routes for enhanced monitoring and remove duplicate route definitions 2024-11-30 21:14:16 +08:00
8770d79bb8 feat(docker-compose, config, handler): enhance deployment configuration, add metrics support, and improve proxy handling
- Updated docker-compose.yml to include resource limits and health checks for the service.
- Modified go.mod and go.sum to include the new dependency on golang.org/x/time.
- Enhanced main.go to add new metrics routes for monitoring.
- Updated config.json to include metrics configuration with password and token expiry.
- Refactored internal/config to implement a ConfigManager for dynamic configuration loading.
- Improved internal/handler to utilize a shared HTTP client and added metrics tracking for requests.
2024-11-30 21:11:05 +08:00
2f0be5f38d feat(handler): add mirror proxy handler for URL prefix "/mirror/" 2024-11-13 17:50:06 +08:00
c2c6e14736 refactor(main): update handler matching logic to use function instead of prefix 2024-10-31 08:24:26 +08:00
8f2c035e93 feat(config, middleware): add fixed paths configuration and proxy middleware 2024-10-31 07:44:54 +08:00
830eb864ef refactor(main): improve CDNJS path matching logic 2024-10-31 07:21:06 +08:00
06f6011b05 feat(middleware): add CDNJS middleware for handling specific paths 2024-10-31 07:15:48 +08:00
39605e0033 refactor(cmd/proxy): consolidate main function into single file 2024-10-30 07:44:29 +08:00
723b73d748 feat: add compression support and update deployment workflow
add brotli and gzip compression support, update docker-compose and deployment script
2024-10-30 07:43:17 +08:00
6762c822ab first commit 2024-10-29 23:00:16 +08:00