mirror of
https://github.com/Nezumi-2711/cloudflare-gateway-pihole-scripts.git
synced 2026-09-22 13:38:37 +00:00
added checks for old filenames
This commit is contained in:
@@ -9,6 +9,8 @@ lerna-debug.log*
|
|||||||
|
|
||||||
# CGPS
|
# CGPS
|
||||||
output
|
output
|
||||||
|
input.csv
|
||||||
|
whitelist.csv
|
||||||
blocklist.txt
|
blocklist.txt
|
||||||
allowlist.txt
|
allowlist.txt
|
||||||
|
|
||||||
|
|||||||
+7
-2
@@ -1,3 +1,4 @@
|
|||||||
|
import { existsSync } from "fs";
|
||||||
import { resolve } from "path";
|
import { resolve } from "path";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -18,8 +19,12 @@ import {
|
|||||||
readFile,
|
readFile,
|
||||||
} from "./lib/utils.js";
|
} from "./lib/utils.js";
|
||||||
|
|
||||||
const allowlistFilename = "allowlist.txt";
|
const allowlistFilename = existsSync("whitelist.csv")
|
||||||
const blocklistFilename = "blocklist.txt";
|
? "whitelist.csv"
|
||||||
|
: "allowlist.txt";
|
||||||
|
const blocklistFilename = existsSync("input.csv")
|
||||||
|
? "input.csv"
|
||||||
|
: "blocklist.txt";
|
||||||
const allowlist = new Map();
|
const allowlist = new Map();
|
||||||
const blocklist = new Map();
|
const blocklist = new Map();
|
||||||
const domains = [];
|
const domains = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user