mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #4792] custom_domains syntax in TOML incorrectly documented #3781
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#3781
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @patrickdorival on GitHub (May 12, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4792
Bug Description
🚨 Bug:
custom_domainssyntax in TOML incorrectly documented — square bracket array format results in invalid domain routing❗ Summary
All FRP documentation and examples (including
frpc_full_example.toml) showcustom_domainsdefined using TOML array syntax, like this: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 inno route founderrors even though the proxy appears correctly registered in the dashboard.🧪 Reproduction Steps
1. Using this config in
frpc.toml:2. FRPS dashboard will display:
3. Requests to
api.example.comvia FRPS return:✅ Workaround (actual working config)
Instead of using array syntax, define
custom_domainsas a string:Now FRPS dashboard shows:
And routing works as expected.
📚 Affected Documentation
custom_domains = ["example.com"]✅ Suggested Fix
custom_domains = "example.com"frpcto catch and warn about invalidcustom_domainsformat🙏 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
@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.
@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