Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

单IP每日限制解析流量设置了最大10GB,但仍可以下载 #370

Closed
candies404 opened this issue Apr 22, 2024 · 1 comment
Closed
Assignees
Labels
help wanted Extra attention is needed

Comments

@candies404
Copy link

candies404 commented Apr 22, 2024

描述问题

单IP每日限制解析流量设置了最大10GB,但仍可以下载

如何复现此问题

复现此问题的步骤:

  1. 单IP每日限制解析流量设置10GB
  2. 然后下载

你需要的帮助

按我的理解应该是超过10GB不给下载和下载10GB后对该ip进行限制 ,请问这个是什么问题

截图

image
image

您的设备信息

  • 服务器系统信息 Alibaba Cloud 3 (Soaring Falcon) x86_64(Py3.7.16
  • 服务器 PHP 版本 8.1.27
  • 访问项目的浏览器版本 Chrome 123.0.6312.106(正式版本) (64 位)

补充信息

您可以在这里输入其他关于您需要的帮助的信息。

@candies404 candies404 added the help wanted Extra attention is needed label Apr 22, 2024
@candies404 candies404 changed the title 单IP每日限制解析流量设置了最大20GB,但仍可以下载 单IP每日限制解析流量设置了最大10GB,但仍可以下载 Apr 22, 2024
@yuantuo666
Copy link
Owner

相关代码在这里,https://github.com/yuantuo666/baiduwp-php/blob/73106353dfe221494c50a28b96ebba364c74e94c/app/Parse.php#L249C10-L249C19
目前的逻辑是,每次解析前查询 IP 解析流量,如果已经解析了超过设置的最大流量,则会拒绝。
图中是正常行为,因为列表是倒序的,就是先解析了 1.45GB 文件,再解析时,没超过 10GB,所以没有拒绝 20GB 文件。但如果继续解析,则会拒绝。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants