mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Chore: process line stream
This commit is contained in:
@@ -19,7 +19,7 @@ export function extractDomainsFromFelixDnsmasq(line: string): string | null {
|
||||
export async function parseFelixDnsmasqFromResp(resp: NodeFetchResponse | UndiciResponseData | Response): Promise<string[]> {
|
||||
const results: string[] = [];
|
||||
|
||||
for await (const line of createReadlineInterfaceFromResponse(resp)) {
|
||||
for await (const line of createReadlineInterfaceFromResponse(resp, true)) {
|
||||
const domain = extractDomainsFromFelixDnsmasq(line);
|
||||
if (domain && isDomainLoose(domain)) {
|
||||
results.push(domain);
|
||||
|
||||
Reference in New Issue
Block a user