diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 58e924a..cfe426d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,14 +4,10 @@
-
-
-
+
-
-
-
-
+
+
@@ -168,7 +164,8 @@
-
+
+
true
diff --git a/pkg/server/ws.go b/pkg/server/ws.go
index 2800136..ecdf629 100644
--- a/pkg/server/ws.go
+++ b/pkg/server/ws.go
@@ -60,7 +60,7 @@ func listenWebsocket(c *websocket.Conn) {
if len(req.RequestID) <= 0 || len(req.KeypairID) <= 0 {
message = lo.ToPtr(models.UnifiedCommandFromError(fmt.Errorf("invalid request")))
}
- services.KexProvide(user.ID, req.RequestID, req.KeypairID, payload)
+ services.KexProvide(user.ID, req.RequestID, req.KeypairID, packet)
default:
message = lo.ToPtr(models.UnifiedCommandFromError(fmt.Errorf("unknown action")))
}
diff --git a/pkg/services/e2ee.go b/pkg/services/e2ee.go
index 34aaf40..19b4d07 100644
--- a/pkg/services/e2ee.go
+++ b/pkg/services/e2ee.go
@@ -28,8 +28,12 @@ func KexRequest(conn *websocket.Conn, requestId, keypairId string, ownerId uint,
}
flag := false
- for conn := range wsConn[ownerId] {
- if conn.WriteMessage(1, models.UnifiedCommand{
+ for c := range wsConn[ownerId] {
+ if c == conn {
+ continue
+ }
+
+ if c.WriteMessage(1, models.UnifiedCommand{
Action: "kex.request",
Payload: fiber.Map{
"request_id": requestId,