mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-01-31 13:16:53 +00:00
18 lines
298 B
Go
18 lines
298 B
Go
package hosts
|
|
|
|
import (
|
|
"path/filepath"
|
|
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
var DefaultPath string
|
|
|
|
func init() {
|
|
systemDirectory, err := windows.GetSystemDirectory()
|
|
if err != nil {
|
|
systemDirectory = "C:\\Windows\\System32"
|
|
}
|
|
DefaultPath = filepath.Join(systemDirectory, "Drivers/etc/hosts")
|
|
}
|