服务端
frps.ini
[common]bind_port=7000token=jiang155.dashboard_port=7500dashboard_user=admindashboard_pwd=jiang155.vhost_http_port=8081vhost_https_port=9091tcp_mux=truemax_pool_count=10[ssh]listen_port=2222
docker-compose.yml
frps:image: snowdreamtech/frpsrestart: alwaysports:- 7000:7000- 7500:7500- 2222:2222- 8081-8089:8081-8089- 9091-9099:9091-9099volumes:- /home/opc/service/frps/frps.ini:/etc/frp/frps.ini
客户端
frpc.ini
[common]server_addr=jiangxicheng.xyzserver_port=7000token=jiang155.[ssh]type=tcplocal_ip=127.0.0.1local_port=22remote_port=2222use_encryption=trueuse_compression=true
docker-compose.yml
frpc:image: snowdreamtech/frpcrestart: alwaysvolumes:- ./frpc/frpc.ini:/etc/frp/frpc.ininetwork_mode: host
web 服务
SSH
将内网SSH公钥安装到公网服务器中:追加到此文件中 /root/.ssh/authorized_keys
然后用私钥登录:ssh 内网user:pwd@公网ip ssh-frp端口(2222)
