diff --git a/listener/tun/dev/wintun/dll_windows.go b/listener/tun/dev/wintun/dll_windows.go index 4641ea4b..70d979ac 100644 --- a/listener/tun/dev/wintun/dll_windows.go +++ b/listener/tun/dev/wintun/dll_windows.go @@ -7,6 +7,7 @@ package wintun import ( "fmt" + "github.com/Dreamacro/clash/listener/tun/dev/wintun/embed_dll" "golang.zx2c4.com/wireguard/windows/driver/memmod" "sync" "sync/atomic" @@ -76,7 +77,7 @@ func (d *lazyDLL) Load() error { return nil } - module, err := memmod.LoadLibrary(ddlContent) + module, err := memmod.LoadLibrary(embed_dll.DDlContent) if err != nil { return fmt.Errorf("Unable to load library: %w", err) } diff --git a/listener/tun/dev/wintun/dll_embed_windows_386.go b/listener/tun/dev/wintun/embed_dll/windows_386.go similarity index 88% rename from listener/tun/dev/wintun/dll_embed_windows_386.go rename to listener/tun/dev/wintun/embed_dll/windows_386.go index 270210ad..05fab743 100644 --- a/listener/tun/dev/wintun/dll_embed_windows_386.go +++ b/listener/tun/dev/wintun/embed_dll/windows_386.go @@ -1,4 +1,4 @@ -package wintun +package embed_dll // Copyright 2020 MeshStep Authors. // @@ -17,5 +17,5 @@ import ( _ "embed" ) -//go:embed static/386/wintun.dll -var ddlContent []byte +//go:embed x86/wintun.dll +var DDlContent []byte diff --git a/listener/tun/dev/wintun/dll_embed_windows_arm.go b/listener/tun/dev/wintun/embed_dll/windows_amd64.go similarity index 88% rename from listener/tun/dev/wintun/dll_embed_windows_arm.go rename to listener/tun/dev/wintun/embed_dll/windows_amd64.go index 6fefa06e..2ee9f791 100644 --- a/listener/tun/dev/wintun/dll_embed_windows_arm.go +++ b/listener/tun/dev/wintun/embed_dll/windows_amd64.go @@ -1,4 +1,4 @@ -package wintun +package embed_dll // Copyright 2020 MeshStep Authors. // @@ -17,5 +17,5 @@ import ( _ "embed" ) -//go:embed static/arm/wintun.dll -var ddlContent []byte +//go:embed amd64/wintun.dll +var DDlContent []byte diff --git a/listener/tun/dev/wintun/dll_embed_windows_amd64.go b/listener/tun/dev/wintun/embed_dll/windows_arm.go similarity index 88% rename from listener/tun/dev/wintun/dll_embed_windows_amd64.go rename to listener/tun/dev/wintun/embed_dll/windows_arm.go index b7104e31..0636f21b 100644 --- a/listener/tun/dev/wintun/dll_embed_windows_amd64.go +++ b/listener/tun/dev/wintun/embed_dll/windows_arm.go @@ -1,4 +1,4 @@ -package wintun +package embed_dll // Copyright 2020 MeshStep Authors. // @@ -17,5 +17,5 @@ import ( _ "embed" ) -//go:embed static/amd64/wintun.dll -var ddlContent []byte +//go:embed arm/wintun.dll +var DDlContent []byte diff --git a/listener/tun/dev/wintun/dll_embed_windows_arm64.go b/listener/tun/dev/wintun/embed_dll/windows_arm64.go similarity index 88% rename from listener/tun/dev/wintun/dll_embed_windows_arm64.go rename to listener/tun/dev/wintun/embed_dll/windows_arm64.go index 37dff496..1e5d605d 100644 --- a/listener/tun/dev/wintun/dll_embed_windows_arm64.go +++ b/listener/tun/dev/wintun/embed_dll/windows_arm64.go @@ -1,4 +1,4 @@ -package wintun +package embed_dll // Copyright 2020 MeshStep Authors. // @@ -17,5 +17,5 @@ import ( _ "embed" ) -//go:embed static/arm64/wintun.dll -var ddlContent []byte +//go:embed arm64/wintun.dll +var DDlContent []byte diff --git a/listener/tun/dev/wintun/static/amd64/wintun.dll b/listener/tun/dev/wintun/static/amd64/wintun.dll deleted file mode 100644 index aee04e77..00000000 Binary files a/listener/tun/dev/wintun/static/amd64/wintun.dll and /dev/null differ diff --git a/listener/tun/dev/wintun/static/arm/wintun.dll b/listener/tun/dev/wintun/static/arm/wintun.dll deleted file mode 100644 index 0017794f..00000000 Binary files a/listener/tun/dev/wintun/static/arm/wintun.dll and /dev/null differ diff --git a/listener/tun/dev/wintun/static/arm64/wintun.dll b/listener/tun/dev/wintun/static/arm64/wintun.dll deleted file mode 100644 index dc4e4aee..00000000 Binary files a/listener/tun/dev/wintun/static/arm64/wintun.dll and /dev/null differ diff --git a/listener/tun/dev/wintun/static/x86/wintun.dll b/listener/tun/dev/wintun/static/x86/wintun.dll deleted file mode 100644 index 2ab97dba..00000000 Binary files a/listener/tun/dev/wintun/static/x86/wintun.dll and /dev/null differ