Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] add support in frpc for demultiplexing (vhost) multiple HTTPS targets (based on SNI) #4558

Open
3 of 11 tasks
ofirc opened this issue Nov 25, 2024 · 1 comment

Comments

@ofirc
Copy link

ofirc commented Nov 25, 2024

Describe the feature request

Is there a way to implement SNI-based routing, that is to demultiplex a single connection onto different targets?

This is how I currently implement it with Caddy and Caddy L4 plugin:

{
   admin :2019
   debug
    layer4 {
        :4000 {
            @secure tls sni backend-a
            route @secure {
                proxy backend-a:6000
            }
            @secured tls sni backend-b
            route @secured {
                proxy backend-b:8000
            }
        }
    }
}

I put this in front of the backend servers and it allows to listen on a single port, 4000, and route it to the right backend by peeking at the SNI value.

I was wondering if there is an option to eliminate the Caddy reverse proxy altogether and implement it via the frpc.ini or frps.ini.

Thanks!

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
@fatedier
Copy link
Owner

Currently, frp does not support SNI-based routing to demultiplex a single connection to different targets. However, this is a valuable suggestion, and we plan to consider it in future updates.

Thank you for sharing your use case!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants