[GH-ISSUE #5183] config-dir配合includes使用问题 #4048

Closed
opened 2026-05-05 14:34:03 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @fingerart on GitHub (Feb 21, 2026).
Original GitHub issue: https://github.com/fatedier/frp/issues/5183

Bug Description

为了实现 #5159 提到的使用场景,我同时连接了两个frps,一个外网(frps),一个内网(frps),使用--config-dir配合includesincludes = ["/conf/confd/*.toml"]),为了重复利用confd下的所有配置文件,这样可以只维护一套配置,启动时只能有一个成功,会出现以下提示:

2026-02-21 14:26:19.005 [W] [client/control.go:170] [24d880f625989e3d] [Foo] start error: proxy [Foo] already exists
2026-02-21 14:26:19.004 [I] [client/control.go:172] [d64ead1beafaa778] [Foo] start proxy success

frpc Version

v0.64.0

frps Version

v0.67.0

System Architecture

linux/amd64

Configurations

目录结构:

|-- frc-config
  |-- confd
    |-- foo-server.toml
    |-- ...
  |-- frpc-local.toml
  |-- frpc-remote.toml
# frpc-local.toml

serverAddr = "192.168.31.2"
serverPort = 8888
...
includes = ["/conf/confd/*.toml"]
# frpc-remote.toml

serverAddr = "domain.com"
serverPort = 8888
...
includes = ["/conf/confd/*.toml"]
# foo-server.toml

[[proxies]]
name = "Foo"
type = "https"
customDomains = ["foo.domain.com"]

[proxies.plugin]
type = "https2http"
localAddr = "192.168.1.88:88"
crtPath = "/conf/certs/foo_domain_com.crt"
keyPath = "/conf/certs/foo_domain_com.key"

Logs

No response

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @fingerart on GitHub (Feb 21, 2026). Original GitHub issue: https://github.com/fatedier/frp/issues/5183 ### Bug Description 为了实现 #5159 提到的使用场景,我同时连接了两个frps,一个外网(frps),一个内网(frps),使用`--config-dir`配合`includes`(`includes = ["/conf/confd/*.toml"]`),为了重复利用`confd`下的所有配置文件,这样可以只维护一套配置,启动时只能有一个成功,会出现以下提示: ```log 2026-02-21 14:26:19.005 [W] [client/control.go:170] [24d880f625989e3d] [Foo] start error: proxy [Foo] already exists 2026-02-21 14:26:19.004 [I] [client/control.go:172] [d64ead1beafaa778] [Foo] start proxy success ``` ### frpc Version v0.64.0 ### frps Version v0.67.0 ### System Architecture linux/amd64 ### Configurations 目录结构: ``` |-- frc-config |-- confd |-- foo-server.toml |-- ... |-- frpc-local.toml |-- frpc-remote.toml ``` ```toml # frpc-local.toml serverAddr = "192.168.31.2" serverPort = 8888 ... includes = ["/conf/confd/*.toml"] ``` ```toml # frpc-remote.toml serverAddr = "domain.com" serverPort = 8888 ... includes = ["/conf/confd/*.toml"] ``` ```toml # foo-server.toml [[proxies]] name = "Foo" type = "https" customDomains = ["foo.domain.com"] [proxies.plugin] type = "https2http" localAddr = "192.168.1.88:88" crtPath = "/conf/certs/foo_domain_com.crt" keyPath = "/conf/certs/foo_domain_com.key" ``` ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [x] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [x] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@fatedier commented on GitHub (Feb 24, 2026):

config-dir is only used for testing, it's not guaranteed to be stable.

<!-- gh-comment-id:3948603659 --> @fatedier commented on GitHub (Feb 24, 2026): `config-dir` is only used for testing, it's not guaranteed to be stable.
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#4048
No description provided.