Skip to content

Commit

Permalink
config secureDnsServers
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjia404 committed Jul 3, 2023
1 parent 3c36215 commit 9672ded
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ts/mains/main_node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -726,10 +726,16 @@ app.on('ready', async () => {
const userDataPath = await getRealPath(app.getPath('userData'));
const installPath = await getRealPath(join(app.getAppPath(), '..', '..'));

let secureDnsServers = userConfig.get('secureDnsServers');
if (!secureDnsServers) {
userConfig.set('secureDnsServers', 'https://1.1.1.1/dns-query');
secureDnsServers = 'https://1.1.1.1/dns-query'
}

app.configureHostResolver({
secureDnsMode: 'secure',
secureDnsServers: [
'https://1.1.1.1/dns-query'
secureDnsServers?.toString()
]
})

Expand Down

0 comments on commit 9672ded

Please sign in to comment.