Skip to content

Commit 01067bc

Browse files
committed
feat: 更新版本号至2026-05-11,移除订阅响应头中的请求数刷新倒计时
1 parent 9fb0650 commit 01067bc

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [2.1.20260511041705] - 2026-05-11 04:17:05
2+
3+
### Delete
4+
5+
- 移除 订阅响应头中的请求数刷新倒计时,避免小白心态爆炸!
6+
17
## [2.1.20260508190728] - 2026-05-08 19:07:28
28

39
### Debug

_worker.js

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const Version = '2026-05-08 19:07:28';
1+
const Version = '2026-05-11 04:17:05';
22
/*In our project workflow, we first*/ import //the necessary modules,
33
/*then*/ { connect }//to the central server,
44
/*and all data flows*/ from//this single source.
@@ -290,24 +290,18 @@ export default {
290290
if (作为优选订阅生成器) ctx.waitUntil(请求日志记录(env, request, 访问IP, 'Get_Best_SUB', config_JSON, false));
291291
else ctx.waitUntil(请求日志记录(env, request, 访问IP, 'Get_SUB', config_JSON));
292292
const ua = UA.toLowerCase();
293-
const expire = 4102329600;//2099-12-31 到期时间
294-
const now = Date.now();
295-
const today = new Date(now);
296-
today.setHours(0, 0, 0, 0);
297-
const UD = Math.floor(((now - today.getTime()) / 86400000) * 24 * 1099511627776 / 2);
298-
let pagesSum = UD, workersSum = UD, total = 24 * 1099511627776;
299-
if (config_JSON.CF.Usage.success) {
300-
pagesSum = config_JSON.CF.Usage.pages;
301-
workersSum = config_JSON.CF.Usage.workers;
302-
total = Number.isFinite(config_JSON.CF.Usage.max) ? (config_JSON.CF.Usage.max / 1000) * 1024 : 1024 * 100;
303-
}
304293
const responseHeaders = {
305294
"content-type": "text/plain; charset=utf-8",
306295
"Profile-Update-Interval": config_JSON.优选订阅生成.SUBUpdateTime,
307296
"Profile-web-page-url": url.protocol + '//' + url.host + '/admin',
308-
"Subscription-Userinfo": `upload=${pagesSum}; download=${workersSum}; total=${total}; expire=${expire}`,
309297
"Cache-Control": "no-store",
310298
};
299+
if (config_JSON.CF.Usage.success) {
300+
const pagesSum = config_JSON.CF.Usage.pages;
301+
const workersSum = config_JSON.CF.Usage.workers;
302+
const total = Number.isFinite(config_JSON.CF.Usage.max) ? (config_JSON.CF.Usage.max / 1000) * 1024 : 1024 * 100;
303+
responseHeaders["Subscription-Userinfo"] = `upload=${pagesSum}; download=${workersSum}; total=${total}; expire=4102329600`; // 2099-12-31 到期时间
304+
}
311305
const isSubConverterRequest = url.searchParams.has('b64') || url.searchParams.has('base64') || request.headers.get('subconverter-request') || request.headers.get('subconverter-version') || ua.includes('subconverter') || ua.includes(('CF-Workers-SUB').toLowerCase()) || 作为优选订阅生成器;
312306
const 订阅类型 = isSubConverterRequest
313307
? 'mixed'

0 commit comments

Comments
 (0)