24 Commits

Author SHA1 Message Date
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