跳到正文

FRP 内网穿透配置参考

本目录提供 aliyundebian12-show 跨主机通信所需的 FRP 服务端 (frps) 部署参考。


1. 架构定位

在双主机生产环境中:

  • aliyun(公网主机):运行 frps,监听 7000 端口,绑定内网反向代理 proxyBindAddr = 127.0.0.1
  • debian12-show(内网主机):运行 frpc,将本机的 API(callflow-server 9913、callout-server 9920、callai-server 9930 等)通过加密通道反向映射到 aliyun 本地回环地址,供 Nginx 反向代理使用。

2. 配置文件说明

服务端配置 frps.toml

toml
bindPort = 7000
proxyBindAddr = "127.0.0.1"

auth.method = "token"
auth.token = "REPLACE_WITH_YOUR_STRONG_FRP_TOKEN"

log.to = "console"
log.level = "info"

注意:生产部署时必须替换 auth.token,并确保云主机安全组仅允许 7000 端口供指定 IP 接入,避免未授权连接。


3. Systemd 服务管理

使用同目录下的 frps.service 托管:

bash
sudo cp frps.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now frps
sudo systemctl status frps

文档与代码在同一仓库维护,现有 Markdown 是唯一内容源。