{ 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://{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} #} } }