Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TLS 1.2, which fixes WebSockets #16

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading