[GH-ISSUE #2577] frps in windows dosen't support token #2052

Closed
opened 2026-05-05 13:19:24 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @asyowish on GitHub (Sep 15, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2577

Bug Description

Hi, i use frps in windows server 2019,
When client use token, frpc will failed with the error:
[token in login doesn't match token from configuration.]

The token configuration in frps seems dosen't take effect.
Once client comment the token line in the frpc.ini , then access frps successed, while the frps is enable token.

I've tried this is okay in CentOS 7, but token in frps configuration can't take effect in windows.

frpc Version

0.37.1

frps Version

0.37.1

System Architecture

windows/amd64 Server 2019

Configurations

frps.ini

[common]
bind_addr = 0.0.0.0
bind_port = 7000
#bind_udp_port = 7001
#kcp_bind_port = 7000

authentication_method = token
token = *

#log_file = frps.log
#log_level = info
#log_max_days = 5

dashboard_addr = 0.0.0.0
dashboard_port = 7500

dashboard_user = *
dashboard_pwd = *

frpc.ini

[common]
server_addr = *
server_port = 7000
token = *

Logs

frps log:
2021/09/15 16:17:37 [I] [service.go:449] [1d36ede392b42ecf] client login info: ip [IP:Port] version [0.37.1] hostname [] os [windows] arch [amd64]
2021/09/15 16:17:37 [W] [service.go:351] register control error: token in login doesn't match token from configuration

frpc log:
2021/09/15 16:17:37 [E] [service.go:295] token in login doesn't match token from configuration
2021/09/15 16:17:37 [W] [service.go:104] login to server failed: token in login doesn't match token from configuration
token in login doesn't match token from configuration

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 @asyowish on GitHub (Sep 15, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2577 ### Bug Description Hi, i use frps in windows server 2019, When client use token, frpc will failed with the error: [token in login doesn't match token from configuration.] The token configuration in frps seems dosen't take effect. Once client comment the token line in the frpc.ini , then access frps successed, while the frps is enable token. I've tried this is okay in CentOS 7, but token in frps configuration can't take effect in windows. ### frpc Version 0.37.1 ### frps Version 0.37.1 ### System Architecture windows/amd64 Server 2019 ### Configurations # frps.ini [common] bind_addr = 0.0.0.0 bind_port = 7000 #bind_udp_port = 7001 #kcp_bind_port = 7000 authentication_method = token token = * #log_file = frps.log #log_level = info #log_max_days = 5 dashboard_addr = 0.0.0.0 dashboard_port = 7500 dashboard_user = * dashboard_pwd = * # frpc.ini [common] server_addr = * server_port = 7000 token = * ### Logs frps log: 2021/09/15 16:17:37 [I] [service.go:449] [1d36ede392b42ecf] client login info: ip [IP:Port] version [0.37.1] hostname [] os [windows] arch [amd64] 2021/09/15 16:17:37 [W] [service.go:351] register control error: token in login doesn't match token from configuration frpc log: 2021/09/15 16:17:37 [E] [service.go:295] token in login doesn't match token from configuration 2021/09/15 16:17:37 [W] [service.go:104] login to server failed: token in login doesn't match token from configuration token in login doesn't match token from configuration ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [x] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [X] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@fatedier commented on GitHub (Sep 16, 2021):

Do you specify the correct configuration file for frps?

<!-- gh-comment-id:920536320 --> @fatedier commented on GitHub (Sep 16, 2021): Do you specify the correct configuration file for frps?
Author
Owner

@asyowish commented on GitHub (Sep 16, 2021):

@fatedier Thanks! Thanks!
I've added frpc to service in windows without specify the frpc.ini , and it work well.
So i think frps as well.
As your advice, i specify the frps.ini, now it work well too.
Haha, Happy.

<!-- gh-comment-id:920746885 --> @asyowish commented on GitHub (Sep 16, 2021): @fatedier Thanks! Thanks! I've added frpc to service in windows without specify the frpc.ini , and it work well. So i think frps as well. As your advice, i specify the frps.ini, now it work well too. Haha, Happy.
Author
Owner

@asyowish commented on GitHub (Sep 17, 2021):

噢噢,原来是国人,哈哈,支付宝请您喝杯咖啡,谢谢。

<!-- gh-comment-id:921383124 --> @asyowish commented on GitHub (Sep 17, 2021): 噢噢,原来是国人,哈哈,支付宝请您喝杯咖啡,谢谢。
Author
Owner

@asyowish commented on GitHub (Sep 17, 2021):

总结一下,我之前是在Windows(windows 10)中使用 nssm 将 frpc 配置成了服务,
当时并未使用参数指定 frpc.ini 的配置文件,会正常调用同目录的配置文件没有问题;

当在windows(Server 2019)中配置同样配置 frps 时,发现配置文件似乎没有生效,
按作者提示,加上参数指定 frps.ini 配置文件,正常工作!

<!-- gh-comment-id:921385081 --> @asyowish commented on GitHub (Sep 17, 2021): 总结一下,我之前是在Windows(windows 10)中使用 nssm 将 frpc 配置成了服务, 当时并未使用参数指定 frpc.ini 的配置文件,会正常调用同目录的配置文件没有问题; 当在windows(Server 2019)中配置同样配置 frps 时,发现配置文件似乎没有生效, 按作者提示,加上参数指定 frps.ini 配置文件,正常工作!
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#2052
No description provided.