[GH-ISSUE #3615] [Feature Request] 如何批量反代子域名? #2884

Closed
opened 2026-05-05 13:51:48 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @JZLeung on GitHub (Sep 14, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3615

Describe the feature request

后台服务会自动创建多个子域名以区分应用,并且用 header_host 来做校验。如一个appId为xxx的应用,它的url为:

[app-xxx]
type=http
local_ip=192.168.3.1.nip.io
local_port=80
custom_domains=xxx.frp.example.com
host_header_rewrite = xxx.192.168.3.1.nip.io

创建多个子应用,则需要在 frpc.ini 中增加多个反代条目,有点麻烦。

Describe alternatives you've considered

能否自定义重写规则?

[app-*]
type=http
local_ip=192.168.3.1.nip.io
local_port=80
custom_domains=$1.frp.example.com
host_header_rewrite = $1.192.168.3.1.nip.io

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @JZLeung on GitHub (Sep 14, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3615 ### Describe the feature request 后台服务会自动创建多个子域名以区分应用,并且用 header_host 来做校验。如一个appId为xxx的应用,它的url为: ``` [app-xxx] type=http local_ip=192.168.3.1.nip.io local_port=80 custom_domains=xxx.frp.example.com host_header_rewrite = xxx.192.168.3.1.nip.io ``` 创建多个子应用,则需要在 frpc.ini 中增加多个反代条目,有点麻烦。 ### Describe alternatives you've considered 能否自定义重写规则? ``` [app-*] type=http local_ip=192.168.3.1.nip.io local_port=80 custom_domains=$1.frp.example.com host_header_rewrite = $1.192.168.3.1.nip.io ``` ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [x] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:51:48 -06:00
Author
Owner

@fatedier commented on GitHub (Sep 15, 2023):

你可以写一个脚本批量创建和维护。

各种各种简化的需求可以有很多,配置本身只提供最基础的能力,否则难以维护,其他额外的需求都可以通过脚本或外部程序实现。

<!-- gh-comment-id:1720403027 --> @fatedier commented on GitHub (Sep 15, 2023): 你可以写一个脚本批量创建和维护。 各种各种简化的需求可以有很多,配置本身只提供最基础的能力,否则难以维护,其他额外的需求都可以通过脚本或外部程序实现。
Author
Owner

@github-actions[bot] commented on GitHub (Oct 16, 2023):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1763558056 --> @github-actions[bot] commented on GitHub (Oct 16, 2023): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#2884
No description provided.