世界 79b2673909
Fix local DNS server on darwin
We mistakenly believed that `libresolv`'s `search` function worked correctly in NetworkExtension, but it seems only `getaddrinfo` does.

This commit changes the behavior of the `local` DNS server in NetworkExtension to prefer DHCP, falling back to `getaddrinfo` if DHCP servers are unavailable.

It's worth noting that `prefer_go` does not disable DHCP since it respects Dial Fields, but `getaddrinfo` does the opposite. The new behavior only applies to NetworkExtension, not to all scenarios (primarily command-line binaries) as it did previously.

In addition, this commit also improves the DHCP DNS server to use the same robust query logic as `local`.
2025-08-19 14:41:08 +08:00
2025-08-19 11:15:48 +08:00
2025-08-19 11:16:36 +08:00
2025-08-19 11:16:34 +08:00
2025-08-19 14:41:08 +08:00
2025-08-19 11:16:35 +08:00
2025-07-08 13:14:42 +08:00
2025-03-14 17:07:17 +08:00
2025-08-19 11:16:36 +08:00
2025-08-19 11:16:34 +08:00
2025-07-08 13:14:43 +08:00
2025-08-19 11:16:36 +08:00
2025-08-16 00:09:29 +08:00
2025-08-10 20:06:28 +08:00
2025-04-18 08:54:40 +08:00
2025-07-08 13:14:43 +08:00
2024-06-24 10:10:49 +08:00
2024-02-24 13:20:27 +08:00
2025-08-13 23:37:40 +08:00
2025-04-29 20:45:19 +08:00
2023-12-29 18:00:40 +08:00
2023-12-29 18:00:40 +08:00
2025-04-29 20:45:19 +08:00
2025-08-15 15:05:34 +08:00
2025-08-15 15:05:34 +08:00
2023-03-27 08:20:51 +08:00
2025-07-08 13:14:42 +08:00
2024-09-09 08:48:35 +08:00

sing-box

The universal proxy platform.

Packaging status

Documentation

https://sing-box.sagernet.org

License

Copyright (C) 2022 by nekohasekai <contact-sagernet@sekai.icu>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

In addition, no derivative work may use the name or imply association
with this application without prior consent.
Description
The universal proxy platform
Readme 51 MiB
Languages
Go 96.4%
Shell 3.1%
Makefile 0.4%