feat: 新增限流功能 (#718)

* 请求速率限制

* perf: 优化代码

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>
This commit is contained in:
xiaozhu
2023-03-21 09:20:27 +08:00
committed by GitHub
parent 47dc009505
commit e02ab1fbad
7 changed files with 42 additions and 1 deletions

View File

@@ -18,6 +18,8 @@ services:
API_REVERSE_PROXY: xxx
# 访问权限密钥,可选
AUTH_SECRET_KEY: xxx
# 每小时最大请求次数,可选,默认无限
MAX_REQUEST_PER_HOUR: 0
# 超时,单位毫秒,可选
TIMEOUT_MS: 60000
# Socks代理可选和 SOCKS_PROXY_PORT 一起时生效