Chore: simplify build infra / remove reject_phishing

This commit is contained in:
SukkaW
2023-12-09 23:23:55 +08:00
parent 42e9b4310f
commit 1928c052a9
24 changed files with 259 additions and 332 deletions

View File

@@ -1,4 +1,4 @@
import { fetchRemoteTextAndCreateReadlineInterface } from './fetch-remote-text-by-line';
import { fetchRemoteTextAndReadByLine } from './fetch-text-by-line';
import { parse } from 'tldts';
const isDomainLoose = (domain: string): boolean => {
@@ -8,7 +8,7 @@ const isDomainLoose = (domain: string): boolean => {
export const parseFelixDnsmasq = async (url: string | URL): Promise<string[]> => {
const res: string[] = [];
for await (const line of await fetchRemoteTextAndCreateReadlineInterface(url)) {
for await (const line of await fetchRemoteTextAndReadByLine(url)) {
if (line.startsWith('server=/') && line.endsWith('/114.114.114.114')) {
const domain = line.replace('server=/', '').replace('/114.114.114.114', '');
if (isDomainLoose(domain)) {