Files
v2ray_proxy/server/caddy/Caddyfile
mm644706215 2c10b421b4 first add
2025-09-30 20:45:51 +08:00

55 lines
1.2 KiB
Caddyfile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
email {env.ACME_EMAIL}
# 如果你想强制使用 Cloudflare/阿里云 DNS 验证,可在每个站点 tls 块中指定 `dns`。
}
# 主站点HTTPS 复用 443/ray 提供 VLESS-WS 反代)
molecular.eu.org {
log {
output stdout
format console
}
# 若你需要 http->https 强制跳转,可加:
# redir https://<YOUR_DOMAIN>{uri} permanent
encode zstd gzip
@vless_ws path /ray /ray/*
handle @vless_ws {
reverse_proxy v2ray:10000 {
header_up -Origin
}
}
# VLESS gRPC over h2c at /grpc
@vless_grpc path /grpc /grpc/*
handle @vless_grpc {
reverse_proxy {
transport http {
versions h2c
}
to v2ray:10001
}
}
# 健康检查
handle_path /_health* {
respond 200
}
# 静态站点或你的网站反代
handle {
root * /usr/src/www
file_server
}
# 证书:可根据你的 DNS 服务商二选一(或只保留其一)
tls {
dns cloudflare {env.CF_API_TOKEN}
#dns alidns {
# access_key_id {env.ALIYUN_ACCESS_KEY_ID}
# access_key_secret {env.ALIYUN_ACCESS_KEY_SECRET}
#}
}
}