Commit Graph

5 Commits

  • feat(store): introduce GitTokenStore for token persistence via Git backend
    - Added `GitTokenStore` to handle token storage and metadata using Git as a backing storage.
    - Implemented methods for initialization, save, retrieval, listing, and deletion of auth files.
    - Updated `go.mod` and `go.sum` to include new dependencies for Git integration.
    - Integrated support for Git-backed configuration via `GitTokenStore`.
    - Updated server logic to clone, initialize, and manage configurations from Git repositories.
    - Added helper functions for verifying and synchronizing configuration files.
    - Improved error handling and contextual logging for Git operations.
    - Modified Dockerfile to include `config.example.yaml` for initial setup.
    - Added `gitCommitter` interface to handle Git-based commit and push operations.
    - Configured `Watcher` to detect and leverage Git-backed token stores.
    - Implemented `commitConfigAsync` and `commitAuthAsync` methods for asynchronous change synchronization.
    - Enhanced `GitTokenStore` with `CommitPaths` method to support selective file commits.
  • feat(managementasset): enforce 3-hour rate limit on management asset update checks
    - Introduced synchronization with `sync.Mutex` to ensure thread safety.
    - Added logic to skip update checks if the last check was performed within the 3-hour interval.
  • feat(management): add proxy support for management asset synchronization
    - Introduced `proxyURL` parameter for `EnsureLatestManagementHTML` to enable proxy configuration.
    - Refactored HTTP client initialization with new `newHTTPClient` to support proxy-aware requests.
    - Updated asset download and fetch logic to utilize the proxy-aware HTTP client.
    - Adjusted `server.go` to pass `cfg.ProxyURL` for management asset synchronization calls.
  • feat(management): add support for control panel asset synchronization
    - Introduced `EnsureLatestManagementHTML` to sync `management.html` asset from the latest GitHub release.
    - Added config option `DisableControlPanel` to toggle control panel functionality.
    - Serve management control panel via `/management.html` endpoint, with automatic download and update mechanism.
    - Updated `.gitignore` to include `static/*` directory for control panel assets.