mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-26 11:21:22 +08:00
Revert "Override local to dhcp for macOS Tun mode"
DHCP is not reliable, so we need another method for this
This reverts commit 16d951eed1.
This commit is contained in:
parent
546b023dbc
commit
378d59b045
@ -423,12 +423,8 @@ namespace Configs {
|
|||||||
QJsonObject BuildDnsObject(QString address, bool tunEnabled)
|
QJsonObject BuildDnsObject(QString address, bool tunEnabled)
|
||||||
{
|
{
|
||||||
bool usingSystemdResolved = false;
|
bool usingSystemdResolved = false;
|
||||||
bool isDarwin = false;
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
usingSystemdResolved = ReadFileText("/etc/resolv.conf").contains("systemd-resolved");
|
usingSystemdResolved = ReadFileText("/etc/resolv.conf").contains("systemd-resolved");
|
||||||
#endif
|
|
||||||
#ifdef Q_OS_MACOS
|
|
||||||
isDarwin = true;
|
|
||||||
#endif
|
#endif
|
||||||
if (address.startsWith("local"))
|
if (address.startsWith("local"))
|
||||||
{
|
{
|
||||||
@ -438,13 +434,6 @@ namespace Configs {
|
|||||||
{"type", "underlying"}
|
{"type", "underlying"}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (tunEnabled && isDarwin)
|
|
||||||
{
|
|
||||||
MW_show_log(R"(DNS has been overriden to dhcp, if it does not work, please change both "Routing settings->Direct DNS" and "basic settings->Core->Core options->underlying dns" to something other than local)");
|
|
||||||
return {
|
|
||||||
{"type", "dhcp"}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
{"type", "local"}
|
{"type", "local"}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user