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

适配改版后的配额系统 #503

Open
4 tasks done
1235789gzy1 opened this issue Aug 26, 2024 · 1 comment
Open
4 tasks done

适配改版后的配额系统 #503

1235789gzy1 opened this issue Aug 26, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@1235789gzy1
Copy link

1235789gzy1 commented Aug 26, 2024

需求 / Requirement

需要适配改版后的配额系统

网站更新日志
2024-08-26

  • The cutoff for when quotas can be used on archives is now one year after the gallery was posted (increased from 30 days), matching the cutoff for the H@H downloader.

  • Extra re-creation costs are no longer applied to archives for galleries posted in the last year (increased from 30 days) or archives downloaded in the last 90 days (increased from 30 days).

  • The way the image downloading limits work have been reworked, mainly to address various issues caused by an increase in IP address sharing due to increased use of CG-NAT and VPNs.

The old system had two modes, an account-based quota for donators and an IP-based quota for everyone else. This had a few notable quirks, like how if non-donators spent GP to reset the quota, it could be consumed by someone else sharing the same IP address.

The new system has three modes:

  • Donators and people with the More Pages hathperk have an account-based quota, like what donators had before.

  • Everyone else defaults to an IP-based quota, similar to before. However;

  • People who do not have an account-based quota and spend the GP to "reset" it are now assigned a dedicated quota for 24 hours, set with a cookie-based token. Meaning that if you spend GP, the resulting quota can no longer be used by anyone else.

Furthermore, the behavior when you hit the limit has changed:

If you hit the limit while browsing normally, it will no longer error out with a 509 "bandwidth exceeded" screen as long as H@H is enabled. Instead, it will force using the 1280x resampled version even if the image size settings are set higher than this.

If you hit the limit while downloading source images, it will start automatically charging GP for this in the background like before, erroring out if you don't have any. If H@H is disabled, it will also still error out with the 509 "bandwidth exceeded" screen when browsing.

In other words, unless you have the image size setting at "prefer original images" or above 1280x, or H@H is disabled, hitting the limit while browsing will have no effect. Though you could still trigger the DDoS protection if you overdo it.

For IP-based quotas, it will no longer show what the limit is. This is intentional. It will however explicitly tell you on the home screen if your IP is currently restricted from using high-resolution images.

原因 / Reason

目前改版后普通用户不再显示配额

建议实现 / Suggested implemention

修改配额展示文本
适配新的配额统计页面
重置配额需要适配新的 解锁配额 按钮
处理解锁配额后新增的cookie
下载时处理1280x分辨率是否暂停

备注 / Addition details

No response

自查步骤 / Verify steps

  • 您已仔细查看并知情 常见问题 中的内容 / You have checked Q&A carefully
  • 您已搜索过 Issue Tracker,没有找到类似内容 / I have searched on Issue Tracker, No duplicate or related open issue has been found
  • 您确保这个 Issue 只提及一个问题。如果您有多个功能请求,烦请发起多个 Issue / Ensure there is only one feature request in this issue. Please make mutiply issue for mutiply bugs
  • 您确保已使用最新版本测试,并且该问题在最新版本中仍未实现 / This feature have not supported in latest version
@1235789gzy1 1235789gzy1 added the enhancement New feature or request label Aug 26, 2024
@jiangtian616 jiangtian616 self-assigned this Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
@jiangtian616 @1235789gzy1 and others