Skip to content

Commit

Permalink
chore: switch to tailscale.com/wireguard-go (#28)
Browse files Browse the repository at this point in the history
Signed-off-by: Spike Curtis <[email protected]>
  • Loading branch information
spikecurtis authored May 8, 2024
1 parent 0daf53d commit 28e3f39
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/coder/wgtunnel

go 1.20

replace golang.zx2c4.com/wireguard => github.com/coder/wireguard-go v0.0.0-20230920225835-b7d43c468619
replace github.com/tailscale/wireguard-go => github.com/coder/wireguard-go v0.0.0-20240502122727-a4cb23ac736d

require (
cdr.dev/slog v1.6.2-0.20230901043036-3e17d6de9749
Expand All @@ -11,6 +11,7 @@ require (
github.com/go-chi/httprate v0.7.4
github.com/riandyrn/otelchi v0.5.1
github.com/stretchr/testify v1.8.4
github.com/tailscale/wireguard-go v0.0.0-20231121184858-cc193a0b3272
github.com/urfave/cli/v2 v2.25.7
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0
go.opentelemetry.io/otel v1.18.0
Expand All @@ -21,7 +22,6 @@ require (
golang.org/x/mod v0.12.0
golang.org/x/sync v0.3.0
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
golang.zx2c4.com/wireguard v0.0.0-20230704135630-469159ecf7d1
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6
google.golang.org/grpc v1.58.3
)
Expand Down Expand Up @@ -62,5 +62,5 @@ require (
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gvisor.dev/gvisor v0.0.0-20221203005347-703fd9b7fbc0 // indirect
gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/charmbracelet/lipgloss v0.7.1 h1:17WMwi7N1b1rVWOjMT+rCh7sQkvDU75B2hbZpc5Kc1E=
github.com/charmbracelet/lipgloss v0.7.1/go.mod h1:yG0k3giv8Qj8edTCbbg6AlQ5e8KNWpFujkNawKNhE2c=
github.com/coder/wireguard-go v0.0.0-20230920225835-b7d43c468619 h1:Ug4+d7ooZNjQPVHL+zrHF2hLCr0FOpxHdB2Urr77VmY=
github.com/coder/wireguard-go v0.0.0-20230920225835-b7d43c468619/go.mod h1:tqur9LnfstdR9ep2LaJT4lFUl0EjlHtge+gAjmsHUG4=
github.com/coder/wireguard-go v0.0.0-20240502122727-a4cb23ac736d h1:9bX/NUIgbQN2wDDTIIt/Gn60D1Ff7QjH3VhDAH5dgv0=
github.com/coder/wireguard-go v0.0.0-20240502122727-a4cb23ac736d/go.mod h1:BOm5fXUBFM+m9woLNBoxI9TaBXXhGNP50LX/TGIvGb4=
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -145,5 +145,5 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gvisor.dev/gvisor v0.0.0-20221203005347-703fd9b7fbc0 h1:Wobr37noukisGxpKo5jAsLREcpj61RxrWYzD8uwveOY=
gvisor.dev/gvisor v0.0.0-20221203005347-703fd9b7fbc0/go.mod h1:Dn5idtptoW1dIos9U6A2rpebLs/MtTwFacjKb8jLdQA=
gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259 h1:TbRPT0HtzFP3Cno1zZo7yPzEEnfu8EjLfl6IU9VfqkQ=
gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259/go.mod h1:AVgIgHMwK63XvmAzWG9vLQ41YnVHN0du0tEC46fI7yY=
2 changes: 1 addition & 1 deletion tunneld/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
"github.com/go-chi/chi/v5"
"github.com/go-chi/hostrouter"
"github.com/riandyrn/otelchi"
"github.com/tailscale/wireguard-go/device"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"golang.org/x/xerrors"
"golang.zx2c4.com/wireguard/device"

"github.com/coder/wgtunnel/tunneld/httpapi"
"github.com/coder/wgtunnel/tunneld/httpmw"
Expand Down
2 changes: 1 addition & 1 deletion tunneld/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"strings"
"time"

"github.com/tailscale/wireguard-go/device"
"golang.org/x/xerrors"
"golang.zx2c4.com/wireguard/device"

"cdr.dev/slog"
"github.com/coder/wgtunnel/tunnelsdk"
Expand Down
2 changes: 1 addition & 1 deletion tunneld/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/stretchr/testify/require"
"golang.zx2c4.com/wireguard/device"
"github.com/tailscale/wireguard-go/device"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"

"github.com/coder/wgtunnel/tunneld"
Expand Down
6 changes: 3 additions & 3 deletions tunneld/tunneld.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"sync"
"time"

"github.com/tailscale/wireguard-go/conn"
"github.com/tailscale/wireguard-go/device"
"github.com/tailscale/wireguard-go/tun/netstack"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"golang.org/x/xerrors"
"golang.zx2c4.com/wireguard/conn"
"golang.zx2c4.com/wireguard/device"
"golang.zx2c4.com/wireguard/tun/netstack"
)

// TODO: add logging to API
Expand Down
2 changes: 1 addition & 1 deletion tunnelsdk/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/netip"
"time"

"golang.zx2c4.com/wireguard/device"
"github.com/tailscale/wireguard-go/device"
)

type Response struct {
Expand Down
6 changes: 3 additions & 3 deletions tunnelsdk/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"net/url"
"time"

"github.com/tailscale/wireguard-go/conn"
"github.com/tailscale/wireguard-go/device"
"github.com/tailscale/wireguard-go/tun/netstack"
"golang.org/x/xerrors"
"golang.zx2c4.com/wireguard/conn"
"golang.zx2c4.com/wireguard/device"
"golang.zx2c4.com/wireguard/tun/netstack"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"

"cdr.dev/slog"
Expand Down

0 comments on commit 28e3f39

Please sign in to comment.