diff --git a/go.mod b/go.mod index 48532bb7..3c9d5de2 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,6 @@ require ( github.com/tidwall/pretty v1.2.1 github.com/xtaci/kcp-go v5.4.20+incompatible golang.org/x/net v0.30.0 - golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 gorm.io/driver/postgres v1.5.9 gorm.io/gorm v1.25.12 ) @@ -134,6 +133,7 @@ require ( golang.org/x/text v0.19.0 // indirect golang.org/x/tools v0.26.0 // indirect golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect + golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect google.golang.org/protobuf v1.35.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/internal/vpn/tun_device_windows.go b/internal/vpn/tun_device_windows.go deleted file mode 100644 index bc49187e..00000000 --- a/internal/vpn/tun_device_windows.go +++ /dev/null @@ -1,50 +0,0 @@ -//go:build windows -// +build windows - -package vpn - -import ( - "fmt" - - "golang.zx2c4.com/wireguard/tun" -) - -type tunDevice struct { - tun tun.Device - name string -} - -func newTUNDevice() (TUNDevice, error) { - const tunName = "tun0" - - dev, err := tun.CreateTUN(tunName, TUNMTU) - if err != nil { - return nil, fmt.Errorf("error allocating TUN interface: %w", err) - } - - name, err := dev.Name() - if err != nil { - return nil, fmt.Errorf("error getting interface name: %w", err) - } - - return &tunDevice{ - tun: dev, - name: name, - }, nil -} - -func (t *tunDevice) Read(buf []byte) (int, error) { - return t.tun.Read(buf, 0) -} - -func (t *tunDevice) Write(buf []byte) (int, error) { - return t.tun.Write(buf, 0) -} - -func (t *tunDevice) Close() error { - return t.tun.Close() -} - -func (t *tunDevice) Name() string { - return t.name -} diff --git a/vendor/github.com/jaypipes/ghw/Dockerfile b/vendor/github.com/jaypipes/ghw/Dockerfile index fcd46c18..ee5d2761 100644 --- a/vendor/github.com/jaypipes/ghw/Dockerfile +++ b/vendor/github.com/jaypipes/ghw/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21-buster AS builder +FROM golang:1.21-buster as builder WORKDIR /go/src/github.com/jaypipes/ghw ENV GOPROXY=direct