mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +08:00
24w22b
This commit is contained in:
parent
06191e52e5
commit
8787c11e06
8 changed files with 59 additions and 16 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -1,9 +1,19 @@
|
|||
# 更新日志
|
||||
|
||||
24w22b
|
||||
---
|
||||
- PRE-RELEASE: 此版本是v1.7.1的预发布版本,请勿在生产环境中使用
|
||||
- CHANGE: 更新Go版本至1.23.3
|
||||
- CHANGE: 更新相关依赖库
|
||||
- ADD: 对`Proxy`模块进行优化,增加使用`HEAD`方式预获取`Content-Length`头
|
||||
- CHANGE: 将`release`与`dev`版本的底包切换至`wjqserver/caddy:2.9.0-rc4-alpine`,将`nocache`版本的底包切换至`alpine:latest`
|
||||
- CHANGE: 对`nocache`版本的`config.toml`与`init.sh`进行适配性修改
|
||||
|
||||
24w22a
|
||||
---
|
||||
- PRE-RELEASE: 此版本是v1.7.1的预发布版本,请勿在生产环境中使用
|
||||
- CHANGE: 更新底包
|
||||
- CHANGE: 加入测试性的故障熔断机制(Failure Circuit Breaker)
|
||||
|
||||
v1.7.0
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
24w22a
|
||||
24w22b
|
||||
|
|
@ -3,6 +3,12 @@ services:
|
|||
ghproxy:
|
||||
image: 'wjqserver/ghproxy:latest'
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:80/api/healthcheck"]
|
||||
interval: 60s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
volumes:
|
||||
- './ghproxy/log/run:/data/ghproxy/log'
|
||||
- './ghproxy/log/caddy:/data/caddy/log'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM wjqserver/caddy:2.9.0-rc2-alpine AS builder
|
||||
FROM wjqserver/caddy:2.9.0-rc4-alpine AS builder
|
||||
|
||||
ARG USER=WJQSERVER-STUDIO
|
||||
ARG REPO=ghproxy
|
||||
|
|
@ -36,7 +36,7 @@ RUN wget -O /data/${APPLICATION}/whitelist.json https://raw.githubusercontent.co
|
|||
RUN chmod +x /data/${APPLICATION}/${APPLICATION}
|
||||
RUN chmod +x /usr/local/bin/init.sh
|
||||
|
||||
FROM wjqserver/caddy:2.9.0-rc2-alpine
|
||||
FROM wjqserver/caddy:2.9.0-rc4-alpine
|
||||
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM wjqserver/caddy:2.9.0-rc-alpine AS builder
|
||||
FROM alpine:latest AS builder
|
||||
|
||||
ARG USER=WJQSERVER-STUDIO
|
||||
ARG REPO=ghproxy
|
||||
|
|
@ -27,8 +27,8 @@ RUN VERSION=$(curl -s https://raw.githubusercontent.com/${USER}/${REPO}/main/VER
|
|||
RUN wget -O /usr/local/bin/init.sh https://raw.githubusercontent.com/${USER}/${REPO}/main/docker/dockerfile/nocache/init.sh
|
||||
|
||||
# 拉取配置
|
||||
RUN wget -O /data/caddy/Caddyfile https://raw.githubusercontent.com/${USER}/${REPO}/main/caddyfile/nocache/Caddyfile
|
||||
RUN wget -O /data/${APPLICATION}/config.toml https://raw.githubusercontent.com/${USER}/${REPO}/main/config/config.toml
|
||||
#RUN wget -O /data/caddy/Caddyfile https://raw.githubusercontent.com/${USER}/${REPO}/main/caddyfile/nocache/Caddyfile
|
||||
RUN wget -O /data/${APPLICATION}/config.toml https://raw.githubusercontent.com/${USER}/${REPO}/main/docker/dockerfile/nocache/config.toml
|
||||
RUN wget -O /data/${APPLICATION}/blacklist.json https://raw.githubusercontent.com/${USER}/${REPO}/main/config/blacklist.json
|
||||
RUN wget -O /data/${APPLICATION}/whitelist.json https://raw.githubusercontent.com/${USER}/${REPO}/main/config/whitelist.json
|
||||
|
||||
|
|
@ -36,10 +36,11 @@ RUN wget -O /data/${APPLICATION}/whitelist.json https://raw.githubusercontent.co
|
|||
RUN chmod +x /data/${APPLICATION}/${APPLICATION}
|
||||
RUN chmod +x /usr/local/bin/init.sh
|
||||
|
||||
FROM wjqserver/caddy:2.9.0-rc-alpine
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
COPY --from=builder /data/www /data/www
|
||||
COPY --from=builder /data/caddy /data/caddy
|
||||
COPY --from=builder /data/${APPLICATION} /data/${APPLICATION}
|
||||
COPY --from=builder /usr/local/bin/init.sh /usr/local/bin/init.sh
|
||||
|
||||
|
|
|
|||
32
docker/dockerfile/nocache/config.toml
Normal file
32
docker/dockerfile/nocache/config.toml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
[server]
|
||||
host = "0.0.0.0"
|
||||
port = 80
|
||||
sizeLimit = 125 # MB
|
||||
|
||||
[pages]
|
||||
enabled = true
|
||||
staticDir = "/data/www"
|
||||
|
||||
[log]
|
||||
logFilePath = "/data/ghproxy/log/ghproxy.log"
|
||||
maxLogSize = 5 # MB
|
||||
|
||||
[cors]
|
||||
enabled = true
|
||||
|
||||
[auth]
|
||||
authToken = "token"
|
||||
enabled = false
|
||||
|
||||
[blacklist]
|
||||
blacklistFile = "/data/ghproxy/config/blacklist.json"
|
||||
enabled = false
|
||||
|
||||
[whitelist]
|
||||
enabled = false
|
||||
whitelistFile = "/data/ghproxy/config/whitelist.json"
|
||||
|
||||
[rateLimit]
|
||||
enabled = false
|
||||
ratePerMinute = 180
|
||||
burst = 5
|
||||
|
|
@ -2,10 +2,6 @@
|
|||
|
||||
APPLICATION=ghproxy
|
||||
|
||||
if [ ! -f /data/caddy/config/Caddyfile ]; then
|
||||
cp /data/caddy/Caddyfile /data/caddy/config/Caddyfile
|
||||
fi
|
||||
|
||||
if [ ! -f /data/${APPLICATION}/config/blacklist.json ]; then
|
||||
cp /data/${APPLICATION}/blacklist.json /data/${APPLICATION}/config/blacklist.json
|
||||
fi
|
||||
|
|
@ -18,8 +14,6 @@ if [ ! -f /data/${APPLICATION}/config/config.toml ]; then
|
|||
cp /data/${APPLICATION}/config.toml /data/${APPLICATION}/config/config.toml
|
||||
fi
|
||||
|
||||
/data/caddy/caddy run --config /data/caddy/config/Caddyfile > /data/${APPLICATION}/log/caddy.log 2>&1 &
|
||||
|
||||
/data/${APPLICATION}/${APPLICATION} -cfg /data/${APPLICATION}/config/config.toml > /data/${APPLICATION}/log/run.log 2>&1 &
|
||||
|
||||
while true; do
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM wjqserver/caddy:2.9.0-rc-alpine AS builder
|
||||
FROM wjqserver/caddy:2.9.0-rc4-alpine AS builder
|
||||
|
||||
ARG USER=WJQSERVER-STUDIO
|
||||
ARG REPO=ghproxy
|
||||
|
|
@ -36,7 +36,7 @@ RUN wget -O /data/${APPLICATION}/whitelist.json https://raw.githubusercontent.co
|
|||
RUN chmod +x /data/${APPLICATION}/${APPLICATION}
|
||||
RUN chmod +x /usr/local/bin/init.sh
|
||||
|
||||
FROM wjqserver/caddy:2.9.0-rc-alpine
|
||||
FROM wjqserver/caddy:2.9.0-rc4-alpine
|
||||
|
||||
COPY --from=builder /data/www /data/www
|
||||
COPY --from=builder /data/caddy /data/caddy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue