# 基础配置
bindPort = 7100
bindAddr = "0.0.0.0"
vhostHTTPSPort = 443
# Web 服务器配置
webServer.addr = "0.0.0.0"
webServer.port = 7500
# dashboard 用户名密码,可选,默认为空
webServer.user = "自己设置"
webServer.password = "自己设置"
# 日志配置
log.to = "frpslog/frps.log"
log.level = "info"
log.maxDays = 3
# 认证配置
auth.method = "token"
auth.token = "自己设置"
# 允许的端口范围
allowPorts = [
{start = 6000, end = 7000}
]
[Unit]
Description=FRP Service
After=network.target
[Service]
Type=simple
User=root
ExecStart=/opt/frp_0.61.0_linux_amd64/frps -c /opt/frp_0.61.0_linux_amd64/frps.toml
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target
serverAddr = "公网ip"
serverPort = 7100
# 日志配置
log.to = "frpslog/frps.log"
log.level = "info"
log.maxDays = 3
# 认证配置
auth.method = "token"
auth.token = "token"
[[proxies]]
name = "job-tcp"
type = "tcp"
localIP = "127.0.0.1"
localPort = 3000
remotePort = 6100
[[proxies]]
name = "ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 6000
[[proxies]]
name = "test-html"
type = "tcp"
localIP = "127.0.0.1"
localPort = 5500
remotePort = 6060
[[proxies]]
name = "test_htts2http"
type = "https"
customDomains = ["域名"]
[proxies.plugin]
type = "https2http"
localAddr = "127.0.0.1:5500"
# HTTPS 证书相关的配置
crtPath = "./xx.crt"
keyPath = "./xx.key"
hostHeaderRewrite = "127.0.0.1"
requestHeaders.set.x-from-where = "frp"
tips 在安全组把配置的端口都开放