Sign inSign up

lamfire8390/frp

By lamfire8390

Updated about 2 years ago

frp内网穿透

Image
0

204

lamfire8390/frp repository overview

docker-frp配置内网穿透

1.服务端配置
配置文件
vim ./conf/frps.toml

bindPort = 7000
vhostHTTPPort = 80
vhostHTTPSPort = 443
auth.token = "!password!"
webServer.addr = "0.0.0.0"
webServer.port = 7001
webServer.user = "admin"
webServer.password = "admin"
docker-compose.yaml
version: '3.6'
services:
  frps:
    image: lamfire8390/frp:latest
    container_name: frps
    volumes:
      - ./conf:/frp/conf
    ports:
      - 7000:7000
      - 7001:7001
      - 80:80
      - 443:443
    privileged: true
    restart: always
    command: ['/frp/frps','-c','/frp/conf/frps.toml']

说明:服务端口=7000,管理后台端口=7001,http代理端口=80,https代理端口=443

快速启动服务端
docker-compose up -d

验证服务端是否启动成功

打开网站,登录名和密码均为‘admin’,能进入则服务端启动成功
http://101.xxx.35.180:6600/
2.客户端配置
vim ./conf/frpc.toml

serverAddr = "101.254.35.180"
serverPort = 6000
auth.token = "!password!"

[[proxies]]
name = "http-1"
type = "http"
customDomains = ["me.baidu.com"]
localIP = "192.168.1.214"
localPort = 80

[[proxies]]
name = "https-1"
type = "https"
customDomains = ["sh.taobao.com"]
localIP = "192.168.1.80"
localPort = 433

[[proxies]]
name = "tcp-1"
type = "tcp"
localIP = "192.168.1.63"
localPort = 32103
remotePort = 9300

docker-compose.yaml
version: '3.6'
services:
  frpc:
    image: lamfire8390/frp:latest
    container_name: frpc
    restart: always
    volumes:
      - ./conf:/frp/conf
    command: ['/frp/frpc','-c','/frp/conf/frpc.toml']
启动docker
docker-compose up -d

Tag summary

Content type

Image

Digest

sha256:f4e7d944d

Size

14.1 MB

Last updated

about 2 years ago

docker pull lamfire8390/frp