d3d8f8a3df
- xray-config.template.json:边缘终结 TLS 形态(security none / listen 0.0.0.0),
XHTTP mode auto + extra xPadding(与链接 extra= 一致),routing/dns 同 VPS 模板
- hysteria-config.template.yaml:DNS-01 或自签两方案(边缘独占 80/443,HTTP-01 不可用),
公网可达需 UDP L4 LB
- README:协议可行性结论(REALITY/hy2 需付费 L4 LB,XHTTP 唯一免费路径)、
客户端链接模板、healthcheck 须写在 template 服务节点 spec(service 级会被覆盖)、
TCP 探针优于 HTTP(未认证 GET 返回 404)
- 修正 render_xray_config 上方过时注释:extra 两端一致即可用(4e4d0f4 起链接内嵌),
原注释仍停留在 15d91b2 的结论
Co-Authored-By: Claude Code <noreply@anthropic.com>
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
# Hysteria2 服务端配置模板(Northflank 容器用)
|
||
# 公网可达前提:team 里创建了 UDP 类型的 Layer 4 Load Balancer 指向本容器 8443/udp
|
||
# (Northflank 普通端口只支持 HTTP(S),UDP 必须走付费 L4 LB;不开 LB 时本服务只能项目内网用)
|
||
listen: :8443
|
||
|
||
# 证书:Northflank 边缘 ingress 独占公网 80/443,ACME HTTP-01/TLS-ALPN 都不可用。
|
||
# 方案 A(推荐):DNS-01 签正式域名证书(Cloudflare token)
|
||
acme:
|
||
domains:
|
||
- "__HY2_DOMAIN__" # 如 hy2.example.com;通配符 *.example.com 也行
|
||
email: "__EMAIL__"
|
||
type: dns
|
||
dns:
|
||
name: cloudflare
|
||
config:
|
||
cloudflare_api_token: "__CF_API_TOKEN__"
|
||
dir: /tmp/acme_certs # 容器内可写路径即可(临时盘,重签无副作用)
|
||
# 方案 B:自签证书(客户端须加 insecure=1 或 pinSHA256),注释掉上面 acme 段改用:
|
||
# tls:
|
||
# cert: /run/secrets/hy2.crt
|
||
# key: /run/secrets/hy2.key
|
||
|
||
auth:
|
||
type: password
|
||
password: "__HY2_PASSWORD__"
|
||
|
||
masquerade:
|
||
type: proxy
|
||
proxy:
|
||
url: https://www.bing.com/
|
||
rewriteHost: true
|
||
|
||
# 带宽声明(hy2 拥塞控制参考值,按 L4 LB/套餐实际能力填)
|
||
bandwidth:
|
||
up: 100 mbps
|
||
down: 500 mbps
|