feat(center/caddy): add WebTransport reverse-proxy passthrough via PR #7669 fork
This commit is contained in:
+5
-1
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -60,4 +74,5 @@ juwan.xhttp.zip {
|
|||||||
fail_duration 30s
|
fail_duration 30s
|
||||||
import stream_proxy
|
import stream_proxy
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
FROM caddy:2.11.2-builder-alpine AS builder
|
||||||
|
|
||||||
|
# 编译带 PR #7669(experimental 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
|
||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user