diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ebf1a0..ed7fc11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,22 @@ # 更新日志 +v1.3.1 +--- +- CHANGE: 优化代码结构,提升性能 +- CHANGE: 剃刀计划,减少多余日志输出 +- CHANGE: 调整缓存参数 + +24w10a +--- +- CHANGE: 优化代码结构,提升性能 +- CHANGE: 剃刀计划,减少多余日志输出 +- CHANGE: 调整缓存参数 + v1.3.0 --- - CHANGE: 优化代码结构,提升性能 - CHANGE: 优化黑名单功能,提升稳定性 -- CHANGE: 剃刀计划,减少调试用日志输出 +- CHANGE: 剃刀计划,减少多余日志输出 - ADD: 新增auth子模块blacklist.go,支持黑名单功能 - ADD: 新增blacklist.json文件,用于配置黑名单 - CHANGE: config.yaml文件格式修改,使其具备更好的可读性 diff --git a/DEV-VERSION b/DEV-VERSION index 04d4815..77febf4 100644 --- a/DEV-VERSION +++ b/DEV-VERSION @@ -1 +1 @@ -24w09b \ No newline at end of file +24w10a \ No newline at end of file diff --git a/README.md b/README.md index 3dec4bb..3ba4bca 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ server: # 日志配置 logger: logfilepath: "/data/ghproxy/log/ghproxy.log" # 日志文件路径(小白请勿修改) - maxlogsize: 25 # MB + maxlogsize: 5 # MB # CORS 配置 cors: diff --git a/VERSION b/VERSION index 589268e..6261a05 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.0 \ No newline at end of file +1.3.1 \ No newline at end of file diff --git a/auth/blacklist.go b/auth/blacklist.go index 8b36c81..edeb9c5 100644 --- a/auth/blacklist.go +++ b/auth/blacklist.go @@ -41,6 +41,5 @@ func forRangeCheck(blist []string, fullrepo string) bool { return true } } - logw("%s not in blacklist", fullrepo) return false } diff --git a/caddyfile/dev/Caddyfile b/caddyfile/dev/Caddyfile index 75798e9..7f5f2b9 100644 --- a/caddyfile/dev/Caddyfile +++ b/caddyfile/dev/Caddyfile @@ -72,7 +72,7 @@ import header_realip } import log ghproxy - import cache 0s 600s + import cache 0s 300s import error_page import encode import rate_limit 60 @@ -84,7 +84,7 @@ route /favicon.ico { root /data/www file_server - import cache 60s 24h + import cache 0s 24h } handle_errors { @redirects `{err.status_code} in [301, 302, 307]` diff --git a/caddyfile/release/Caddyfile b/caddyfile/release/Caddyfile index 2fb34f4..959f1c3 100644 --- a/caddyfile/release/Caddyfile +++ b/caddyfile/release/Caddyfile @@ -60,12 +60,6 @@ header_up X-Forwarded-Proto {http.request.header.CF-Visitor} } -(buffer) { - flush_interval 2000s - buffer_responses - max_buffer_size 256k -} - (rate_limit) { route /* { rate_limit {remote.ip} {args[0]}r/m 10000 429 @@ -78,7 +72,7 @@ import header_realip } import log ghproxy - import cache 0s 600s + import cache 0s 300s import error_page import encode route /* { @@ -92,7 +86,7 @@ route /favicon.ico { root /data/www file_server - import cache 60s 24h + import cache 0s 24h } } diff --git a/config/config.yaml b/config/config.yaml index d760363..f64a3b7 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -7,7 +7,7 @@ server: # Logging Configuration logger: logfilepath: "/data/ghproxy/log/ghproxy.log" - maxlogsize: 25 # MB + maxlogsize: 5 # MB # CORS Configuration cors: