hifun-tools 1.4.26 → 1.4.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -301,6 +301,8 @@ class InitCls {
301
301
  };
302
302
  /** 备用 Address 策略 */
303
303
  const loadBackupAddress = async () => {
304
+ if (this.tenant === "t1sport")
305
+ this.backupAddress = t1BackGateWay;
304
306
  const backupList = JSON.parse(AesDecrypt(await this.fetchTxtFile(this.backupAddress)));
305
307
  this.backupAddressList = backupList || [];
306
308
  await setBaseUrl(this.backupAddressList);
@@ -317,6 +319,7 @@ class InitCls {
317
319
  const tenantDictList = this.getTenantDictList().filter((a) => !this.ErrorDomainUrl.includes(a.lineGroup));
318
320
  const currentLineGroup = this.getTenantDict()?.lineGroup;
319
321
  let baseUrlList = filterSmartLines(tenantDictList, originBaseUrl, this.ErrorDomainUrl?.length === 0 ? currentLineGroup : "");
322
+ console.log("++++++++++");
320
323
  /** 3️⃣ 主线路测速 */
321
324
  try {
322
325
  await setBaseUrl(baseUrlList);
@@ -365,4 +368,5 @@ class InitCls {
365
368
  }
366
369
  }
367
370
  const HF = new InitCls();
371
+ const t1BackGateWay = ["https://s3.t1game888.com/gateway/lineAddress.txt"];
368
372
  export { HF, isDomainMatch, toStandardUrl, AesEncrypt, AesDecrypt, filterSmartLines, matchBrowser, getOptimalDecodedString, };
@@ -1,5 +1,8 @@
1
1
  /** 浏览器识别(结果缓存) */
2
2
  let cachedBrowser = null;
3
+ let retryHttpTime = localStorage.getItem("retryHttpTime")
4
+ ? Number(localStorage.getItem("retryHttpTime"))
5
+ : 3000;
3
6
  /** 保留端口,去掉协议 */
4
7
  export function normalizeHost(hostname) {
5
8
  hostname = hostname.trim().toLowerCase();
@@ -163,7 +166,7 @@ export async function getOptimalDecodedString(arr, options) {
163
166
  failedUrls.push(url);
164
167
  pendingCount--;
165
168
  checkAllFailed();
166
- }, 3000);
169
+ }, retryHttpTime);
167
170
  fetch(`${toStandardUrl(url)}/actuator-security/health?t=${Date.now()}`, {
168
171
  signal: controller.signal,
169
172
  })
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.4.25";
1
+ export declare const VERSION = "1.4.27";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.4.25";
1
+ export const VERSION = "1.4.27";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hifun-tools",
3
- "version": "1.4.26",
3
+ "version": "1.4.28",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",