2023 The frp Authors 保留所有权利
中文|English
https2http
插件将本地 HTTP 服务转换为 HTTPS
服务,以供外部访问。
配置 frps.toml
bindPort = 7000
vhostHTTPSPort = 443
配置 frpc.toml
serverAddr = "x.x.x.x"
serverPort = 7000
[[proxies]]
name = "test_htts2http"
type = "https"
customDomains = ["test.yourdomain.com"]
[proxies.plugin]
type = "https2http"
localAddr = "127.0.0.1:80"
# HTTPS 证书相关的配置
crtPath = "./server.crt"
keyPath = "./server.key"
hostHeaderRewrite = "127.0.0.1"
requestHeaders.set.x-from-where = "frp"
请注意,您需要根据您的域名和证书路径自行更改上述配置。
启动 frps 和 frpc
访问 HTTPS 服务
打开您的 Web 浏览器,访问
https://test.yourdomain.com
。
通过按照以上步骤进行配置,您将能够为本地 HTTP 服务启用 HTTPS,以实现安全的外部访问。
https2http
Plug-in converts the local HTTP
service to. HTTPS services for external access.
Configuration frps.toml
bindPort = 7000
vhostHTTPSPort = 443
Configuration frpc.toml
serverAddr = "x.x.x.x"
serverPort = 7000
[[proxies]]
name = "test_htts2http"
type = "https"
customDomains = ["test.yourdomain.com"]
[proxies.plugin]
type = "https2http"
localAddr = "127.0.0.1:80"
# HTTPS Certificate-related Configuration
crtPath = "./server.crt"
keyPath = "./server.key"
hostHeaderRewrite = "127.0.0.1"
requestHeaders.set.x-from-where = "frp"
Please note that you need to change the above Configuration according to your domain name and certificate path.
Start frps and frpc
Access the HTTPS service
Open your Web browser and visit
https://test.yourdomain.com
。
By following the steps above to Configuration, you will be able to HTTP locally. The service enables HTTPS for secure external access.