# fly.toml 配置示例 # 部署前,复制此文件为fly.toml并根据需要修改 app = "simple-clash-relay" # 修改为您的应用名称 primary_region = "hkg" # 选择最近的地区(香港示例) [build] # 使用Dockerfile dockerfile = "Dockerfile" [env] # 公共环境变量 (不包含敏密信息) FLASK_PORT = "8000" CLASH_PROXY_PORT = "7890" CLASH_API_PORT = "9090" # 不要在这里设置SUB_URL和API_KEY,应该使用secrets设置 # API服务 - 暴露为HTTPS [[services]] internal_port = 8000 protocol = "tcp" [[services.ports]] port = 80 handlers = ["http"] force_https = true [[services.ports]] port = 443 handlers = ["tls", "http"] # 健康检查配置 [[services.http_checks]] interval = "10s" timeout = "2s" grace_period = "30s" method = "get" path = "/health" protocol = "http" # Clash代理服务 - 暴露为TCP [[services]] internal_port = 7890 protocol = "tcp" [[services.ports]] port = 7890 # 不设置handlers,表示原生TCP # 可选:持久化卷挂载 # [mounts] # source = "clash_data" # destination = "/app/data"