huggingface / frp

FRP Fork
Apache License 2.0
125 stars 18 forks source link

Issue with HTTPS Support in frp Configuration #4

Open sgtrwr opened 10 months ago

sgtrwr commented 10 months ago

I am experiencing an issue with the frp configuration when trying to enable HTTPS support.


Environment:

Problem: With the original scripts/frps.ini, the frp server works as expected. However, upon modifying scripts/frps.ini to enable HTTPS, I am no longer able to connect to the server.

Steps to Reproduce:

  1. Use the original scripts/frps.ini - frp works as expected.
  2. Modify scripts/frps.ini for HTTPS support with the following configuration:
    [common]
    log_level = trace
    tcp_mux = true
    bind_port = 7000
    dashboard_port = 7001
    vhost_http_port = 80
    vhost_https_port = 443
    tls_cert_file = /etc/letsencrypt/live/my-gpt-wrapper.com/cert.pem
    tls_key_file = /etc/letsencrypt/live/my-gpt-wrapper.com/privkey.pem
    tls_trusted_ca_file = /etc/letsencrypt/live/my-gpt-wrapper.com/chain.pem
    subdomain_host = my-gpt-wrapper.com
    detailed_errors_to_client = false
    custom_404_page = /etc/frp/404.html
  3. After this change, the server connection fails.

Expected Behavior: The frp server should support HTTPS connections with the updated scripts/frps.ini configuration.

Actual Behavior: After updating the scripts/frps.ini for HTTPS, the server cannot be connected to.

ckasimis commented 7 months ago

I have the same issue. Do you have any updates on this?

I have this error using an letsencrypt certificate

2024/02/15 21:26:23 [I] [root.go:206] frps uses config file: /etc/frp/frps.ini 2024/02/15 21:26:23 [I] [service.go:196] frps tcp listen on 0.0.0.0:7000 2024/02/15 21:26:23 [I] [service.go:241] http service listen on 0.0.0.0:80 2024/02/15 21:26:23 [I] [service.go:256] https service listen on 0.0.0.0:443 2024/02/15 21:26:23 [I] [service.go:297] Dashboard listen on 0.0.0.0:7001 2024/02/15 21:26:23 [I] [root.go:215] frps started successfully 2024/02/15 21:26:37 [T] [service.go:400] start check TLS connection... 2024/02/15 21:26:37 [W] [service.go:405] CheckAndEnableTLSServerConnWithTimeout error: non-TLS connection received on a TlsOnly server

alhdo commented 7 months ago

I am interested in the solution also