is it possible to use a protocol https for communication between frps and frpc (tunnel…
- User
is it possible to use a protocol https for communication between frps and frpc (tunnel itself)? like frpc would connect to https://something.com (which would be a proxied via Cloudflare)
- Assistant
Yes, it's possible to use HTTPS for communication between
frps(server) andfrpc(client), asfrpsupports communication over TLS.How to Configure HTTPS for
frpsandfrpc1. Enable TLS for
frpsYou need to configure
frpsto enable TLS. This is done by specifying the TLS certificate and key files in thefrpsconfiguration (frps.toml).Example
frps.toml:[Redacted# frps configuration bind_port = 7000 # Enable TLS-only communication tls_only = true # Paths to the certificate and key files tls_cert_file = "./server.crt" tls_key_file = "./server.key"tls_only = true: Forcesfrpsto accept only TLS-encrypted connections.tls_cert_fileandtls_key_file: Specify the TLS certificate and private key files for the server.
2. Enable TLS for
frpcTo configure
frpcto connect tofrpsover HTTPS, enable TLS in thefrpcconfiguration (frpc.toml).Example
frpc.toml:[Redacted# frpc configuration server_addr = "something.com" server_port = 443 # Enable TLS tls_enable = true # (Optional) Specify the server name in the TLS certificate tls_server_name = "something.com"tls_enable = true: Ensuresfrpcuses TLS to connect tofrps.tls_server_name(optional): Iffrpsis behind a proxy like Cloudflare, you can set the expected server name in the TLS certificate.
3. Using Cloudflare Proxy
If
frpsis behind Cloudflare, make sure:- Cloudflare is configured to proxy HTTPS traffic to
frps. - Your
frpsserver has a valid TLS certificate (e.g., issued by Let's Encrypt or Cloudflare Origin CA). - The
server_addrin thefrpcconfiguration points to the domain proxied through Cloudflare (e.g.,something.com).
4. Verifying the Configuration
You can test the connection by starting both
frpsandfrpc. Ensure that:frpsis running and listening on the configured TLS port.frpcconnects tofrpsusing thehttps://protocol.
Additional Notes
- If you are using a self-signed certificate, the
tls_trusted_ca_fileoption infrpccan be used to specify the CA certificate for verification. - Ensure the
bind_portinfrpsmatches theserver_portinfrpc. - You can also enable logging to troubleshoot any connection issues.
This setup allows
frpcto securely connect tofrpsover HTTPS, even when proxied through Cloudflare.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.