[GH-ISSUE #3724] toml配置问题 #2964

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

Originally created by @fengyuclub on GitHub (Oct 25, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3724

Bug Description

  1. 明明指定了端口17000,但启动却显示7000
    frps: the configuration file frps.toml syntax is ok
    root@ubuntu:~/frps# ./frps -c frps.toml
    WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead!
    2023/10/25 15:04:15 [I] [root.go:102] frps uses config file: frps.toml
    2023/10/25 15:04:15 [I] [service.go:200] frps tcp listen on **0.0.0.0:7000
    2023/10/25 15:04:15 [I] [root.go:111] frps started successfully
  2. dashboard为啥启动不起来,哪里错了?

frpc Version

0.52.3

frps Version

0.52.3

System Architecture

linux/amd64

Configurations

frps.toml

bindPort = 17000
quicBindPort = 17000
auth.method = "token"
auth.token = "123456"
tls_trusted_ca_file = /root/frps/ca.crt
#new dashborad
webServer.port = 17500
webServer.user = "admin"
webServer.password = "123456"
webServer.tls.certFile = "/root/frps/xxx.cer"
webServer.tls.keyFile = "/root/frps/xxx.key"
webServer.assetsDir = "./static"
#log
log.to = "./frps_new.log"
log.level = "debug"
log.maxDays = 3

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 @fengyuclub on GitHub (Oct 25, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3724 ### Bug Description 1. 明明指定了端口17000,但启动却显示7000 frps: the configuration file frps.toml syntax is ok root@ubuntu:~/frps# ./frps -c frps.toml WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead! 2023/10/25 15:04:15 [I] [root.go:102] frps uses config file: frps.toml 2023/10/25 15:04:15 [I] [service.go:200] frps tcp listen on **0.0.0.0:**7000** 2023/10/25 15:04:15 [I] [root.go:111] frps started successfully 2. dashboard为啥启动不起来,哪里错了? ### frpc Version 0.52.3 ### frps Version 0.52.3 ### System Architecture linux/amd64 ### Configurations frps.toml ----------------- bindPort = 17000 quicBindPort = 17000 auth.method = "token" auth.token = "123456" tls_trusted_ca_file = /root/frps/ca.crt #new dashborad webServer.port = 17500 webServer.user = "admin" webServer.password = "123456" webServer.tls.certFile = "/root/frps/xxx.cer" webServer.tls.keyFile = "/root/frps/xxx.key" webServer.assetsDir = "./static" #log log.to = "./frps_new.log" log.level = "debug" log.maxDays = 3 ----------------- ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@superzjg commented on GitHub (Oct 26, 2023):

不要 新旧格式配置混用,可能解析出错 (tls_trusted_ca_file)。

<!-- gh-comment-id:1780256838 --> @superzjg commented on GitHub (Oct 26, 2023): 不要 新旧格式配置混用,可能解析出错 (tls_trusted_ca_file)。
Author
Owner

@fengyuclub commented on GitHub (Oct 26, 2023):

不要 新旧格式配置混用,可能解析出错 (tls_trusted_ca_file)。

注释掉一样的

<!-- gh-comment-id:1780275526 --> @fengyuclub commented on GitHub (Oct 26, 2023): > 不要 新旧格式配置混用,可能解析出错 (tls_trusted_ca_file)。 注释掉一样的
Author
Owner

@superzjg commented on GitHub (Oct 26, 2023):

不要 新旧格式配置混用,可能解析出错 (tls_trusted_ca_file)。

注释掉一样的

配置文件使用绝对路径试试,难道读取的不是同一个?
我这用了一段时间没问题,亦0.52.3

<!-- gh-comment-id:1780277563 --> @superzjg commented on GitHub (Oct 26, 2023): > > 不要 新旧格式配置混用,可能解析出错 (tls_trusted_ca_file)。 > > 注释掉一样的 配置文件使用绝对路径试试,难道读取的不是同一个? 我这用了一段时间没问题,亦0.52.3
Author
Owner

@superzjg commented on GitHub (Oct 26, 2023):

你打开时有警告信息,识别成 ini 了,注意toml不需要 写 [common] 否则识别为 ini

<!-- gh-comment-id:1780280983 --> @superzjg commented on GitHub (Oct 26, 2023): 你打开时有警告信息,识别成 ini 了,注意toml不需要 写 [common] 否则识别为 ini
Author
Owner

@fengyuclub commented on GitHub (Oct 26, 2023):

你打开时有警告信息,识别成 ini 了,注意toml不需要 写 [common] 否则识别为 ini

我当然试了,但是verify -c 过不去的,详细看了文档,没找到相应的toml示例,能给个链接关于toml的吗 ?

<!-- gh-comment-id:1780284581 --> @fengyuclub commented on GitHub (Oct 26, 2023): > 你打开时有警告信息,识别成 ini 了,注意toml不需要 写 [common] 否则识别为 ini 我当然试了,但是verify -c 过不去的,详细看了文档,没找到相应的toml示例,能给个链接关于toml的吗 ?
Author
Owner

@superzjg commented on GitHub (Oct 26, 2023):

你打开时有警告信息,识别成 ini 了,注意toml不需要 写 [common] 否则识别为 ini

我当然试了,但是verify -c 过不去的,详细看了文档,没找到相应的toml示例,能给个链接关于toml的吗 ?

toml示例:https://github.com/fatedier/frp/blob/dev/conf/frps_full_example.toml
中文文档:https://gofrp.org/zh-cn/docs/

<!-- gh-comment-id:1780286762 --> @superzjg commented on GitHub (Oct 26, 2023): > > 你打开时有警告信息,识别成 ini 了,注意toml不需要 写 [common] 否则识别为 ini > > 我当然试了,但是verify -c 过不去的,详细看了文档,没找到相应的toml示例,能给个链接关于toml的吗 ? toml示例:https://github.com/fatedier/frp/blob/dev/conf/frps_full_example.toml 中文文档:https://gofrp.org/zh-cn/docs/
Author
Owner

@fengyuclub commented on GitHub (Oct 26, 2023):

和安装包里一样的,就是按这个弄的,真奇怪

<!-- gh-comment-id:1780290827 --> @fengyuclub commented on GitHub (Oct 26, 2023): 和安装包里一样的,就是按这个弄的,真奇怪
Author
Owner

@fengyuclub commented on GitHub (Oct 26, 2023):

  1. WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead!

这句WARNING应该是让我会错意了,应该直接就说“WARNING:检测到配置文件格式为ini,布拉布拉xxx”
谢谢你的提醒,目前应该正常了,还在测试服务端的面板,不知道是不是出于安全考虑不能访问了,之前ini正常的。

<!-- gh-comment-id:1780601366 --> @fengyuclub commented on GitHub (Oct 26, 2023): > 1. WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead! 这句WARNING应该是让我会错意了,应该直接就说“WARNING:检测到配置文件格式为ini,布拉布拉xxx” 谢谢你的提醒,目前应该正常了,还在测试服务端的面板,不知道是不是出于安全考虑不能访问了,之前ini正常的。
Author
Owner

@superzjg commented on GitHub (Oct 26, 2023):

  1. WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead!

这句WARNING应该是让我会错意了,应该直接就说“WARNING:检测到配置文件格式为ini,布拉布拉xxx” 谢谢你的提醒,目前应该正常了,还在测试服务端的面板,不知道是不是出于安全考虑不能访问了,之前ini正常的。

面板问题,是绑定地址问题,默认只有本机访问,改一下就行,作者大佬这里说了出于安全:
https://github.com/fatedier/frp/issues/3709#issuecomment-1774338490

<!-- gh-comment-id:1780648766 --> @superzjg commented on GitHub (Oct 26, 2023): > > 1. WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead! > > 这句WARNING应该是让我会错意了,应该直接就说“WARNING:检测到配置文件格式为ini,布拉布拉xxx” 谢谢你的提醒,目前应该正常了,还在测试服务端的面板,不知道是不是出于安全考虑不能访问了,之前ini正常的。 面板问题,是绑定地址问题,默认只有本机访问,改一下就行,作者大佬这里说了出于安全: https://github.com/fatedier/frp/issues/3709#issuecomment-1774338490
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#2964
No description provided.