# 介绍
frp是一个内网穿透工具,分为frps(服务端)和frpc(客户端)
# 部署
此文件基于frp0.37.1配置
version: '2'
services:
frp:
container_name: frps
image: snowdreamtech/frps
ports:
- 60020:60020
- 60021:60021
- 60022:60022
- 60023:60023
restart: always
environment:
- TZ=Asia/Shanghai
volumes:
- ./config:/etc/frp
# frps.ini
[common]
bind_port = 60020
vhost_http_port = 60021
vhost_https_port = 60022
dashboard_addr = 0.0.0.0
dashboard_port = 60023
dashboard_user = frp_user
dashboard_pwd = frp_password
# frpc.ini
[common]
server_addr = 122.51.59.25
server_port = 60021
[rdp]
type = tcp
local_ip = 127.0.0.1
local_port = 8080
custom_domains = 122.51.59.25
remote_port = 60021
执行命令行.\frpc.exe -c frpc.ini
# 多端口暴露
[common]
tls_enable = true
server_addr = 122.51.59.25
server_port = 60020
[web1]
type = http
local_port = 3000
custom_domains = web1.xxx.xxx.fun
[web2]
type = http
local_ip = 127.0.0.1
local_port = 3001
custom_domains = web2.xxx.xxx.fun
[api1]
type = http
local_ip = 127.0.0.1
local_port = 8080
custom_domains = api1.xxx.xxx.fun
[api2]
type = http
local_ip = 127.0.0.1
local_port = 9000
custom_domains = api2.xxx.xxx.fun
访问连接:web1.xxx.xxx.fun:60021
# 常见问题
# login to server failed: EOF
修改frpc.ini
[common]
# 增加 tls_enable = true
tls_enable = true
server_addr = 122.51.59.25
server_port = 60020