mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #4621] Need to make it clear: do I need to copy Let's Encrypt certificates every 3 months to get TLS to work for BOTH the server and the client? #3648
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#3648
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Kenya-West on GitHub (Jan 5, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4621
Describe the feature request
I have a setup like this:
Configs are (templated by Jinja2):
Details
frps.toml:
frpc.toml:
So far so good without TLS. But I want to switch to TLS-only connections.
Caddy updates certificates on time and (as for now) just proxies for FRPS dashboard with SSL.
The actual
frps<---[tcp]--->frpcconnections FRPS does by itself without any TLS.If I switch to SSL/TLS only, I need to copy Let's Encrypt certs from Caddy to both FRPS and FRPC, right? Or do I need to set certificates only in
frps.toml, and the client will automatically switch to TLS?Making certificates accessible for one server is OK. But to distribute certs for all the clients on regular basis adds unnecessary complexity to an already complicated infrastructure.
Describe alternatives you've considered
Alternative is to sit still and being happy without TLS
Affected area
@fatedier commented on GitHub (Jan 6, 2025):
By default, traffic between frpc and frps is encrypted using randomly generated certificates. You only need to provide your own certificates if you require additional authentication. Whether you need to update certificates on frpc depends on whether you require mutual TLS (mTLS) for bidirectional authentication. Without mTLS, it’s sufficient to configure certificates only on frps. This simplifies the setup, as you don't need to distribute certificates to all clients unless mutual authentication is a strict requirement in your environment.
@Kenya-West commented on GitHub (Jan 7, 2025):
Thanks for trying to help. But maybe I simplified the problem too much.
I try to explain again (sorry for possible misunderstanding before):
I setup a web service on my laptop, that serves only by HTTP. It is
resticREST backup server if you need to know.I need FRP to reverse proxy to this HTTP service only by HTTPS. Can FRP do this?
Currently, I have such configs (more detailed):
frpc.tml:Details
frps.toml:Details
Right now, it gets error from
resticthat HTTP response is sent through HTTPS connection:Details
The documentation has a paragraphs about my exact specific use case:
Details
Enable HTTPS for a local HTTP(S) service
You may substitute
https2httpsfor the plugin, and point thelocalAddrto a HTTPS endpoint.frpcwith the following configuration:https://test.example.com.But even with the same certificates both on client and server, FRP cannot wrap/transform/remap HTTP traffic to HTTPS one.
Does that mean it is not FRP's job?
@fatedier commented on GitHub (Jan 7, 2025):
Maybe try this: https://github.com/fatedier/frp?tab=readme-ov-file#enable-https-for-a-local-https-service
@Kenya-West commented on GitHub (Jan 9, 2025):
Thanks. Sorry for asking you like it is tech support. But you have more experience in this. I will be glad if you look at this.
I think I setup it correctly but the service still not available:
frpc.toml
frps.toml
And looks like it is setup correctly according to logs and FRPS dashboard:
But the connection is still not happening:
Locally, it works, web service replies correctly. UFW is disabled or properly setup on both client and server.
How do I debug this?
@fatedier commented on GitHub (Jan 9, 2025):
You should check whether the server-side port is properly open, provide necessary logs, and perform preliminary troubleshooting to save time.
@Kenya-West commented on GitHub (Jan 9, 2025):
You were right, I forgot to double-check
docker-compose.ymlfile and openvhostHTTPSPort. Now it is proxied correctly and works as expected. It is now working correctly 🍾!But I still have some architectural questions regarding this setup:
This setup (I mean https://github.com/fatedier/frp?tab=readme-ov-file#enable-https-for-a-local-https-service) means that certificates should be stored on client side. In my case, it requires complex maintenance to properly update these certificates every 3 months or more often so they do not expire.
I am not so good in networks. Is there any way to avoid storing Let's Encrypt certificates on client? Your thoughts?
I exposed
8443port to serve only one web service to HTTPS. Since this port is single, how do I expose multiple local web services to a single port? Using NGINX or Caddy, right? This use case is not covered by FRP and FRPS has no tools to do this, right?@fatedier commented on GitHub (Jan 9, 2025):
@Kenya-West commented on GitHub (Jan 9, 2025):
Looks like I am starting to understand this wonderful world of proxying. Thanks for rapid responses, and thanks for developing FRP project! I will continue to discover things there.
Since this issue is resolved, I close it because there nothing to discuss regarding this topic.