服务端

frps.ini

  1. [common]
  2. bind_port=7000
  3. token=jiang155.
  4. dashboard_port=7500
  5. dashboard_user=admin
  6. dashboard_pwd=jiang155.
  7. vhost_http_port=8081
  8. vhost_https_port=9091
  9. tcp_mux=true
  10. max_pool_count=10
  11. [ssh]
  12. listen_port=2222

docker-compose.yml

  1. frps:
  2. image: snowdreamtech/frps
  3. restart: always
  4. ports:
  5. - 7000:7000
  6. - 7500:7500
  7. - 2222:2222
  8. - 8081-8089:8081-8089
  9. - 9091-9099:9091-9099
  10. volumes:
  11. - /home/opc/service/frps/frps.ini:/etc/frp/frps.ini

客户端

frpc.ini

  1. [common]
  2. server_addr=jiangxicheng.xyz
  3. server_port=7000
  4. token=jiang155.
  5. [ssh]
  6. type=tcp
  7. local_ip=127.0.0.1
  8. local_port=22
  9. remote_port=2222
  10. use_encryption=true
  11. use_compression=true

docker-compose.yml

  1. frpc:
  2. image: snowdreamtech/frpc
  3. restart: always
  4. volumes:
  5. - ./frpc/frpc.ini:/etc/frp/frpc.ini
  6. network_mode: host

web 服务

SSH

将内网SSH公钥安装到公网服务器中:追加到此文件中 /root/.ssh/authorized_keys
然后用私钥登录:ssh 内网user:pwd@公网ip ssh-frp端口(2222)