内网穿透frp配置
docker run --restart=always --network host -d -v /data/frps.ini:/etc/frp/frps.toml --name frps snowdreamtech/frps:0.52.3 docker run --restart=always --network host -d -v /data/frpc.toml:/etc/frp/frpc.toml --name frpc snowdreamtech/frpc:0.52.3
frps.ini
[common] bind_port = 7000 vhost_http_port = 80 log.to = "console" auth.method = "token" auth.token = "密钥"
token = "密钥"
dashboard_port = 7500 dashboard_user = shiningrise dashboard_pwd = 密码
frps.toml frps配置文件
bindPort = 7000 log.to = "console" vhostHTTPPort = 7100 vhostHTTPSPort = 7200 auth.method = "token" auth.token = "password" [common] dashboard_port = 7500 # dashboard 用户名密码,默认都为 admin dashboard_user = admin dashboard_pwd = admin
docker run --restart=always --network host -d -v /data/frps.ini:/etc/frp/frps.ini --name frps snowdreamtech/frps
frpc.toml frpc配置文件
# frpc.toml [common] server_addr = "frps地址" server_port = 7000 log.to = "console" auth.token = "password" [ssh] name = "ssh" type = "tcp" local_ip = 127.0.0.1 local_port = 22 remote_port = 6000
[web]
name = "web"
type = "tcp"
local_ip = 127.0.0.1
local_port = 8080
remote_port = 8080
custom_domains = class.swl.ink
[web4]
type = "http"
local_ip = 127.0.0.1
local_port = 80
custom_domains = shdkt2.wxy.kim #域名不能用泛解析域名,否则无法穿透
docker run --restart=always --network host -d -v /data/frpc.toml:/etc/frp/frpc.ini --name frpc snowdreamtech/frpc
version: "2.3" services: frps: image: frps:0.49.0 container_name: frps restart: always #直接使用主机网络模式 network_mode: host volumes: - ./frps/conf/frps.ini:/frps/frps.ini:ro
version: "2.3" services: frpc: image: frpc:0.49.0 container_name: frpc restart: always #直接使用主机网络模式 network_mode: host volumes: - ./frpc/conf/frpc.ini:/frpc/frpc.ini:ro
docker-compose搭建FRP内网穿透_docker安装frp-CSDN博客
frp windows版Releases · fatedier/frp (github.com)
最新版frp配置:
frps.toml 文件示例:
docker run --restart=always --network host -d -v /data/frps.toml:/etc/frp/frps.toml --name frps snowdreamtech/frps:0.52.3
bindPort = 7000 #{必选} 客户端与该端口建立连接 log.to = "console" #{可选} 日志配置, 通过打印的方式输出日志 vhostHTTPPort = 7100 #{可选} http代理需要,当访问该端口时跳到对应本地frpc代理 vhostHTTPSPort = 7200 #{可选} https代理需要,当访问该端口时跳到对应本地frpc代理 transport.tcpMux = true #tcp流多路复用(优化传输,需一致) #身份验证 auth.method = "token" #{可选}身份验证方式 auth.token = "password" #token设置密码,用于通过身份验证创建连接 #frp服务仪表板配置 webServer.port = 7500 #{也可自行修改端口} webServer.addr = "0.0.0.0" #公网ip或者域名 webServer.user = "admin" #登录用户名{可自行修改} webServer.password = "admin" #登录密码{可自行修改}
frpc.toml
docker run --restart=always --network host -d -v /data/frpc.toml:/etc/frp/frpc.toml --name frpc snowdreamtech/frpc:0.52.3
serverAddr = "服务器IP或域名" serverPort = 7000 log.to = "console" auth.token = "密钥" [[proxies]] name = "rdp" type = "tcp" localIP = "10.128.39.41" localPort = 3389 remotePort = 3389