This commit is contained in:
Owen
2025-11-01 18:34:00 -07:00
parent ea05ac9c71
commit 218e4f88bc
8 changed files with 785 additions and 778 deletions

25
olm/windows.go Normal file
View File

@@ -0,0 +1,25 @@
//go:build windows
package olm
import (
"errors"
"net"
"os"
"golang.zx2c4.com/wireguard/ipc"
"golang.zx2c4.com/wireguard/tun"
)
func createTUNFromFD(tunFdStr string, mtuInt int) (tun.Device, error) {
return nil, errors.New("CreateTUNFromFile not supported on Windows")
}
func uapiOpen(interfaceName string) (*os.File, error) {
return nil, nil
}
func uapiListen(interfaceName string, fileUAPI *os.File) (net.Listener, error) {
// On Windows, UAPIListen only takes one parameter
return ipc.UAPIListen(interfaceName)
}