Skip to content

Commit c5047af

Browse files
committed
Update rate limit configuration, relax restrictions.
1 parent ab87d29 commit c5047af

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/network/app_dio/app_dio.dart

+7-7
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ class AppDio with DioMixin implements Dio {
9999

100100
// 缩略图请求的限频配置
101101
final thumbRateLimitConfig = RateLimitConfig(
102-
maxTokens: 10,
103-
refillDuration: const Duration(milliseconds: 500),
102+
maxTokens: 20,
103+
refillDuration: const Duration(milliseconds: 400),
104104
);
105105

106106
// 限频 桶令牌
107107
interceptors.add(
108108
TokenBucketInterceptor(
109-
defaultMaxTokens: 5, // 默认令牌桶最大容量
109+
defaultMaxTokens: 15, // 默认令牌桶最大容量
110110
defaultRefillDuration: const Duration(seconds: 500), // 默认令牌补充间隔时间
111111
globalLimit: false, // 是否全局限制
112112
hostConfig: {
@@ -117,12 +117,12 @@ class AppDio with DioMixin implements Dio {
117117
// 缩略图 (封面?)
118118
's.exhentai.org': thumbRateLimitConfig,
119119
'e-hentai.org': RateLimitConfig(
120-
maxTokens: 5,
121-
refillDuration: const Duration(seconds: 1),
120+
maxTokens: 8,
121+
refillDuration: const Duration(seconds: 600),
122122
),
123123
'exhentai.org': RateLimitConfig(
124-
maxTokens: 5,
125-
refillDuration: const Duration(seconds: 1),
124+
maxTokens: 6,
125+
refillDuration: const Duration(seconds: 600),
126126
),
127127
},
128128
),

0 commit comments

Comments
 (0)