feat: init mirror-proxy project
Build and Push to GHCR / build-and-push (push) Has been cancelled

- Docker Hub / GHCR / GitHub reverse proxy
- Web admin panel with link management
- Dynamic admin path, user and password config
- Rate limiting per link (dual/single auth mode)
- Docker and docker-compose deployment support
- GitHub Actions workflow for auto-publish to GHCR
This commit is contained in:
Agent
2026-05-24 15:27:45 +08:00
commit 9223e35164
16 changed files with 2063 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
package models
import "time"
type ProxyRequest struct {
ID string `json:"id"`
LinkID string `json:"link_id"`
URL string `json:"url"`
Method string `json:"method"`
Status int `json:"status"`
Bytes int64 `json:"bytes"`
Duration int64 `json:"duration_ms"`
ClientIP string `json:"client_ip"`
CreatedAt time.Time `json:"created_at"`
}
type Stats struct {
TotalRequests int64 `json:"total_requests"`
TotalBytes int64 `json:"total_bytes"`
LinkStats map[string]*LinkStat `json:"link_stats"`
}
type LinkStat struct {
LinkID string `json:"link_id"`
RequestCount int64 `json:"request_count"`
BytesTransferred int64 `json:"bytes_transferred"`
LastAccess int64 `json:"last_access"`
}