Skip to content

Commit ea1065c

Browse files
committed
feat: Enable DoH in Renderer process
1 parent 9842d59 commit ea1065c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/back/dns.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ const lookup = (
6060
response.on('data', (d) => {
6161
const result = dnsPacket.decode(d);
6262
if (result.answers && result.answers.length > 0) {
63-
console.log('ip results: ' + result.answers.length);
6463
const answer: any = result.answers[0];
6564
dnsCache.set(hostname, {
6665
address: answer.data,

src/main/Main.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,12 @@ export function main(init: Init): void {
296296
}
297297

298298
async function onAppReady() {
299+
// Enable DoH
300+
app.configureHostResolver({
301+
secureDnsMode: 'secure',
302+
secureDnsServers: ['https://cloudflare-dns.com/dns-query', 'https://dns.google/dns-query']
303+
});
304+
299305
if (Util.isDev) {
300306
installExtension(REACT_DEVELOPER_TOOLS, {
301307
loadExtensionOptions: {

0 commit comments

Comments
 (0)