fix(settings): remove dns server option (#1416)

* fix(settings): remove dns server option

This PR removes the DNS Servers option added in #1266 because it doesn't seem to work reliably.

* style: remove whitespace change
This commit is contained in:
Gauthier
2025-03-02 22:53:43 +01:00
committed by GitHub
parent 9cc6930fed
commit ada467ecf4
8 changed files with 1 additions and 51 deletions

View File

@@ -83,12 +83,6 @@ app
net.setDefaultAutoSelectFamily(false);
}
if (settings.network.dnsServers.trim() !== '') {
dns.setServers(
settings.network.dnsServers.split(',').map((server) => server.trim())
);
}
// Register HTTP proxy
if (settings.network.proxy.enabled) {
await createCustomProxyAgent(settings.network.proxy);

View File

@@ -137,7 +137,6 @@ export interface MainSettings {
export interface NetworkSettings {
csrfProtection: boolean;
forceIpv4First: boolean;
dnsServers: string;
trustProxy: boolean;
proxy: ProxySettings;
}
@@ -510,7 +509,6 @@ class Settings {
csrfProtection: false,
trustProxy: false,
forceIpv4First: false,
dnsServers: '',
proxy: {
enabled: false,
hostname: '',

View File

@@ -10,7 +10,6 @@ const migrateNetworkSettings = (settings: any): AllSettings => {
csrfProtection: settings.main.csrfProtection ?? false,
trustProxy: settings.main.trustProxy ?? false,
forceIpv4First: settings.main.forceIpv4First ?? false,
dnsServers: settings.main.dnsServers ?? '',
proxy: settings.main.proxy ?? {
enabled: false,
hostname: '',
@@ -25,7 +24,6 @@ const migrateNetworkSettings = (settings: any): AllSettings => {
delete settings.main.csrfProtection;
delete settings.main.trustProxy;
delete settings.main.forceIpv4First;
delete settings.main.dnsServers;
delete settings.main.proxy;
return newSettings;
};

View File

@@ -18,8 +18,7 @@ class RestartFlag {
this.networkSettings.csrfProtection !== networkSettings.csrfProtection ||
this.networkSettings.trustProxy !== networkSettings.trustProxy ||
this.networkSettings.proxy.enabled !== networkSettings.proxy.enabled ||
this.networkSettings.forceIpv4First !== networkSettings.forceIpv4First ||
this.networkSettings.dnsServers !== networkSettings.dnsServers
this.networkSettings.forceIpv4First !== networkSettings.forceIpv4First
);
}
}