[GH-ISSUE #4177] Multiple [[proxies]] sections in toml #3294

Closed
opened 2026-05-05 14:07:28 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @manishbuttan on GitHub (Apr 22, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4177

Bug Description

Why is this config frpc.toml not working?

frpc.toml

serverAddr = "someserver.link"
serverPort = 7000

proxies
name = "janus"
type = "https"
customDomains = ["am_0001_jn.someserver.link"]
[proxies.plugin]
type = "https2https"
localAddr = "127.0.0.1:8089"
crtPath = "/home/pi/Documents/certificates/fullchain.pem"
keyPath = "/home/pi/Documents/certificates/am_private.pem"
hostHeaderRewrite = "127.0.0.1"
requestHeaders.set.x-from-where = "frp"

proxies
name = "web"
type = "https"
customDomains = ["am_0001_wb.someserver.link"]
[proxies.plugin]
type = "https2http"
localAddr = "127.0.0.1:8000"
crtPath = "/home/pi/Documents/certificates/fullchain.pem"
keyPath = "/home/pi/Documents/certificates/am_private.pem"
hostHeaderRewrite = "127.0.0.1"
requestHeaders.set.x-from-where = "frp"

If I remove the second proxies section, the config works. But two proxies sections seem to be only loading the second one. The first is exposing a janus https server, and the second is exposing a web http server.

frpc Version

0.57.0

frps Version

0.57.0

System Architecture

Rpi runs frpc, ec2 linux runs frps

Configurations

I have included it in the config above

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 @manishbuttan on GitHub (Apr 22, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4177 ### Bug Description Why is this config frpc.toml not working? --- # frpc.toml serverAddr = "someserver.link" serverPort = 7000 [[proxies]] name = "janus" type = "https" customDomains = ["am_0001_jn.someserver.link"] [proxies.plugin] type = "https2https" localAddr = "127.0.0.1:8089" crtPath = "/home/pi/Documents/certificates/fullchain.pem" keyPath = "/home/pi/Documents/certificates/am_private.pem" hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp" [[proxies]] name = "web" type = "https" customDomains = ["am_0001_wb.someserver.link"] [proxies.plugin] type = "https2http" localAddr = "127.0.0.1:8000" crtPath = "/home/pi/Documents/certificates/fullchain.pem" keyPath = "/home/pi/Documents/certificates/am_private.pem" hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp" --- If I remove the second proxies section, the config works. But two proxies sections seem to be only loading the second one. The first is exposing a janus https server, and the second is exposing a web http server. ### frpc Version 0.57.0 ### frps Version 0.57.0 ### System Architecture Rpi runs frpc, ec2 linux runs frps ### Configurations I have included it in the config above ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [X] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:07:28 -06:00
Author
Owner

@fatedier commented on GitHub (Apr 23, 2024):

Need logs.

<!-- gh-comment-id:2071296658 --> @fatedier commented on GitHub (Apr 23, 2024): Need logs.
Author
Owner

@superzjg commented on GitHub (Apr 26, 2024):

It seems that only one HTTPS/HTTP can be configured. If multiple are needed, please use type = "tcp"

<!-- gh-comment-id:2078392466 --> @superzjg commented on GitHub (Apr 26, 2024): It seems that only one HTTPS/HTTP can be configured. If multiple are needed, please use `type = "tcp"`
Author
Owner

@manishbuttan commented on GitHub (Apr 29, 2024):

Thank you for your reply. Can you please help with a sample config? The full config seems to have specific fields that work under different configs:

proxies
name = "plugin_https2https"
type = "https"
customDomains = ["test.yourdomain.com"]
[proxies.plugin]
type = "https2https"
localAddr = "127.0.0.1:443"
crtPath = "./server.crt"
keyPath = "./server.key"
hostHeaderRewrite = "127.0.0.1"
requestHeaders.set.x-from-where = "frp"

In the above there is a crtPath and ketPath. I don't understand how to create multiple https2https entries. You said to use tcp. But where will the crt and key files go?

Do I keep all these fields and just change the type="tcp"? But this won't work and gives this error:
unmarshal ProxyConfig error: json: unknown field "customDomains"

Seems like each type of config has it's own custom fields. Can you please help me with a full config with all fields, where I may expose two https services as https services to frps with frpc.toml having a crtPath and keyPath and custom domain names?

<!-- gh-comment-id:2082054176 --> @manishbuttan commented on GitHub (Apr 29, 2024): Thank you for your reply. Can you please help with a sample config? The full config seems to have specific fields that work under different configs: -- [[proxies]] name = "plugin_https2https" type = "https" customDomains = ["test.yourdomain.com"] [proxies.plugin] type = "https2https" localAddr = "127.0.0.1:443" crtPath = "./server.crt" keyPath = "./server.key" hostHeaderRewrite = "127.0.0.1" requestHeaders.set.x-from-where = "frp" --- In the above there is a crtPath and ketPath. I don't understand how to create multiple https2https entries. You said to use tcp. But where will the crt and key files go? --- Do I keep all these fields and just change the type="tcp"? But this won't work and gives this error: unmarshal ProxyConfig error: json: unknown field "customDomains" --- Seems like each type of config has it's own custom fields. Can you please help me with a full config with all fields, where I may expose two https services as https services to frps with frpc.toml having a crtPath and keyPath and custom domain names?
Author
Owner

@manishbuttan commented on GitHub (Apr 29, 2024):

Sorry, I don't know why things are appearing bold in my post.

<!-- gh-comment-id:2082055278 --> @manishbuttan commented on GitHub (Apr 29, 2024): Sorry, I don't know why things are appearing bold in my post.
Author
Owner

@github-actions[bot] commented on GitHub (May 21, 2024):

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

<!-- gh-comment-id:2121484940 --> @github-actions[bot] commented on GitHub (May 21, 2024): Issues go stale after 21d 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#3294
No description provided.