Browse Source

Docs: fix README Clash usage

SukkaW 2 years ago
parent
commit
1610dd0939
2 changed files with 15 additions and 13 deletions
  1. 13 11
      Build/download-previous-build.js
  2. 2 2
      README.md

+ 13 - 11
Build/download-previous-build.js

@@ -21,19 +21,17 @@ const downloadPreviousBuild = task(__filename, async () => {
 
   let allFileExists = true;
 
-  if (isCI) {
-    allFileExists = false;
-  } else {
-    for await (const line of readFileByLine(resolve(__dirname, '../.gitignore'))) {
-      if (
-        (
+  for await (const line of readFileByLine(resolve(__dirname, '../.gitignore'))) {
+    if (
+      (
         // line.startsWith('List/')
-          line.startsWith('Modules/')
-        ) && !line.endsWith('/')
-      ) {
-        allFileExists = fs.existsSync(join(__dirname, '..', line));
-        filesList.push(line);
+        line.startsWith('Modules/')
+      ) && !line.endsWith('/')
+    ) {
+      filesList.push(line);
 
+      if (!isCI) {
+        allFileExists = fs.existsSync(join(__dirname, '..', line));
         if (!allFileExists) {
           console.log(`File not exists: ${line}`);
           break;
@@ -42,6 +40,10 @@ const downloadPreviousBuild = task(__filename, async () => {
     }
   }
 
+  if (isCI) {
+    allFileExists = false;
+  }
+
   if (allFileExists) {
     console.log('All files exists, skip download.');
     return;

+ 2 - 2
README.md

@@ -71,7 +71,7 @@ rules:
   # WARNING! Using reject_domainset can cause Clash out of memory due to the insufficient Clash implementation.
   - RULE-SET,reject_domainset,REJECT
   - RULE-SET,reject_phishing_domainset,REJECT
-  - RULE-SET,reject_ip,REJECT-DROP
+  - RULE-SET,reject_ip,REJECT
 ```
 
 #### 搜狗输入法
@@ -343,7 +343,7 @@ rule-providers:
     behavior: classical
     format: text
     interval: 43200
-    url: domestic_ip
+    url: https://ruleset.skk.moe/Clash/ip/domestic.txt
     path: ./sukkaw_ruleset/domestic_ip.txt
 
 rules: