working on server authenticate users

This commit is contained in:
2026-05-13 23:47:33 -04:00
parent a9d2fd64de
commit 63d3806936
11 changed files with 125 additions and 36 deletions

View File

@@ -19,7 +19,7 @@ public sealed class RelaySocketClient
public event Action<string>? ServerPublicKeyReceived;
public event Action<string>? Log;
public RelaySocketClient(string username, string url = "ws://localhost:1337/")
public RelaySocketClient(string username, string url = "ws://192.168.1.85:5001/")
{
_username = username;
_socket = new WebSocket(url);
@@ -32,6 +32,7 @@ public sealed class RelaySocketClient
var publicKey = KeyStorage.LoadPublicKey(_username);
SendRaw($"AUTHENTICATE_USER|{_username}|{MainPage._userToken}");
SendRaw($"REGISTER_KEY|{_username}|{publicKey}");
SendRaw("GET_SERVER_KEY");
SendRaw("GET_CHANNELS");