frp配置
0
frps
# 本地监听
bindAddr = "0.0.0.0"
bindPort = 7000
vhostHTTPPort = 7080
vhostHTTPSPort = 7443
# TLS
transport.tls.certFile = "/data/project/frp_0.58.1_linux_amd64/certs/server.crt"
transport.tls.keyFile = "/data/project/frp_0.58.1_linux_amd64/certs/server.key"
transport.tls.trustedCaFile = "/data/project/frp_0.58.1_linux_amd64/certs/ca.crt"
# 监控页面
webServer.addr = "0.0.0.0"
webServer.port = 7500
webServer.user = "admin"
webServer.password = "admin"
webServer.tls.certFile = "/data/project/frp_0.58.1_linux_amd64/certs/server.crt"
webServer.tls.keyFile = "/data/project/frp_0.58.1_linux_amd64/certs/server.key"
# 安全验证
auth.method = "token"
auth.token = "123456"
# 日志配置
log.to = "/data/project/frp_0.58.1_linux_amd64/logs/frps.log"
log.level = "debug"
log.maxDays = 3
# 启动
./frps -c ./frps.toml
frpc
# 远程服务
serverAddr = "127.0.0.1"
serverPort = 7000
# TLS
transport.tls.certFile = "/data/project/frp_0.58.1_linux_amd64/certs/server.crt"
transport.tls.keyFile = "/data/project/frp_0.58.1_linux_amd64/certs/server.key"
transport.tls.trustedCaFile = "/data/project/frp_0.58.1_linux_amd64/certs/ca.crt"
# 监控服务
webServer.addr = "0.0.0.0"
webServer.port = 7501
webServer.user = "admin"
webServer.password = "admin"
webServer.tls.certFile = "/data/project/frp_0.58.1_linux_amd64/certs/server.crt"
webServer.tls.keyFile = "/data/project/frp_0.58.1_linux_amd64/certs/server.key"
# 安全验证
auth.method = "token"
auth.token = "123456"
# 日志配置
log.to = "/data/project/frp_0.58.1_linux_amd64/logs/frpc.log"
log.level = "debug"
log.maxDays = 3
# 代理配置
[[proxies]]
name = "rest-https"
type = "https"
customDomains = ["192.168.8.188", "www.acgistproxy.com"]
# HTTPS代理
[proxies.plugin]
type = "https2https"
localAddr = "127.0.0.1:1443"
crtPath = "/data/project/frp_0.58.1_linux_amd64/certs/server.crt"
keyPath = "/data/project/frp_0.58.1_linux_amd64/certs/server.key"
hostHeaderRewrite = "127.0.0.1"
# HTTP代理
[[proxies]]
name = "rest-http"
type = "http"
customDomains = ["192.168.8.188"]
[proxies.plugin]
type = "http2https"
localAddr = "127.0.0.1:1443"
./frpc -c ./frpc.toml
注意事项
客户端代理https2https
使用的证书必须是域名,如果使用IP
不能匹配domain
。