mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-10-10 16:15:43 +00:00
17 lines
305 B
Go
17 lines
305 B
Go
package hosts
|
|
|
|
import (
|
|
"path/filepath"
|
|
"sync"
|
|
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
var defaultPath = sync.OnceValues(func() (string, error) {
|
|
systemDirectory, err := windows.GetSystemDirectory()
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
return filepath.Join(systemDirectory, "Drivers", "etc", "hosts"), nil
|
|
})
|