Newer
Older
import { execSync } from "child_process";
import dns from "dns";
import url from "url";
function getProxy(): string | undefined {
if (process.env.https_proxy) {
const httpsProxy = execSync("npm config get https-proxy").toString().trim();
return httpsProxy !== "null" ? httpsProxy : undefined;
}
}
export function getOnline(): Promise<boolean> {
return new Promise((resolve) => {
}
dns.lookup(hostname, (proxyErr) => {