搭建自己的frp服务器

如果您不想使用组件中现成的公网隧道,可以使用frp自己搭建服务器端——前提条件是:您有一台公网能直接访问到的服务器(云主机)。
https://github.com/zhujisheng/HAComponent/blob/master/tunnel2local/server_diy.md
https://github.com/zhujisheng/HAComponent/tree/master/tunnel2local
服务器端搭建
使用下载的frp包中的frps程序,在服务器上运行。配置文件frps.ini如下:

[common]
bind_port = 7000
token = 12345678
其余的配置项可以参见frps项目的配置说明

HomeAssistant配置
如readme中所述,安放__init__.py和manifest文件
配置文件:
tunnel2local:

frpc命令位置

frpc_bin: “C:/local/frp_0.18.0_windows_amd64/frpc.exe”
frps: 1.2.3.4 #服务器地址
frps_port: 7000 #缺省值为7000
frp_token: “12345678” #缺省值为空
remote_port: 8123 #缺省值为8123

猜你喜欢

转载自blog.csdn.net/weixin_44968310/article/details/91045662
今日推荐