Browse Source

Chore: minor changes

SukkaW 4 months ago
parent
commit
a2c0205aac
2 changed files with 3 additions and 10 deletions
  1. 1 9
      Build/index.ts
  2. 2 1
      Build/lib/is-domain-alive.ts

+ 1 - 9
Build/index.ts

@@ -1,7 +1,6 @@
 import process from 'node:process';
 import process from 'node:process';
 import os from 'node:os';
 import os from 'node:os';
 import fs from 'node:fs';
 import fs from 'node:fs';
-import fsp from 'node:fs/promises';
 
 
 import { downloadPreviousBuild } from './download-previous-build';
 import { downloadPreviousBuild } from './download-previous-build';
 import { buildCommon } from './build-common';
 import { buildCommon } from './build-common';
@@ -30,7 +29,7 @@ import { buildCloudMounterRules } from './build-cloudmounter-rules';
 import { createSpan, printTraceResult, whyIsNodeRunning } from './trace';
 import { createSpan, printTraceResult, whyIsNodeRunning } from './trace';
 import { buildDeprecateFiles } from './build-deprecate-files';
 import { buildDeprecateFiles } from './build-deprecate-files';
 import path from 'node:path';
 import path from 'node:path';
-import { CACHE_DIR, ROOT_DIR } from './constants/dir';
+import { ROOT_DIR } from './constants/dir';
 import { isCI } from 'ci-info';
 import { isCI } from 'ci-info';
 
 
 process.on('uncaughtException', (error) => {
 process.on('uncaughtException', (error) => {
@@ -42,12 +41,6 @@ process.on('unhandledRejection', (reason) => {
   process.exit(1);
   process.exit(1);
 });
 });
 
 
-const removesFiles = [
-  path.join(CACHE_DIR, '.cache.db'),
-  path.join(CACHE_DIR, '.cache.db-shm'),
-  path.join(CACHE_DIR, '.cache.db-wal')
-];
-
 const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
 const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
 
 
 (async () => {
 (async () => {
@@ -90,7 +83,6 @@ const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
     const buildCommonPromise = downloadPreviousBuildPromise.then(() => buildCommon(rootSpan));
     const buildCommonPromise = downloadPreviousBuildPromise.then(() => buildCommon(rootSpan));
 
 
     await Promise.all([
     await Promise.all([
-      ...removesFiles.map(file => fsp.rm(file, { force: true })),
       downloadPreviousBuildPromise,
       downloadPreviousBuildPromise,
       buildCommonPromise,
       buildCommonPromise,
       downloadPreviousBuildPromise.then(() => buildRejectIPList(rootSpan)),
       downloadPreviousBuildPromise.then(() => buildRejectIPList(rootSpan)),

+ 2 - 1
Build/lib/is-domain-alive.ts

@@ -8,7 +8,8 @@ const dnsServers = [
   'dns.cloudflare.com', // Cloudflare DoH that uses different IPs: 172.64.41.8,162.159.61.8
   'dns.cloudflare.com', // Cloudflare DoH that uses different IPs: 172.64.41.8,162.159.61.8
   'cloudflare-dns.com', // Cloudflare DoH that uses different IPs: 104.16.249.249,104.16.248.249
   'cloudflare-dns.com', // Cloudflare DoH that uses different IPs: 104.16.249.249,104.16.248.249
   // one.one.one.one // Cloudflare DoH that uses 1.1.1.1 and 1.0.0.1
   // one.one.one.one // Cloudflare DoH that uses 1.1.1.1 and 1.0.0.1
-  // '101.101.101.101', // TWNIC, has DNS pollution, e.g. t66y.com
+  // '101.101.101.101', 'dns.twnic.tw' // TWNIC, has DNS pollution, e.g. t66y.com
+  // 'dns.hinet.net' // HiNet DoH, has DNS pollution, e.g. t66y.com
   '185.222.222.222', '45.11.45.11', // DNS.SB
   '185.222.222.222', '45.11.45.11', // DNS.SB
   'doh.dns.sb', // DNS.SB, Unicast PoPs w/ GeoDNS
   'doh.dns.sb', // DNS.SB, Unicast PoPs w/ GeoDNS
   // 'doh.sb', // DNS.SB xTom Anycast IP
   // 'doh.sb', // DNS.SB xTom Anycast IP