fix: avoid mac wireguard dns rewrites

This commit is contained in:
Stefano Fiorini
2026-03-12 01:20:02 -05:00
parent d0c50f5d8a
commit ca33b2d74a
4 changed files with 22 additions and 5 deletions

View File

@@ -33,8 +33,6 @@ const MAC_WG_HELPER_PATH = path.join(
"scripts",
"nordvpn-wireguard-helper.sh"
);
const DEFAULT_DNS_IPV4 = "103.86.96.100";
const DEFAULT_DNS_IPV6 = "2400:bb40:4444::100";
const CLIENT_IPV4 = "10.5.0.2";
const DNS_FALLBACK_RESOLVERS = ["1.1.1.1", "8.8.8.8"];
@@ -797,13 +795,11 @@ function buildWireguardConfig(server, privateKey) {
const ipAddresses = getServerIpAddresses(server);
const ipv6 = ipAddresses.find((value) => `${value}`.includes(":"));
const addresses = [CLIENT_IPV4];
const dnsServers = [DEFAULT_DNS_IPV4];
const allowedIps = ["0.0.0.0/0"];
if (ipv6) {
const clientIpv6 = deriveClientIpv6(ipv6);
if (clientIpv6) addresses.push(clientIpv6);
dnsServers.push(DEFAULT_DNS_IPV6);
allowedIps.push("::/0");
}
@@ -816,7 +812,6 @@ function buildWireguardConfig(server, privateKey) {
"[Interface]",
`PrivateKey = ${privateKey}`,
`Address = ${addresses.join(", ")}`,
`DNS = ${dnsServers.join(", ")}`,
"",
"[Peer]",
`PublicKey = ${publicKey}`,