frp 内网穿透:把家里服务器挂上公网
家里的 NAS、开发机没有公网 IP?一台有公网的 VPS + frp 就能打通。
配置
# frps.toml(VPS 端)
bindPort = 7000
auth.token = "换成强密码"
# frpc.toml(内网机器)
serverAddr = "你的VPS"
serverPort = 7000
[[proxies]]
name = "nas-web"
type = "http"
localPort = 5000
customDomains = ["nas.example.com"]域名 A 记录指到 VPS,frps 开启 80/443 的 HTTP 反代即可。
安全注意
- token 必须强密码,7000 端口限源 IP 更好
- 穿透出的服务同样暴露在公网,按公网标准做认证
- 注意当地法规与运营商条款