feat(center/caddy): add WebTransport reverse-proxy passthrough via PR #7669 fork

This commit is contained in:
zetaloop
2026-05-05 10:51:48 +08:00
parent 2a41969771
commit f3b12f30f0
4 changed files with 39 additions and 8 deletions
+5 -1
View File
@@ -119,7 +119,11 @@ dist
# End of https://mrkandreev.name/snippets/gitignore-generator/#Node # End of https://mrkandreev.name/snippets/gitignore-generator/#Node
DockerFile /app/*/api/Dockerfile
/app/*/rpc/Dockerfile
/app/*/mq/Dockerfile
/app/*/adapter/Dockerfile
/app/*/test/Dockerfile
.idea .idea
# Go compiled binaries # Go compiled binaries
+15
View File
@@ -1,5 +1,8 @@
{ {
email admin@juwan.xhttp.zip email admin@juwan.xhttp.zip
servers {
enable_webtransport
}
} }
(common_log) { (common_log) {
@@ -53,6 +56,17 @@ s3.juwan.xhttp.zip {
juwan.xhttp.zip { juwan.xhttp.zip {
import common_log import common_log
handle /wt/* {
reverse_proxy https://140.82.15.92:8443 {
transport http {
versions 3
tls_insecure_skip_verify
}
}
}
handle {
reverse_proxy http://140.82.15.92:30080 { reverse_proxy http://140.82.15.92:30080 {
lb_policy round_robin lb_policy round_robin
health_uri /healthz health_uri /healthz
@@ -61,3 +75,4 @@ juwan.xhttp.zip {
import stream_proxy import stream_proxy
} }
} }
}
+10
View File
@@ -0,0 +1,10 @@
FROM caddy:2.11.2-builder-alpine AS builder
# 编译带 PR #7669experimental WebTransport reverse-proxy passthrough
# 的 Caddy。来源是 tomholford 的 fork 分支 webtransport-reverse-proxy。
RUN xcaddy build \
--with github.com/caddyserver/caddy/v2=github.com/tomholford/caddy/v2@webtransport-reverse-proxy
FROM caddy:2.11.2-alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
+3 -1
View File
@@ -1,7 +1,9 @@
services: services:
# ==================== 反代 ==================== # ==================== 反代 ====================
caddy: caddy:
image: caddy:2.11.2-alpine build:
context: ./caddy
image: juwan-center/caddy:wt
container_name: juwan-caddy container_name: juwan-caddy
restart: unless-stopped restart: unless-stopped
ports: ports: