Add hosts transport & Remove bad linkname usages

This commit is contained in:
世界
2025-01-25 19:04:12 +08:00
parent 314b25bccf
commit 3fa417f283
22 changed files with 645 additions and 97 deletions

View File

@@ -0,0 +1,8 @@
package hosts
import _ "unsafe"
var DefaultPath = getSystemDirectory() + "/Drivers/etc/hosts"
//go:linkname getSystemDirectory internal/syscall/windows.GetSystemDirectory
func getSystemDirectory() string