[style] embed_wintun.dll
This commit is contained in:
parent
c22c7efd07
commit
92bb026f70
9 changed files with 14 additions and 13 deletions
|
@ -7,6 +7,7 @@ package wintun
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/Dreamacro/clash/listener/tun/dev/wintun/embed_dll"
|
||||||
"golang.zx2c4.com/wireguard/windows/driver/memmod"
|
"golang.zx2c4.com/wireguard/windows/driver/memmod"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
@ -76,7 +77,7 @@ func (d *lazyDLL) Load() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
module, err := memmod.LoadLibrary(ddlContent)
|
module, err := memmod.LoadLibrary(embed_dll.DDlContent)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Unable to load library: %w", err)
|
return fmt.Errorf("Unable to load library: %w", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package wintun
|
package embed_dll
|
||||||
|
|
||||||
// Copyright 2020 MeshStep Authors.
|
// Copyright 2020 MeshStep Authors.
|
||||||
//
|
//
|
||||||
|
@ -17,5 +17,5 @@ import (
|
||||||
_ "embed"
|
_ "embed"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed static/386/wintun.dll
|
//go:embed x86/wintun.dll
|
||||||
var ddlContent []byte
|
var DDlContent []byte
|
|
@ -1,4 +1,4 @@
|
||||||
package wintun
|
package embed_dll
|
||||||
|
|
||||||
// Copyright 2020 MeshStep Authors.
|
// Copyright 2020 MeshStep Authors.
|
||||||
//
|
//
|
||||||
|
@ -17,5 +17,5 @@ import (
|
||||||
_ "embed"
|
_ "embed"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed static/arm/wintun.dll
|
//go:embed amd64/wintun.dll
|
||||||
var ddlContent []byte
|
var DDlContent []byte
|
|
@ -1,4 +1,4 @@
|
||||||
package wintun
|
package embed_dll
|
||||||
|
|
||||||
// Copyright 2020 MeshStep Authors.
|
// Copyright 2020 MeshStep Authors.
|
||||||
//
|
//
|
||||||
|
@ -17,5 +17,5 @@ import (
|
||||||
_ "embed"
|
_ "embed"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed static/amd64/wintun.dll
|
//go:embed arm/wintun.dll
|
||||||
var ddlContent []byte
|
var DDlContent []byte
|
|
@ -1,4 +1,4 @@
|
||||||
package wintun
|
package embed_dll
|
||||||
|
|
||||||
// Copyright 2020 MeshStep Authors.
|
// Copyright 2020 MeshStep Authors.
|
||||||
//
|
//
|
||||||
|
@ -17,5 +17,5 @@ import (
|
||||||
_ "embed"
|
_ "embed"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed static/arm64/wintun.dll
|
//go:embed arm64/wintun.dll
|
||||||
var ddlContent []byte
|
var DDlContent []byte
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue