Use electron's DNS resolver, prioritizing ipv4 connections

This commit is contained in:
Fedor Indutny 2023-05-30 16:57:16 -07:00 committed by GitHub
parent 615539ed6d
commit 557b86f52e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 169 additions and 240 deletions

View file

@ -20,6 +20,7 @@ import {
ipcMain as ipc,
Menu,
nativeTheme,
net,
powerSaveBlocker,
screen,
session,
@ -2618,6 +2619,15 @@ ipc.handle('executeMenuAction', async (_event, action: MenuActionType) => {
}
});
ipc.handle(
'net.resolveHost',
(_event, hostname: string, queryType?: 'A' | 'AAAA') => {
return net.resolveHost(hostname, {
queryType,
});
}
);
let stickerCreatorWindow: BrowserWindow | undefined;
async function showStickerCreatorWindow() {
if (stickerCreatorWindow) {