[GH-ISSUE #4792] custom_domains syntax in TOML incorrectly documented #3781

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

Originally created by @patrickdorival on GitHub (May 12, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4792

Bug Description

🚨 Bug: custom_domains syntax in TOML incorrectly documented — square bracket array format results in invalid domain routing

Summary

All FRP documentation and examples (including frpc_full_example.toml) show custom_domains defined using TOML array syntax, like this:

custom_domains = ["example.com"]

However, when using this syntax in frpc.toml, FRP does not parse it correctly. It registers the domain as a literal escaped string (e.g., "\"example.com\""), which causes domain matching in FRPS to fail. This results in no route found errors even though the proxy appears correctly registered in the dashboard.


🧪 Reproduction Steps

1. Using this config in frpc.toml:

[api]
type = "http"
local_ip = "host.docker.internal"
local_port = 8000
custom_domains = ["api.example.com"]

2. FRPS dashboard will display:

Domains: [ "\"api.example.com\"" ]

3. Requests to api.example.com via FRPS return:

error: no route found: api.example.com /

Workaround (actual working config)

Instead of using array syntax, define custom_domains as a string:

[api]
type = "http"
local_ip = "host.docker.internal"
local_port = 8000
custom_domains = "api.example.com"

Now FRPS dashboard shows:

Domains: [ "api.example.com" ]

And routing works as expected.


📚 Affected Documentation


Suggested Fix

  • Update TOML examples to use custom_domains = "example.com"
  • Alternatively, if multiple domains are supported, clarify that it must be a comma-separated string, not a TOML array
  • (Optional) Add validation or type enforcement in frpc to catch and warn about invalid custom_domains format

🙏 Closing

This bug causes significant frustration because the config looks valid, and FRP starts without errors — but routing fails silently. Updating the docs will save others from days of debugging.

I'm also not sure if this issue has been raised before. There are a lot of non-English issues that have been raised and unfortunately English is the only language in my toolbelt. I've tried working through them and looking with Google Translate, but there are just too many to get through.

frpc Version

0.62.1

frps Version

0.62.1

System Architecture

aarch64

Configurations

#frpc.toml

[common]
server_addr = "frps"
server_port = 7000

[api]
name = "api"
type = "http"
local_ip = "host.docker.internal"
local_port = 8000
custom_domains = "example.com" # this works no as desired

[keycloak]
name = "keycloak"
type = "http"
local_ip = "docker-keycloak-1"
local_port = 8080
custom_domains = ["keycloak.com"] # This doesn't work

#frps.toml
[common]
log_level = "debug"
bind_port = 7000
vhost_http_port = 8090
vhost_https_port = 8443
dashboard_port = 7500
dashboard_user = "admin"
dashboard_pwd = "password"

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 @patrickdorival on GitHub (May 12, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4792 ### Bug Description ### 🚨 Bug: `custom_domains` syntax in TOML incorrectly documented — square bracket array format results in invalid domain routing #### ❗ Summary All FRP documentation and examples (including `frpc_full_example.toml`) show `custom_domains` defined using TOML array syntax, like this: ```toml custom_domains = ["example.com"] ``` However, when using this syntax in `frpc.toml`, FRP **does not parse it correctly**. It registers the domain as a **literal escaped string** (e.g., `"\"example.com\""`), which causes domain matching in FRPS to fail. This results in `no route found` errors even though the proxy appears correctly registered in the dashboard. --- #### 🧪 Reproduction Steps **1. Using this config in `frpc.toml`:** ```toml [api] type = "http" local_ip = "host.docker.internal" local_port = 8000 custom_domains = ["api.example.com"] ``` **2. FRPS dashboard will display:** ``` Domains: [ "\"api.example.com\"" ] ``` **3. Requests to `api.example.com` via FRPS return:** ``` error: no route found: api.example.com / ``` --- #### ✅ Workaround (actual working config) Instead of using array syntax, define `custom_domains` as a **string**: ```toml [api] type = "http" local_ip = "host.docker.internal" local_port = 8000 custom_domains = "api.example.com" ``` Now FRPS dashboard shows: ``` Domains: [ "api.example.com" ] ``` And routing works as expected. --- #### 📚 Affected Documentation * [https://github.com/fatedier/frp/blob/dev/conf/frpc\_full\_example.toml](https://github.com/fatedier/frp/blob/dev/conf/frpc_full_example.toml) * [https://github.com/fatedier/frp/blob/dev/README.md](https://github.com/fatedier/frp/blob/dev/README.md) * General user guidance in the wiki and issues also reference `custom_domains = ["example.com"]` --- #### ✅ Suggested Fix * Update TOML examples to use `custom_domains = "example.com"` * Alternatively, if multiple domains are supported, clarify that it must be a **comma-separated string**, not a TOML array * (Optional) Add validation or type enforcement in `frpc` to catch and warn about invalid `custom_domains` format --- #### 🙏 Closing This bug causes significant frustration because the config *looks valid*, and FRP starts without errors — but routing fails silently. Updating the docs will save others from days of debugging. I'm also not sure if this issue has been raised before. There are a lot of non-English issues that have been raised and unfortunately English is the only language in my toolbelt. I've tried working through them and looking with Google Translate, but there are just too many to get through. ### frpc Version 0.62.1 ### frps Version 0.62.1 ### System Architecture aarch64 ### Configurations #frpc.toml [common] server_addr = "frps" server_port = 7000 [api] name = "api" type = "http" local_ip = "host.docker.internal" local_port = 8000 custom_domains = "example.com" # this works no as desired [keycloak] name = "keycloak" type = "http" local_ip = "docker-keycloak-1" local_port = 8080 custom_domains = ["keycloak.com"] # This doesn't work #frps.toml [common] log_level = "debug" bind_port = 7000 vhost_http_port = 8090 vhost_https_port = 8443 dashboard_port = 7500 dashboard_user = "admin" dashboard_pwd = "password" ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [x] 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 (May 12, 2025):

You're using the deprecated INI format. Please write your configuration strictly according to the TOML format documentation.

<!-- gh-comment-id:2871210655 --> @fatedier commented on GitHub (May 12, 2025): You're using the deprecated INI format. Please write your configuration strictly according to the TOML format documentation.
Author
Owner

@patrickdorival commented on GitHub (May 12, 2025):

Thanks for pointing me in the right direction. I noticed that there was a comment in the frps logs referencing "INI" format, but I didn't realize it was related to the syntax I was using.

I originally tried using the syntax from the example TOML files, and it caused the frpc service to fail without any information as to why (obviously an issue with something on my end).

I eventually reverted to the old format, which did work. It might be worth putting some validators in place to ensure that TOML files don't support "INI" formats so that it removes any confusion and clear direction.

Thanks for the help, thats all working perfectly now

<!-- gh-comment-id:2873339258 --> @patrickdorival commented on GitHub (May 12, 2025): Thanks for pointing me in the right direction. I noticed that there was a comment in the frps logs referencing "INI" format, but I didn't realize it was related to the syntax I was using. I originally tried using the syntax from the example TOML files, and it caused the frpc service to fail without any information as to why (obviously an issue with something on my end). I eventually reverted to the old format, which _did_ work. It might be worth putting some validators in place to ensure that TOML files don't support "INI" formats so that it removes any confusion and clear direction. Thanks for the help, thats all working perfectly now
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#3781
No description provided.