This commit is contained in:
ayumi-signal 2024-08-02 15:08:50 -07:00
parent d97a12b718
commit b3a5fd3cfb

View file

@ -25,12 +25,15 @@ const FALLBACK_DOMAINS = [
async function main() { async function main() {
const config = await Promise.all( const config = await Promise.all(
FALLBACK_DOMAINS.sort().map(async domain => { FALLBACK_DOMAINS.sort().map(async domain => {
const ipv4endpoints = (await resolve4(domain)).map(a => ({
family: 'ipv4',
address: a,
}));
const ipv4endpoints = (await resolve4(domain)) const ipv6endpoints = (await resolve6(domain)).map(a => ({
.map(a => ({"family": "ipv4", "address": a})) family: 'ipv6',
address: a,
const ipv6endpoints = (await resolve6(domain)) }));
.map(a => ({"family": "ipv6", "address": a}))
const endpoints = [...ipv4endpoints, ...ipv6endpoints] const endpoints = [...ipv4endpoints, ...ipv6endpoints]
.filter(isNotNil) .filter(isNotNil)
@ -49,7 +52,7 @@ async function main() {
return 1; return 1;
} }
return 0; return 0;
}) });
return { domain, endpoints }; return { domain, endpoints };
}) })