此程序不支持从http跳转,如需跳转请搭配nginx使用。
frps配置,部分信息根据情况自行修改
bindPort =7000
auth.token = "12345678"
vhostHTTPPort = 80
vhostHTTPSPort = 443
transport.tcpMux = true
webServer.addr ="0.0.0.0"
webServer.port =7500
webServer.user = "admin"
webServer.password = "admin"
#custom404Page = "/etc/frp/404.html"
frpc配置,根据情况自行修改
serverAddr = "127.0.0.1"
serverPort = 7000
transport.protocol = "websocket"
auth.token = "12345678"
transport.tcpMux = true
[[proxies]]
name = "web01"
type = "http"
localPort = 81
customDomains = ["web01.yourdomain.com"]
[[proxies]]
name = "web02"
type = "http"
localPort = 82
customDomains = ["web02.yourdomain.com"]
#关键
[[proxies]]
name = "https"
type = "https"
customDomains = ["*.yourdomain.com"]
#一定要用通配符,否则穿透多站点失败
[proxies.plugin]
type = "https2http"
localAddr = "127.0.0.1:80"
crtPath = "/etc/frp/cert/yourdomain.crt"
keyPath = "/etc/frp/cert/yourdomain.key"
#到此结束,如不熟练,请勿多加任何信息。如添加:“hostHeaderRewrite = ”等,操作不当可能导致穿透失败。
#特殊情况下,必要时可在最后一行添加hostHeaderRewrite = "https://*.yourdomain.com",其他问题请留言。
#转载请注明出处,谢谢!