mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Chore: add fetch retry support
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
const { fetch } = require('undici');
|
||||
const { fetchWithRetry } = require('./lib/fetch-retry');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { isIP } = require('net');
|
||||
|
||||
(async () => {
|
||||
const res = (await (await fetch('https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/bogus-nxdomain.china.conf')).text())
|
||||
const res = (await (await fetchWithRetry('https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/bogus-nxdomain.china.conf')).text())
|
||||
.split('\n')
|
||||
.map(line => {
|
||||
if (line.startsWith('bogus-nxdomain=')) {
|
||||
|
||||
Reference in New Issue
Block a user