Skip to content

Commit

Permalink
Merge pull request #16 from jukfiuune/dev
Browse files Browse the repository at this point in the history
Fix TLS 1.2, which fixes WebSockets
  • Loading branch information
n1d3v authored May 15, 2024
2 parents 413c09c + b64c1e9 commit d04c02c
Show file tree
Hide file tree
Showing 16 changed files with 4,395 additions and 6,853 deletions.
Binary file modified .vs/Naticord/v15/.suo
Binary file not shown.
Binary file modified .vs/Naticord/v15/Server/sqlite3/storage.ide
Binary file not shown.
Binary file modified .vs/Naticord/v15/Server/sqlite3/storage.ide-shm
Binary file not shown.
Binary file modified .vs/Naticord/v15/Server/sqlite3/storage.ide-wal
Binary file not shown.
4 changes: 3 additions & 1 deletion Naticord/Naticord.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Net;
using System.Security.Authentication;
using System.Windows.Forms;
using System.Linq;
using WebSocketSharp;
Expand Down Expand Up @@ -317,6 +318,7 @@ public class WebSocketClient
// this is broken! will be fixed soon
private Naticord parentNaticordForm;
private WebSocket webSocket;
public const SslProtocols Tls12 = (SslProtocols)0x00000C00;

public WebSocketClient(string accessToken, Naticord parentNaticordForm)
{
Expand All @@ -328,7 +330,7 @@ public WebSocketClient(string accessToken, Naticord parentNaticordForm)
private void InitializeWebSocket(string accessToken)
{
webSocket = new WebSocket($"wss://gateway.discord.gg/?v=9&encoding=json");

webSocket.SslConfiguration.EnabledSslProtocols = Tls12;
webSocket.OnMessage += (sender, e) => HandleWebSocketMessage(e.Data);
string AccessToken = accessToken;
webSocket.OnError += (sender, e) => HandleWebSocketError(e.Message);
Expand Down
Binary file modified Naticord/bin/Debug/Naticord.exe
Binary file not shown.
Binary file modified Naticord/bin/Debug/Naticord.pdb
Binary file not shown.
Binary file modified Naticord/bin/Debug/websocket-sharp.dll
Binary file not shown.
11,226 changes: 4,375 additions & 6,851 deletions Naticord/bin/Debug/websocket-sharp.xml

Large diffs are not rendered by default.

Binary file modified Naticord/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
2 changes: 1 addition & 1 deletion Naticord/obj/Debug/Naticord.csproj.CoreCompileInputs.cache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a421d5f984f21292524b55b48bcfdbaee1d3376d
9bf190f85e3ebbd14b952de17514bab428daeb78
16 changes: 16 additions & 0 deletions Naticord/obj/Debug/Naticord.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,19 @@ C:\Users\Patrick\naticord-c#\Naticord\Naticord\obj\Debug\Naticord.csproj.CoreCom
C:\Users\Patrick\naticord-c#\Naticord\Naticord\obj\Debug\Naticord.csproj.CopyComplete
C:\Users\Patrick\naticord-c#\Naticord\Naticord\obj\Debug\Naticord.exe
C:\Users\Patrick\naticord-c#\Naticord\Naticord\obj\Debug\Naticord.pdb
C:\Users\admin\Documents\GitHub\naticord\Naticord\bin\Debug\Naticord.exe
C:\Users\admin\Documents\GitHub\naticord\Naticord\bin\Debug\Naticord.pdb
C:\Users\admin\Documents\GitHub\naticord\Naticord\bin\Debug\Newtonsoft.Json.dll
C:\Users\admin\Documents\GitHub\naticord\Naticord\bin\Debug\websocket-sharp.dll
C:\Users\admin\Documents\GitHub\naticord\Naticord\bin\Debug\Newtonsoft.Json.xml
C:\Users\admin\Documents\GitHub\naticord\Naticord\bin\Debug\websocket-sharp.xml
C:\Users\admin\Documents\GitHub\naticord\Naticord\obj\Debug\Naticord.csprojAssemblyReference.cache
C:\Users\admin\Documents\GitHub\naticord\Naticord\obj\Debug\Naticord.Login.resources
C:\Users\admin\Documents\GitHub\naticord\Naticord\obj\Debug\Naticord.Naticord.resources
C:\Users\admin\Documents\GitHub\naticord\Naticord\obj\Debug\Naticord.Properties.Resources.resources
C:\Users\admin\Documents\GitHub\naticord\Naticord\obj\Debug\Naticord.Settings.resources
C:\Users\admin\Documents\GitHub\naticord\Naticord\obj\Debug\Naticord.csproj.GenerateResource.cache
C:\Users\admin\Documents\GitHub\naticord\Naticord\obj\Debug\Naticord.csproj.CoreCompileInputs.cache
C:\Users\admin\Documents\GitHub\naticord\Naticord\obj\Debug\Naticord.csproj.CopyComplete
C:\Users\admin\Documents\GitHub\naticord\Naticord\obj\Debug\Naticord.exe
C:\Users\admin\Documents\GitHub\naticord\Naticord\obj\Debug\Naticord.pdb
Binary file modified Naticord/obj/Debug/Naticord.csproj.GenerateResource.cache
Binary file not shown.
Binary file not shown.
Binary file modified Naticord/obj/Debug/Naticord.exe
Binary file not shown.
Binary file modified Naticord/obj/Debug/Naticord.pdb
Binary file not shown.

0 comments on commit d04c02c

Please sign in to comment.