Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frpc.toml 配置参数新语法在 Windows 11 24H2 中不可用 #4639

Open
4 of 11 tasks
hello-liuxingyu opened this issue Jan 16, 2025 · 1 comment
Open
4 of 11 tasks

Comments

@hello-liuxingyu
Copy link

hello-liuxingyu commented Jan 16, 2025

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
@superzjg
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants