[GH-ISSUE #4672] [咨询] 请问代理Http服务时,subdomain与group是否可以同时使用? #3688

Closed
opened 2026-05-05 14:22:00 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @chingxuds on GitHub (Feb 14, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4672

Describe the feature request

在查阅文档时,「负载均衡与健康检查」一节中提到可以将多个相同类型的代理加入到同一个 group 中,以实现负载均衡的能力。并且支持http代理类型。现在我想实现一个http服务的负载均衡,同时还想使用自定义二级域名(subdomain),但我在文档中和范例配置文件中均没有找到类似案例,想问下目前的程序是否可以实现?如下配置是否可以正常工作?

期望实现的配置:

[[proxies]]
name = "web"
type = "http"
localIP = "192.168.1.1"
localPort = 80
subdomain = "web"
loadBalancer.group = "web_balance"
loadBalancer.groupKey = "123"

[[proxies]]
name = "web_fallback"
type = "http"
localIP = "192.168.1.2"
localPort = 80
subdomain = "web"
loadBalancer.group = "web_balance"
loadBalancer.groupKey = "123"

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 @chingxuds on GitHub (Feb 14, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4672 ### Describe the feature request 在查阅文档时,「负载均衡与健康检查」一节中提到可以将多个相同类型的代理加入到同一个 group 中,以实现负载均衡的能力。并且支持http代理类型。现在我想实现一个http服务的负载均衡,同时还想使用自定义二级域名(subdomain),但我在文档中和范例配置文件中均没有找到类似案例,想问下目前的程序是否可以实现?如下配置是否可以正常工作? 期望实现的配置: ```toml [[proxies]] name = "web" type = "http" localIP = "192.168.1.1" localPort = 80 subdomain = "web" loadBalancer.group = "web_balance" loadBalancer.groupKey = "123" [[proxies]] name = "web_fallback" type = "http" localIP = "192.168.1.2" localPort = 80 subdomain = "web" loadBalancer.group = "web_balance" loadBalancer.groupKey = "123" ``` ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [x] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@fatedier commented on GitHub (Feb 17, 2025):

是否可以直接执行测试一下?

<!-- gh-comment-id:2661902955 --> @fatedier commented on GitHub (Feb 17, 2025): 是否可以直接执行测试一下?
Author
Owner

@chingxuds commented on GitHub (Feb 17, 2025):

是否可以直接执行测试一下?

我按照如下配置可以正常启动,目前服务访问也正常。

[[proxies]]
name = "web"
type = "http"
localIP = "192.168.1.1"
localPort = 80
subdomain = "web"
loadBalancer.group = "web_balance"
loadBalancer.groupKey = "123"
healthCheck.type = "http"
healthCheck.path = "/check"
healthCheck.timeoutSeconds = 3
healthCheck.maxFailed = 3
healthCheck.intervalSeconds = 10

[[proxies]]
name = "web_fallback"
type = "http"
localIP = "192.168.1.2"
localPort = 80
subdomain = "web"
loadBalancer.group = "web_balance"
loadBalancer.groupKey = "123"
healthCheck.type = "http"
healthCheck.path = "/check"
healthCheck.timeoutSeconds = 3
healthCheck.maxFailed = 3
healthCheck.intervalSeconds = 10
<!-- gh-comment-id:2661911105 --> @chingxuds commented on GitHub (Feb 17, 2025): > 是否可以直接执行测试一下? 我按照如下配置可以正常启动,目前服务访问也正常。 ```toml [[proxies]] name = "web" type = "http" localIP = "192.168.1.1" localPort = 80 subdomain = "web" loadBalancer.group = "web_balance" loadBalancer.groupKey = "123" healthCheck.type = "http" healthCheck.path = "/check" healthCheck.timeoutSeconds = 3 healthCheck.maxFailed = 3 healthCheck.intervalSeconds = 10 [[proxies]] name = "web_fallback" type = "http" localIP = "192.168.1.2" localPort = 80 subdomain = "web" loadBalancer.group = "web_balance" loadBalancer.groupKey = "123" healthCheck.type = "http" healthCheck.path = "/check" healthCheck.timeoutSeconds = 3 healthCheck.maxFailed = 3 healthCheck.intervalSeconds = 10 ```
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#3688
No description provided.