File yggdrasil-old-websocket-dep.patch of Package yggdrasil-go

From 4d09ad54d9712c562141f0e9127c2e4fe424842f Mon Sep 17 00:00:00 2001
From: Oleg Girko <ol@infoserver.lv>
Date: Sun, 3 Nov 2024 02:22:22 +0000
Subject: [PATCH] Revert "Update WebSocket dependency to new import path"

This introduces multiple extra dependencies that need packaging.
Hence, it's easier to add a patch reverting this commit than to package
all those dependencies.

This reverts commit 361b9fd6fc7ef792880728a9fe34a0620cff7143.
---
 go.mod               | 2 +-
 go.sum               | 4 ++--
 src/core/link_ws.go  | 2 +-
 src/core/link_wss.go | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/go.mod b/go.mod
index dccb46c..3ab1c2c 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,6 @@ require (
 	github.com/Arceliar/ironwood v0.0.0-20241122002527-75a6e82fa380
 	github.com/Arceliar/phony v0.0.0-20220903101357-530938a4b13d
 	github.com/cheggaaa/pb/v3 v3.1.5
-	github.com/coder/websocket v1.8.12
 	github.com/gologme/log v1.3.0
 	github.com/hashicorp/go-syslog v1.0.0
 	github.com/hjson/hjson-go/v4 v4.4.0
@@ -20,6 +19,7 @@ require (
 	golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2
 	golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
 	golang.zx2c4.com/wireguard/windows v0.5.3
+	nhooyr.io/websocket v1.8.17
 )
 
 require (
diff --git a/go.sum b/go.sum
index f88998a..fafe83f 100644
--- a/go.sum
+++ b/go.sum
@@ -14,8 +14,6 @@ github.com/cheggaaa/pb/v3 v3.1.5/go.mod h1:CrxkeghYTXi1lQBEI7jSn+3svI3cuc19haAj6
 github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
 github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
 github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
-github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo=
-github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -110,3 +108,5 @@ 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-20230927004350-cbd86285d259 h1:TbRPT0HtzFP3Cno1zZo7yPzEEnfu8EjLfl6IU9VfqkQ=
 gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259/go.mod h1:AVgIgHMwK63XvmAzWG9vLQ41YnVHN0du0tEC46fI7yY=
+nhooyr.io/websocket v1.8.17 h1:KEVeLJkUywCKVsnLIDlD/5gtayKp8VoCkksHCGGfT9Y=
+nhooyr.io/websocket v1.8.17/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c=
diff --git a/src/core/link_ws.go b/src/core/link_ws.go
index 86f065a..02c6d7d 100644
--- a/src/core/link_ws.go
+++ b/src/core/link_ws.go
@@ -9,7 +9,7 @@ import (
 	"time"
 
 	"github.com/Arceliar/phony"
-	"github.com/coder/websocket"
+	"nhooyr.io/websocket"
 )
 
 type linkWS struct {
diff --git a/src/core/link_wss.go b/src/core/link_wss.go
index 1a8d571..6b19257 100644
--- a/src/core/link_wss.go
+++ b/src/core/link_wss.go
@@ -9,7 +9,7 @@ import (
 	"net/url"
 
 	"github.com/Arceliar/phony"
-	"github.com/coder/websocket"
+	"nhooyr.io/websocket"
 )
 
 type linkWSS struct {
-- 
2.47.0