mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-04-14 04:38:28 +10:00
Get darwin local DNS server from libresolv
This commit is contained in:
3
protocol/tun/hook.go
Normal file
3
protocol/tun/hook.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package tun
|
||||
|
||||
var HookBeforeCreatePlatformInterface func()
|
||||
@@ -359,6 +359,9 @@ func (t *Inbound) Start(stage adapter.StartStage) error {
|
||||
if t.platformInterface != nil {
|
||||
tunInterface, err = t.platformInterface.OpenTun(&tunOptions, t.platformOptions)
|
||||
} else {
|
||||
if HookBeforeCreatePlatformInterface != nil {
|
||||
HookBeforeCreatePlatformInterface()
|
||||
}
|
||||
tunInterface, err = tun.New(tunOptions)
|
||||
}
|
||||
monitor.Finish()
|
||||
|
||||
Reference in New Issue
Block a user