wood chen b8d7659aa9 feat(metrics): enhance metrics reporting with uptime, error rate calculation, and recent requests retrieval
- Added uptime and error rate metrics to the MetricsHandler.
- Introduced helper functions for calculating error rates and retrieving recent requests.
- Improved latency formatting in the metrics template for better readability.
- Streamlined the metrics data structure to include requests per second and recent request logs.
2024-11-30 21:50:32 +08:00
2024-10-30 11:19:52 +08:00
2024-10-31 00:39:12 +08:00
2024-11-17 09:58:43 +08:00

Proxy-Go

A simple reverse proxy server written in Go.

使用方法: https://q58.org/t/topic/165?u=wood

说明

  1. 支持gzip和brotli压缩, 在config.json中配置
  2. 不同路径代理不同站点
  3. 回源Host修改
  4. 大文件使用流式传输, 小文件直接提供
  5. 可以按照文件后缀名代理不同站点, 方便图片处理等
  6. 适配Cloudflare Images的图片自适应功能, 支持format=auto

TIPS

写的比较潦草, 希望有能力的同学帮忙完善优化一下

Description
go+nextjs+shadcn. 不同路径代理不同源的代理服务. 支持压缩, cdnjs等类似站点的代理, 大文件流式传输, 适配Cloudflare Images代理
Readme MIT 1.2 MiB
Languages
Go 51%
TypeScript 47.1%
CSS 1.4%
JavaScript 0.4%
Dockerfile 0.1%