[GH-ISSUE #4255] [Question] Can I use frp to relay all the traffic to a local traefik instance? #3352

Closed
opened 2026-05-05 14:09:46 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @TheZoker on GitHub (May 31, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4255

Describe the feature request

Hi there,

It's more a questions and less a feature request. I have a local traefik instance, which handles all the SSL and reverse proxy stuff of my subdomains to local hosted applications.

I would use frp to tunnel all the requests (no matter the domain) from my VPS to my local frp client, which then sends all the requests to traefik. The SSL should be terminated on traefik and not earlier by frp. Is that already possible?

Config could look like this:

# frpc.toml
serverAddr = "x.x.x.x"
serverPort = 7000

[[proxies]]
name = "web"
type = "https"
localIP = "<ip-of-traefik>"
localPort = 443
customDomains = ["*"]

Thanks in advance!

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @TheZoker on GitHub (May 31, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4255 ### Describe the feature request Hi there, It's more a questions and less a feature request. I have a local traefik instance, which handles all the SSL and reverse proxy stuff of my subdomains to local hosted applications. I would use frp to tunnel all the requests (no matter the domain) from my VPS to my local frp client, which then sends all the requests to traefik. The SSL should be terminated on traefik and not earlier by frp. Is that already possible? Config could look like this: ```toml # frpc.toml serverAddr = "x.x.x.x" serverPort = 7000 [[proxies]] name = "web" type = "https" localIP = "<ip-of-traefik>" localPort = 443 customDomains = ["*"] ``` Thanks in advance! ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@xqzr commented on GitHub (Jun 2, 2024):

你的配置不会让 frp 终结 SSL/TLS

<!-- gh-comment-id:2143842768 --> @xqzr commented on GitHub (Jun 2, 2024): 你的配置不会让 frp 终结 SSL/TLS
Author
Owner

@TheZoker commented on GitHub (Jun 2, 2024):

If I understand this correctly (and I used a translator so I'm not sure), the SSL connection does NOT get terminated within frp, right?

So I could forward the request to the internal reverse proxy? Did I get that right?

<!-- gh-comment-id:2143850587 --> @TheZoker commented on GitHub (Jun 2, 2024): If I understand this correctly (and I used a translator so I'm not sure), the SSL connection does NOT get terminated within frp, right? So I could forward the request to the internal reverse proxy? Did I get that right?
Author
Owner

@fatedier commented on GitHub (Jun 3, 2024):

Yes.

<!-- gh-comment-id:2144183332 --> @fatedier commented on GitHub (Jun 3, 2024): Yes.
Author
Owner

@TheZoker commented on GitHub (Jun 3, 2024):

Thanks for the confirmation @fatedier !

What would be the correct configuration to forward the requests to the internal reverse proxy?

<!-- gh-comment-id:2145194347 --> @TheZoker commented on GitHub (Jun 3, 2024): Thanks for the confirmation @fatedier ! What would be the correct configuration to forward the requests to the internal reverse proxy?
Author
Owner

@fatedier commented on GitHub (Jun 4, 2024):

You should describe the configuration you are using and the logs of the failures, instead of asking for a complete configuration tailored to your scenario.

<!-- gh-comment-id:2146454498 --> @fatedier commented on GitHub (Jun 4, 2024): You should describe the configuration you are using and the logs of the failures, instead of asking for a complete configuration tailored to your scenario.
Author
Owner

@7brend7 commented on GitHub (Nov 29, 2024):

Hey @TheZoker, Have you find a solution or any alternative way? I also faced with issue to forward ALL traffic from public server to local.

<!-- gh-comment-id:2507255373 --> @7brend7 commented on GitHub (Nov 29, 2024): Hey @TheZoker, Have you find a solution or any alternative way? I also faced with issue to forward ALL traffic from public server to local.
Author
Owner

@Rabithua commented on GitHub (Dec 6, 2024):

Hey @TheZoker, Have you find a solution or any alternative way? I also faced with issue to forward ALL traffic from public server to local.嘿,你找到解决方案或任何替代方法了吗?我还面临着将所有流量从公共服务器转发到本地的问题。

the same issue, have you handled it

<!-- gh-comment-id:2523459597 --> @Rabithua commented on GitHub (Dec 6, 2024): > Hey @TheZoker, Have you find a solution or any alternative way? I also faced with issue to forward ALL traffic from public server to local.嘿,你找到解决方案或任何替代方法了吗?我还面临着将所有流量从公共服务器转发到本地的问题。 the same issue, have you handled it
Author
Owner

@7brend7 commented on GitHub (Dec 6, 2024):

@TheZoker @Rabithua below configs works for me:

frps.toml

bindPort = 7000

frpc.toml

serverAddr = "X.X.X.X"
serverPort = 7000

{{- range $_, $v := parseNumberRangePair "80,443" "80,443" }}
[[proxies]]
name = "tcp-{{ $v.First }}"
type = "tcp"
localPort = {{ $v.First }}
remotePort = {{ $v.Second }}
{{- end }}
<!-- gh-comment-id:2523476090 --> @7brend7 commented on GitHub (Dec 6, 2024): @TheZoker @Rabithua below configs works for me: frps.toml ``` bindPort = 7000 ``` frpc.toml ``` serverAddr = "X.X.X.X" serverPort = 7000 {{- range $_, $v := parseNumberRangePair "80,443" "80,443" }} [[proxies]] name = "tcp-{{ $v.First }}" type = "tcp" localPort = {{ $v.First }} remotePort = {{ $v.Second }} {{- end }} ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3352
No description provided.