为本地 HTTP 服务启用 HTTPS

通过 https2http 插件可以让本地 HTTP 服务转换成 HTTPS 服务对外提供。

  1. 启用 frpc,启用 https2http 插件,配置如下:

    1. # frpc.ini
    2. [common]
    3. server_addr = x.x.x.x
    4. server_port = 7000
    5. [test_htts2http]
    6. type = https
    7. custom_domains = test.yourdomain.com
    8. plugin = https2http
    9. plugin_local_addr = 127.0.0.1:80
    10. # HTTPS 证书相关的配置
    11. plugin_crt_path = ./server.crt
    12. plugin_key_path = ./server.key
    13. plugin_host_header_rewrite = 127.0.0.1
  2. 通过浏览器访问 https://test.yourdomain.com 即可。