mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 13:50:12 +08:00
Fix darwin system dns
This commit is contained in:
parent
c141387f66
commit
1259a5a285
@ -95,7 +95,7 @@ func (s *server) Start(in *gen.LoadConfigReq, out *gen.ErrorResp) (_ error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if runtime.GOOS == "darwin" && strings.Contains(*in.CoreConfig, "utun") {
|
if runtime.GOOS == "darwin" && strings.Contains(*in.CoreConfig, "tun-in") && strings.Contains(*in.CoreConfig, "172.19.0.1/24") {
|
||||||
err := sys.SetSystemDNS("172.19.0.2", boxInstance.Network().InterfaceMonitor())
|
err := sys.SetSystemDNS("172.19.0.2", boxInstance.Network().InterfaceMonitor())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Failed to set system DNS:", err)
|
log.Println("Failed to set system DNS:", err)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user