Files
mengyamonitor/公网部署/grpc.monitor.api.shumengya.top.conf
2026-05-16 19:03:34 +08:00

29 lines
1.3 KiB
Plaintext
Raw Permalink 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.
# =============================================================================
# 萌芽监控 — 采集端 gRPCTCP 四层透传,与 Gitea SSH 反代同写法)
# =============================================================================
# 本文件只能被 nginx 主配置里**顶层**的 stream { } 引入,不可放进取 http { } 的 sites 目录。
#
# 在 /etc/nginx/nginx.conf 中与 http { } 平级增加(路径按你实际放置修改):
# stream {
# include /etc/nginx/stream-enabled/grpc.monitor.api.shumengya.top.conf;
# }
#
# 公网监听端口默认 9394与中心 GRPC_PORT 一致,采集端好记);若冲突可改为其它端口并放行防火墙。
# 上游:内网中心宿主机:9394或 frp/nps 在本机打开的穿透端口(如 127.0.0.1:7001
#
# 采集端(与当前仓库默认 insecure 明文 gRPC 一致):
# CENTRAL_GRPC=公网VPS_IP:9394
# 若用域名,须 DNS 指向该 VPSTCP 无 TLS安全依赖防火墙 / IP 白名单 / 仅穿透不暴露公网)。
# =============================================================================
upstream mengyamonitor_grpc_backend {
server 10.1.1.233:9394;
}
server {
listen 9394;
proxy_pass mengyamonitor_grpc_backend;
proxy_timeout 1h;
proxy_connect_timeout 10s;
}