[GH-ISSUE #951] frpc api 认证问题 #755

Closed
opened 2026-05-05 12:29:00 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @TelDragon on GitHub (Oct 22, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/951

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?
0.21.0
以下版本未测试

What operating system and processor architecture are you using (go env)?
windows7_64位

Configures you used:
有问题的

admin_addr = 127.0.0.1
admin_port = 7400
admin_user = admin
admin_passwd = admin

没有问题的

admin_addr = 127.0.0.1
admin_port = 7400

Steps to reproduce the issue:
/api/reload
/api/status

1.如果添加上认证功能,即便是账号密码正确也不能使用。
2.将认证参数去掉可以正常使用
3. 代码内 admin.go 注释掉可使用

//	user, passwd := g.GlbClientCfg.AdminUser, g.GlbClientCfg.AdminPwd
//	router.Use(frpNet.NewHttpAuthMiddleware(user, passwd).Middleware)

Describe the results you received:
有问题的 提示 “Unauthorized”
正常结果返回

  • /api/reload
{"code":0,"msg":""}
  • /api/status
{"tcp":[{"name":"222","type":"tcp","status":"running","err":"","local_addr":"127.0.0.1:7100","plugin":"","remote_addr":"freenat.club:14796"},{"name":"ssh","type":"tcp","status":"running","err":"","local_addr":"127.0.0.1:7400","plugin":"","remote_addr":"freenat.club:18344"}],"udp":[],"http":[],"https":[],"stcp":[],"xtcp":[]}

Describe the results you expected:
期望修复这个认证。因为有些还是需要这个认证的。

Additional information you deem important (e.g. issue happens only occasionally):

Can you point out what caused this issue (optional)

Originally created by @TelDragon on GitHub (Oct 22, 2018). Original GitHub issue: https://github.com/fatedier/frp/issues/951 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** 0.21.0 以下版本未测试 **What operating system and processor architecture are you using (`go env`)?** windows7_64位 **Configures you used:** 有问题的 ``` admin_addr = 127.0.0.1 admin_port = 7400 admin_user = admin admin_passwd = admin ``` 没有问题的 ``` admin_addr = 127.0.0.1 admin_port = 7400 ``` **Steps to reproduce the issue:** /api/reload /api/status 1.如果添加上认证功能,即便是账号密码正确也不能使用。 2.将认证参数去掉可以正常使用 3. 代码内 admin.go 注释掉可使用 ``` // user, passwd := g.GlbClientCfg.AdminUser, g.GlbClientCfg.AdminPwd // router.Use(frpNet.NewHttpAuthMiddleware(user, passwd).Middleware) ``` **Describe the results you received:** 有问题的 提示 “Unauthorized” 正常结果返回 * /api/reload ``` {"code":0,"msg":""} ``` * /api/status ``` {"tcp":[{"name":"222","type":"tcp","status":"running","err":"","local_addr":"127.0.0.1:7100","plugin":"","remote_addr":"freenat.club:14796"},{"name":"ssh","type":"tcp","status":"running","err":"","local_addr":"127.0.0.1:7400","plugin":"","remote_addr":"freenat.club:18344"}],"udp":[],"http":[],"https":[],"stcp":[],"xtcp":[]} ``` **Describe the results you expected:** 期望修复这个认证。因为有些还是需要这个认证的。 **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)**
Author
Owner

@fatedier commented on GitHub (Nov 8, 2018):

admin_passwd = admin 应该是 admin_pwd = admin,配置文件描述有误,之后会修过。

<!-- gh-comment-id:436862776 --> @fatedier commented on GitHub (Nov 8, 2018): `admin_passwd = admin` 应该是 `admin_pwd = admin`,配置文件描述有误,之后会修过。
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#755
No description provided.