一个模拟示例
下载windows版本的frfps
需要准备的测试设备
- 一台frp服务器
- 一台frp客户端PC
- sscom5.exe测试软件开2个,来模拟野外的设备和本地连接野外设备的软件。
原理
frp服务器搭建了一条中转的桥梁,frp的客户端在本地做好端口映射后,本地的设备软件就可以连接到野外的设备。
拓扑图
frps端信息
公网IP: 134.xxx.xxx.xxx
在路由中打开7001~7002端口,用于野外设备上传数据。
配置frps.ini文件
主要参数:
服务器端口:7000
监控面板端口:7500
[common]
# A literal address or host name for IPv6 must be enclosed
# in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80"
bind_addr = 0.0.0.0
bind_port = 7000
# udp port to help make udp hole to penetrate nat
bind_udp_port = 7001
# udp port used for kcp protocol, it can be same with 'bind_port'
# if not set, kcp is disabled in frps
kcp_bind_port = 7000
# set dashboard_addr and dashboard_port to view dashboard of frps
# dashboard_addr's default value is same with bind_addr
# dashboard is available only