Refactor: continues to rewrite to TS

This commit is contained in:
SukkaW
2023-11-15 16:26:46 +08:00
parent ec338a659f
commit 99589cf2fc
32 changed files with 258 additions and 471 deletions

View File

@@ -6,7 +6,7 @@ const isDomainLoose = (domain: string): boolean => {
return !!(!isIp && (isIcann || isPrivate));
};
const parseFelixDnsmasq = async (url: string | URL): Promise<string[]> => {
export const parseFelixDnsmasq = async (url: string | URL): Promise<string[]> => {
const res: string[] = [];
for await (const line of await fetchRemoteTextAndCreateReadlineInterface(url)) {
if (line.startsWith('server=/') && line.endsWith('/114.114.114.114')) {
@@ -19,5 +19,3 @@ const parseFelixDnsmasq = async (url: string | URL): Promise<string[]> => {
return res;
};
export { parseFelixDnsmasq };