[GH-ISSUE #4639] frpc.toml 配置参数新语法在 Windows 11 24H2 中不可用 #3662

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

Originally created by @hello-liuxingyu on GitHub (Jan 16, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4639

Bug Description

在配置完 frpc.toml 后,我尝试启动 frpc 服务,得到报错如下:

PS C:\FRP> C:\FRP\frpc.exe -c C:\FRP\frpc.toml
WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead!
2025-01-16 11:44:28.478 [I] [sub/root.go:142] start frpc service for config file [C:\FRP\frpc.toml]
2025-01-16 11:44:28.489 [I] [client/service.go:295] try to connect to server...
2025-01-16 11:44:28.490 [W] [client/service.go:298] connect to server error: dial tcp 0.0.0.0:7000: connectex: No connection could be made because the target machine actively refused it.
2025-01-16 11:44:28.499 [I] [sub/root.go:160] frpc service for config file [C:\FRP\frpc.toml] stopped
login to the server failed: dial tcp 0.0.0.0:7000: connectex: No connection could be made because the target machine actively refused it.. With loginFailExit enabled, no additional retries will be attempted

这里一个很明显的问题是 frpc 在尝试连接 0.0.0.0:7000 (dial tcp 0.0.0.0:7000: connectex: No connection could be made because the target machine actively refused it.)。但是我 frpc.toml 配置里 serverAddr = "公网ip" ,网上教程基本都是这样写的,甚至官方给的参考配置也是这样的,我几乎找遍了全网都不知道怎么回事。最后我想到了可能是 serverAddr 使用了默认值,因为 serverAddr 默认值是 0.0.0.0 ,我尝试着改为旧版本的 server_addr ,结果 frpc 正常启动。

下面是我的配置:

[common]
serverAddr = "公网ip"
serverPort = 7000
auth.method = "token"
auth.token = " "

[log]
log.to = "./frps.log"
log.level = "info"
log.maxDays = 7
log.disablePrintColor = false


[smb]
type = tcp
localIp = "127.0.0.1"
localPort = 445
remotePort = 20445

我想知道为什么会出现这种问题呢,我 frps 和 frpc 都使用的是最新版本 0.61.1。

frpc Version

0.61.1

frps Version

0.61.1

System Architecture

windows/amd64

Configurations

~

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 @hello-liuxingyu on GitHub (Jan 16, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4639 ### Bug Description 在配置完 frpc.toml 后,我尝试启动 frpc 服务,得到报错如下: ``` PS C:\FRP> C:\FRP\frpc.exe -c C:\FRP\frpc.toml WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead! 2025-01-16 11:44:28.478 [I] [sub/root.go:142] start frpc service for config file [C:\FRP\frpc.toml] 2025-01-16 11:44:28.489 [I] [client/service.go:295] try to connect to server... 2025-01-16 11:44:28.490 [W] [client/service.go:298] connect to server error: dial tcp 0.0.0.0:7000: connectex: No connection could be made because the target machine actively refused it. 2025-01-16 11:44:28.499 [I] [sub/root.go:160] frpc service for config file [C:\FRP\frpc.toml] stopped login to the server failed: dial tcp 0.0.0.0:7000: connectex: No connection could be made because the target machine actively refused it.. With loginFailExit enabled, no additional retries will be attempted ``` 这里一个很明显的问题是 frpc 在尝试连接 0.0.0.0:7000 (dial tcp 0.0.0.0:7000: connectex: No connection could be made because the target machine actively refused it.)。但是我 frpc.toml 配置里 serverAddr = "公网ip" ,网上教程基本都是这样写的,甚至官方给的参考配置也是这样的,我几乎找遍了全网都不知道怎么回事。最后我想到了可能是 serverAddr 使用了默认值,因为 serverAddr 默认值是 0.0.0.0 ,**我尝试着改为旧版本的 server_addr** ,结果 frpc 正常启动。 下面是我的配置: ``` [common] serverAddr = "公网ip" serverPort = 7000 auth.method = "token" auth.token = " " [log] log.to = "./frps.log" log.level = "info" log.maxDays = 7 log.disablePrintColor = false [smb] type = tcp localIp = "127.0.0.1" localPort = 445 remotePort = 20445 ``` 我想知道为什么会出现这种问题呢,我 frps 和 frpc 都使用的是最新版本 0.61.1。 ### frpc Version 0.61.1 ### frps Version 0.61.1 ### System Architecture windows/amd64 ### Configurations ~ ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [X] Docs - [X] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [X] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:21:01 -06:00
Author
Owner

@superzjg commented on GitHub (Jan 16, 2025):

[common]
[log]
[smb]
这些都是错误的写法,仔细看示例文档:
https://github.com/fatedier/frp/blob/dev/conf/frpc_full_example.toml

<!-- gh-comment-id:2594990997 --> @superzjg commented on GitHub (Jan 16, 2025): [common] [log] [smb] 这些都是错误的写法,仔细看示例文档: https://github.com/fatedier/frp/blob/dev/conf/frpc_full_example.toml
Author
Owner

@github-actions[bot] commented on GitHub (Jan 31, 2025):

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

<!-- gh-comment-id:2626021144 --> @github-actions[bot] commented on GitHub (Jan 31, 2025): Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d 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#3662
No description provided.