安装的frp版本是frp_0.60.0_linux_amd64.tar.gz
https://github.com/fatedier/frp/releases
wget https://github.com/fatedier/frp/releases/download/v0.60.0/frp_0.60.0_linux_amd64.tar.gz
1、服务器端配置frps.toml
bindPort = 7000
webServer.port = 7500
webServer.user = "admin"
webServer.password = "admin123456"
log.to="console"
log.level ="debug"
2、服务器执行
./frps -c ./frps.toml
3、客户端配置frpc.toml(现在只有tcp模式是通的)
#服务端ip
serverAddr = "1.2.3.4"
serverPort = 7000
log.to ="console"
log.level ="debug"
[[proxies]]
name = "web_b"
type = "tcp"
localPort = 8001
localIP ="192.168.1.121"
remotePort = 8081
4、客户端执行
./frpc -c ./frpc.toml
frp 自定义域名模式
服务端 vhostHTTPPort = 80 试验的没有通
bindPort = 7000
# HTTP/HTTPS 反向代理配置
vhostHTTPPort = 8082 # 接收 HTTP 请求的端口
vhostHTTPSPort = 443 # 接收 HTTPS 请求的端口
# 控制面板配置(可选)
webServer.port = 7500
webServer.user = "admin"
webServer.password = "admin"
客户端
serverAddr = "1.20.2.21"
serverPort = 7000
[[proxies]]
name = "domin"
# 使用http类型
type = "http"
localPort = 9000
# 自定义域名前缀,完整域名将是 service.yourdomain.com
customDomains = ["app.yourdomain.com"]
[[proxies]]
name = "domin1"
# 使用http类型
type = "http"
localPort = 9000
# 自定义域名前缀,完整域名将是 service.yourdomain.com
customDomains = ["app1.yourdomain.com"]