1. 服务端配置
version: '3'
services:
frps:
image: stilleshan/frps
container_name: frps
network_mode: host
volumes:
- ./frps.toml:/frp/frps.toml
restart: always
-
运行docker-compose.yml
-
docker compose up -d
-
frps.toml 服务端配置文件
bindPort =7000
auth.token ="Aa@123456"
#管理面板配置
webServer.addr ="0.0.0.0"
webServer.port=7500 #管理面板
webServer.user="ccc" #用户名
webServer.password="ccc123123" #密码
#允许的IP白名单(可选)
# allow_ports =7000-8000
2. 客户端配置
version: '3'
services:
frpc:
image: stilleshan/frpc
container_name: frpc
network_mode: host
volumes:
- ./frpc.toml:/frp/frpc.toml
restart: always
serverAddr = "0.0.0.0" # 连接服务器地址
serverPort = 7000
auth.token = "abc"
[[proxies]]
name = "web" # 端口转发
type = "tcp"
localIP ="127.0.0.1"
localPort = 443
remotePort = 443