[GH-ISSUE #479] API认证接口响应的参数无效? #383

Closed
opened 2026-02-27 23:16:42 +03:00 by kerem · 7 comments
Owner

Originally created by @waloyn on GitHub (Apr 26, 2022).
Original GitHub issue: https://github.com/snail007/goproxy/issues/479

Expected Behavior

预期行为:需要按照接口响应参数进限制。

Current Behavior

当前行为:并未按照接口参数进行限制,而且按默认行为进行限制,比如用户连接数,默认为20

Possible Solution

Steps to Reproduce

Context (Environment)

  1. proxy version is : proxy-admin 商业版 COML_2.9
  2. full command is :?
  3. system is :Liunx amd64
  4. full log is: 见截图

Detailed Description

Possible Implementation

按照文档解释:

解释
userconns:用户的最大连接数,不限制为0或者不设置这个头部。
ipconns:用户IP的最大连接数,不限制为0或者不设置这个头部。
userrate:用户的单个TCP连接速率限制,单位:字节/秒,不限制为0或者不设置这个头部。
iprate:用户IP的单个TCP连接速率限制,单位:字节/秒,不限制为0或者不设置这个头部。
upstream:使用的上级,没有为空,或者不设置这个头部。

不设置该头部信息或者设置为0,日志均显示max:20/s,如图所示

日志:
1

接口响应:
2

Originally created by @waloyn on GitHub (Apr 26, 2022). Original GitHub issue: https://github.com/snail007/goproxy/issues/479 <!--- Provide a general summary of the issue in the Title above --> ## Expected Behavior <!--- Tell us what should happen --> 预期行为:需要按照接口响应参数进限制。 ## Current Behavior <!--- Tell us what happens instead of the expected behavior --> 当前行为:并未按照接口参数进行限制,而且按默认行为进行限制,比如用户连接数,默认为20 ## Possible Solution <!--- Not obligatory, but suggest a fix/reason for the bug, --> ## Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug. Include code to reproduce, if relevant --> 1. 1. 1. 1. ## Context (Environment) <!--- How has this issue affected you? What are you trying to accomplish? --> <!--- Providing context helps us come up with a solution that is most useful in the real world --> 1. proxy version is : proxy-admin 商业版 COML_2.9 1. full command is :? 1. system is :Liunx amd64 1. full log is: 见截图 <!--- Provide a general summary of the issue in the Title above --> ## Detailed Description <!--- Provide a detailed description of the change or addition you are proposing --> ## Possible Implementation <!--- Not obligatory, but suggest an idea for implementing addition or change --> 按照文档解释: > [解释](https://snail.gitee.io/proxy/manual/zh/#/?id=%e8%a7%a3%e9%87%8a) userconns:用户的最大连接数,不限制为0或者不设置这个头部。 ipconns:用户IP的最大连接数,不限制为0或者不设置这个头部。 userrate:用户的单个TCP连接速率限制,单位:字节/秒,不限制为0或者不设置这个头部。 iprate:用户IP的单个TCP连接速率限制,单位:字节/秒,不限制为0或者不设置这个头部。 upstream:使用的上级,没有为空,或者不设置这个头部。 不设置该头部信息或者设置为0,日志均显示max:20/s,如图所示 日志: ![1](https://user-images.githubusercontent.com/20416585/165300542-253f1cfa-c5ec-4677-9ada-4477b722adb0.jpg) 接口响应: ![2](https://user-images.githubusercontent.com/20416585/165300548-751945a0-fd65-45ad-8d84-8485b7e8c262.jpg)
kerem closed this issue 2026-02-27 23:16:42 +03:00
Author
Owner

@waloyn commented on GitHub (Apr 26, 2022):

超过连接数后,日志限制一直在kill,因此用户反应不稳定。
3

<!-- gh-comment-id:1109748100 --> @waloyn commented on GitHub (Apr 26, 2022): 超过连接数后,日志限制一直在kill,因此用户反应不稳定。 ![3](https://user-images.githubusercontent.com/20416585/165302140-2a577dc9-b402-49db-b0a6-210d7fd96a6a.jpg)
Author
Owner

@snail007 commented on GitHub (Apr 26, 2022):

理解错误,你把--maxconns-rate和ipconns搞混了,看手册吧,完全是两个东西,一个是qps,一个是最大值。

<!-- gh-comment-id:1109900662 --> @snail007 commented on GitHub (Apr 26, 2022): 理解错误,你把--maxconns-rate和ipconns搞混了,看手册吧,完全是两个东西,一个是qps,一个是最大值。
Author
Owner

@waloyn commented on GitHub (Apr 27, 2022):

理解错误,你把--maxconns-rate和ipconns搞混了,看手册吧,完全是两个东西,一个是qps,一个是最大值。

还有就是control控制接口,运行了几天,一次请求都没发起过是啥情况,文档上不是说默认30秒POST一次么?

<!-- gh-comment-id:1110371071 --> @waloyn commented on GitHub (Apr 27, 2022): > 理解错误,你把--maxconns-rate和ipconns搞混了,看手册吧,完全是两个东西,一个是qps,一个是最大值。 还有就是control控制接口,运行了几天,一次请求都没发起过是啥情况,文档上不是说默认30秒POST一次么?
Author
Owner

@snail007 commented on GitHub (Apr 27, 2022):

仔细理解,那是上报那一刻有在线的连接才上报,手册写的清清楚楚。

<!-- gh-comment-id:1110375062 --> @snail007 commented on GitHub (Apr 27, 2022): 仔细理解,那是上报那一刻有在线的连接才上报,手册写的清清楚楚。
Author
Owner

@waloyn commented on GitHub (Apr 27, 2022):

仔细理解,那是上报那一刻有在线的连接才上报,手册写的清清楚楚。
看来是我想多了,50+用户在线三天,没有请求过一次控制接口(也就是没有上报过)就觉得有点问题。

还有就响应截图上面,userrate限速是3Mb,实际可以跑到10+MB

<!-- gh-comment-id:1110425165 --> @waloyn commented on GitHub (Apr 27, 2022): > 仔细理解,那是上报那一刻有在线的连接才上报,手册写的清清楚楚。 看来是我想多了,50+用户在线三天,没有请求过一次控制接口(也就是没有上报过)就觉得有点问题。 还有就响应截图上面,userrate限速是3Mb,实际可以跑到10+MB
Author
Owner

@waloyn commented on GitHub (Apr 27, 2022):

日志清一色是accept4: too many open files是啥问题?看了系统限制和proxy-admin打开的数量,都没有超标啊?
微信图片_20220427091911

<!-- gh-comment-id:1110429401 --> @waloyn commented on GitHub (Apr 27, 2022): 日志清一色是accept4: too many open files是啥问题?看了系统限制和proxy-admin打开的数量,都没有超标啊? ![微信图片_20220427091911](https://user-images.githubusercontent.com/20416585/165419211-8342b825-285e-4f03-86f0-ee7c24fde718.png)
Author
Owner

@snail007 commented on GitHub (Apr 27, 2022):

这里不是技术解答区,手册有的问题不再回答,你这个问题百度一大堆,系统配置问题,不是软件问题。

<!-- gh-comment-id:1110434004 --> @snail007 commented on GitHub (Apr 27, 2022): 这里不是技术解答区,手册有的问题不再回答,你这个问题百度一大堆,系统配置问题,不是软件问题。
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
starred/goproxy#383
No description provided.