客户端配置:
# 服务端的公网ip
serverAddr = "xx.xx.xx.xxx"
# 服务端的监听端口 默认15443
serverPort = 15443
#token需要与服务端的token一致
auth.token = "服务端设置的token"
[[proxies]]
# 名称 需要唯一
name = "注册到服务端的名称"
# 类型tcp
type = "tcp"
# 本机的ip
localIP = "192.168.0.xx"
# 本机的项目端口
localPort = 80
#访问服务端被转到本机当前配置的对应端口
#比如此处是8080,那外网访问服务端公网ip:8080则会被转发访问本配置192.168.0.xx:80端口
remotePort = 8080
# 可以配置多个不同的端口
[[proxies]]
# 名称 需要唯一
name = "注册到服务端的名称"
# 类型tcp
type = "tcp"
# 本机的ip
localIP = "192.168.0.xx"
# 本机的项目端口
localPort = 80
#访问服务端被转到本机当前配置的对应端口
#比如此处是8080,那外网访问服务端公网ip:8080则会被转发访问本配置192.168.0.xx:80端口
remotePort = 8080
客户端启动 windows,以D:\frp为例
D:\frp\frpc.exe -c D:\frp\frpc.toml
服务端配置
注意:如果是宝塔服务端,千万不能使用可视化界面,有bug会把配置文件的一些信息给改了,导致无法启动,直接修改配置就行
#默认
bindPort = 15443
kcpBindPort = 15443
# web服务端口 默认7001
webServer.port = xxxx
webServer.user = "xxx"
webServer.password = "xxxx"
# 注意这里要填写,不然无法访问
webServer.addr = "0.0.0.0"
# 默认即可
dashboardPwd = "1B9wsgQjVyKco0Z4"
vhostHTTPPort = 18080
vhostHTTPSPort = 18443
log.file = "/var/log/frps.log"
log.level = "info"
log.maxDays = 30
# 服务端的token,客户端需要和次对应一致
auth.token = "xxxx"
maxPoolCount = 50
tcpmuxHTTPConnectPort = 16337
客户端下载链接:
fpr_0.62.0_windows_amd64.zip
Comments NOTHING