mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Chore: simplify build infra / remove reject_phishing
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user