[PR #4939] [CLOSED] feat: add HTTPS load balancing support #5081

Closed
opened 2026-05-05 14:54:21 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fatedier/frp/pull/4939
Author: @jeet0733
Created: 8/15/2025
Status: Closed

Base: devHead: feature/https-load-balancing


📝 Commits (3)

  • 5b4aea6 feat: add HTTPS load balancing support
  • 4835801 Resolved maintainer comments: removed examples, reduce log verbosity, and unnecessary recover/defer blocks
  • 760b7f5 Addressed Copilot commnets too

📊 Changes

7 files changed (+643 additions, -17 deletions)

View changed files

📝 README.md (+3 -1)
📝 pkg/util/vhost/https.go (+141 -3)
pkg/util/vhost/https_proxy.go (+140 -0)
📝 server/controller/resource.go (+6 -0)
server/group/https.go (+224 -0)
📝 server/proxy/https.go (+115 -13)
📝 server/service.go (+14 -0)

📄 Description

What does this PR do?

This PR adds HTTPS load balancing support to frp, enabling high availability and horizontal scaling for HTTPS services by distributing traffic across multiple backend HTTPS endpoints.

Changes Made

New Features

  • HTTPS Group Controller (server/group/https.go): Manages load balancing groups for HTTPS services with round-robin distribution
  • HTTPS Reverse Proxy (pkg/util/vhost/https_proxy.go): Implements SNI-based routing for grouped HTTPS services
  • Enhanced HTTPS Proxy (server/proxy/https.go): Integrates with group controller for load balancing

Enhancements

  • HTTPS Muxer (pkg/util/vhost/https.go): Added group routing support and connection proxying
  • Service Integration (server/service.go): Initialized HTTPS reverse proxy for group routing
  • Configuration Examples (conf/frpc_full_example.toml): Added HTTPS load balancing examples with health checks

Documentation

  • README.md: Added comprehensive HTTPS load balancing documentation and examples
  • Configuration Guide: Included examples for setting up HTTPS load balancing groups

Configuration Example

[[proxies]]
name = "https_app_1"
type = "https"
localPort = 443
customDomains = ["app.example.com"]
loadBalancer.group = "https_app"
loadBalancer.groupKey = "secret123"
healthCheck.type = "tcp"

[[proxies]]
name = "https_app_2" 
type = "https"
localPort = 8443
customDomains = ["app.example.com"]
loadBalancer.group = "https_app"
loadBalancer.groupKey = "secret123"
healthCheck.type = "tcp"

Benefits

  • High Availability: Automatic failover for HTTPS when backends become unhealthy
  • Horizontal Scaling: Distribute load across multiple HTTPS backends
  • Consistent Architecture: Follows same patterns as existing HTTP load balancing
  • End-to-End Security: Maintains SSL encryption throughout the load balancing process
  • Health Monitoring: Integrated health checks for backend availability

Testing

  • All existing tests pass
  • Code formatting and linting checks pass
  • Manual testing with multiple HTTPS backends
  • Health check integration verified

Closes #[4936] - HTTPS Load Balancing Feature Request


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fatedier/frp/pull/4939 **Author:** [@jeet0733](https://github.com/jeet0733) **Created:** 8/15/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feature/https-load-balancing` --- ### 📝 Commits (3) - [`5b4aea6`](https://github.com/fatedier/frp/commit/5b4aea64545e615f5402447d4fc3bb6847014c5e) feat: add HTTPS load balancing support - [`4835801`](https://github.com/fatedier/frp/commit/4835801e7470ae294091f20b572534ee731e6821) Resolved maintainer comments: removed examples, reduce log verbosity, and unnecessary recover/defer blocks - [`760b7f5`](https://github.com/fatedier/frp/commit/760b7f5d9654300a2df32528c002323d1fcdcbfb) Addressed Copilot commnets too ### 📊 Changes **7 files changed** (+643 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+3 -1) 📝 `pkg/util/vhost/https.go` (+141 -3) ➕ `pkg/util/vhost/https_proxy.go` (+140 -0) 📝 `server/controller/resource.go` (+6 -0) ➕ `server/group/https.go` (+224 -0) 📝 `server/proxy/https.go` (+115 -13) 📝 `server/service.go` (+14 -0) </details> ### 📄 Description ## What does this PR do? This PR adds HTTPS load balancing support to frp, enabling high availability and horizontal scaling for HTTPS services by distributing traffic across multiple backend HTTPS endpoints. ## Changes Made ### New Features - **HTTPS Group Controller** (`server/group/https.go`): Manages load balancing groups for HTTPS services with round-robin distribution - **HTTPS Reverse Proxy** (`pkg/util/vhost/https_proxy.go`): Implements SNI-based routing for grouped HTTPS services - **Enhanced HTTPS Proxy** (`server/proxy/https.go`): Integrates with group controller for load balancing ### Enhancements - **HTTPS Muxer** (`pkg/util/vhost/https.go`): Added group routing support and connection proxying - **Service Integration** (`server/service.go`): Initialized HTTPS reverse proxy for group routing - **Configuration Examples** (`conf/frpc_full_example.toml`): Added HTTPS load balancing examples with health checks ### Documentation - **README.md**: Added comprehensive HTTPS load balancing documentation and examples - **Configuration Guide**: Included examples for setting up HTTPS load balancing groups ## Configuration Example ```toml [[proxies]] name = "https_app_1" type = "https" localPort = 443 customDomains = ["app.example.com"] loadBalancer.group = "https_app" loadBalancer.groupKey = "secret123" healthCheck.type = "tcp" [[proxies]] name = "https_app_2" type = "https" localPort = 8443 customDomains = ["app.example.com"] loadBalancer.group = "https_app" loadBalancer.groupKey = "secret123" healthCheck.type = "tcp" ``` ## Benefits - **High Availability**: Automatic failover for HTTPS when backends become unhealthy - **Horizontal Scaling**: Distribute load across multiple HTTPS backends - **Consistent Architecture**: Follows same patterns as existing HTTP load balancing - **End-to-End Security**: Maintains SSL encryption throughout the load balancing process - **Health Monitoring**: Integrated health checks for backend availability ## Testing - ✅ All existing tests pass - ✅ Code formatting and linting checks pass - ✅ Manual testing with multiple HTTPS backends - ✅ Health check integration verified ## Related Issues Closes #[[4936](https://github.com/fatedier/frp/issues/4936)] - HTTPS Load Balancing Feature Request --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 14:54:21 -06:00
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#5081
No description provided.