1. 下载地址:
https://github.com/fatedier/frp/releases
2.服务端配置文件:
[common]
bind_addr = 0.0.0.0
bind_port = 7000
dashboard_user = yonghuming
dashboard_pwd = mimamima
dashboard_port = 7500
log_level = debug
log_max_days = 5
启动服务端命令:frps -c frps.ini
3.客户端配置文件:
[common]
server_addr = xx.xx.xx.xx
server_port = 7000
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 3390
[web01]
#http类型的内网穿透,必须在服务端设置vhost_http_port,并且所有的http类型的客户端都将通过同一个vhost_http_port访问。
type = http
local_ip = 127.0.0.1
local_port = 80
custom_domains = 外网域名
启动客户端命令:frpc -c frpc.ini
4.客户端安装为windows系统服务:
frpcService.xml配置文件:
<?xml version="1.0" encoding="utf-8" ?>
<service>
<!-- ID of the service. It should be unique accross the Windows system-->
<id>frpc</id>
<!-- Display name of the service -->
<name>FRP客户端服务</name>
<!-- Service description -->
<description>FRPC自动启动服务</description>
<logpath>winswlogs</logpath>
<log mode="roll-by-size">
<sizeThreshold>10240</sizeThreshold>
<keepFiles>8</keepFiles>
</log>
<!-- Path to the executable, which should be started -->
<executable>frpc.exe</executable>
<arguments> -c frpc.ini</arguments>
</service>
安装命令:frpcService install
卸载命令:frpcService uninstall
服务端安装为系统服务的方法与客户端实现方式类似。
使用到的安装系统服务组件:winsw-2.4.0-bin.exe或winsw-2.4.0-net4.exe,修改名称为frpcService.exe即可。
FRP-amd64+winSW下载地址:
frp_0.32.0_windows_amd64+winsw2.4.0.zip