mirror of
https://github.com/quasar/Quasar.git
synced 2026-04-25 15:25:59 +03:00
[GH-ISSUE #1172] [SOLVED] Windows 7 client/server SSL handshake not working #867
Labels
No labels
bug
bug
cant-reproduce
discussion
duplicate
easy
enhancement
help wanted
improvement
invalid
need more info
pull-request
question
wont-add
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Quasar#867
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dedosmedia on GitHub (Jun 9, 2023).
Original GitHub issue: https://github.com/quasar/Quasar/issues/1172
Quasar version
1.4.1
Server installed .NET version
.NET 4.8.4034
Server operating system
Windows 10/Server 2019/2016
Client installed .NET version
.NET 4.0.30319
Client operating system
Windows 7/Server 2008 R2
Build configuration
Release
Describe the bug
I am using the latest release v1.4.1 (I am not compiling by myself).
I have created a quasar.p12 certificate. Then I proceed to create a client "office.exe", with those settings:
dns: someserver.ddns.net
port: 4799
The server will be running on a PC (LAN IP: 192.168.1.8), so I forwarded the port on my router.

Anything incoming from 0.0.0.0:4799 will be redirected to 192.168.1.8:4799
I am pretty sure port redirection is working because I have checked it with https://canyouseeme.org/
I have double checked the port forwarding simulating a server with netcat and running it on 192.168.1.8:4799.
I was able to interact with it from another external PC connecting to someserver.ddns.net:4799, so portforwarding is working.
When I run the previously created quasar client on an external PC. I receive the handshake encrypted connection on my server (remember I am simulating it with netcat and I can see "garbage" in the terminal), so I am pretty sure the client is succesfully reaching my server and it's trying to make a connection.
However when I run my real quasar server instead of netcat server... The connection is never stablished, the client never appears into quasar server client's list.
But, if I run the same client "office.exe" in the same machine as my quasar server (remember it tryes to connect to someserver.ddns.net:4799), it works... it appears in the client's list.
So, I know the client is reaching my server, I know it sends the handshake data, but it seems that quasar server is not accepting its request
How to reproduce
already described
Expected behavior
Quasar shows a new conenction when client is runing outside LAN.
Actual behavior
Client never appears into quasar server client's list.
Additional context
No response
@BurntDog commented on GitHub (Jun 9, 2023):
Just to eliminate any possible issue with the Firewall, did you test with Firewall temporarily disabled?
@dedosmedia commented on GitHub (Jun 9, 2023):
The connection is not an issue... I have been debugging quasar server and the client's connection is going into, but it always dispatch an exception at this line
github.com/quasar/Quasar@bcca6010de/Quasar.Server/Networking/Server.cs (L331)and It happens after this line:
github.com/quasar/Quasar@bcca6010de/Quasar.Server/Networking/Server.cs (L282)It seems an issue with with SSL authentication. The weird thing it's that the client running on the same machine as the quasar server is able to authenticate, but that same client running in another PC is not able to authenticate.
@dedosmedia commented on GitHub (Jun 9, 2023):
I took some screenshots.
First I am running my client from the same machine as my quasar server.
It's trying to connect to somedomain.ddns.net:4799
Once the connection is established, a breakpoint on line
github.com/quasar/Quasar@bcca6010de/Quasar.Server/Networking/Server.cs (L323)Shows this:

And the same client but running from another machine, shows this:

You can appreciate when the client is run on another PC, it's not able to authenticate. isEncrypted and isAuthenticate property is false, but it does not happen when the client is run on the same machine as the server...
What is going on? Any help aprreciated
@dedosmedia commented on GitHub (Jun 9, 2023):
My server machine is Windows 10
The client PC is a Windows 7 machine... I don't know if this could lead to the issue, I will try to make tests with another W10 Machine as a Client.
@dedosmedia commented on GitHub (Jun 10, 2023):
Windows 7 SP1:
Quasar v1.3.0
Quasar v1.4.0
Quasar v1.4.1
Windows 10:
Quasar v1.3.0
Quasar v1.4.0
Quasar v1.4.1
To summarize:
So I think the issues are with SSL certificate and Windows 7. SSL was added as of v1.4.0.
I hope anyone has an idea how to solve it and make it possible to use the clients ( v1.4.0+) under Windows 7 machines.
@MaxXor commented on GitHub (Jun 10, 2023):
Hmm, interesting. I thought I tested it correctly. I'll check it this afternoon. Thanks for the report @dedosmedia.
In the worst case scenario I'll have to drop Windows 7 support and you have to keep using Quasar v1.3.0 for it... however Windows 7 support ended a few years ago so it's not thaaaat bad.
@MaxXor commented on GitHub (Jun 10, 2023):
v1.4.1 Windows 7 client connected to Windows 10 server:

v1.4.1 Windows 10 client connected to Windows 7 server:

Also checked Release configuration, besides Debug. Worked as well... unfortunately i'm not sure what's wrong on your side, but the exceptions you've shown looks like something is intercepting with your TLS connections, or an outdated(?) installation of .NET Framework? I'm really not sure...
edit1: The properties you showed
IsAuthenticatedandIsEncryptedare bothfalsebefore the TLS handshake completes, that is correct behavior. It changes totrueonce the handshake is completed. According to your summary of findings it looks like something is preventing your Windows 7 machine from completing the TLS handshake while Windows 10 has no problems.edit2: Can you check if maybe TLS 1.2 is disabled on your Windows 7 machine somehow? That's definitely not the default option, but could still be possible.
Execute these Powershell lines, reboot and try to connect again:
@dedosmedia commented on GitHub (Jun 10, 2023):
Thanks for looking into this so quickly!!
I will try to do it.
Thanks
@dedosmedia commented on GitHub (Jun 10, 2023):
I have made some mores tests.
The DEBUG version works without issues on Windows 7 SP1 x64, it's a fresh windows install with just .NET Framework 4.5.2.
So it seems the issue is just with Windows 7 SP1 x86. I will try to find a workaround ( The registry changes you suggested did not work).
@BurntDog commented on GitHub (Jun 11, 2023):
The one you're having issues with is changed from Debug to Release, yes?
@dedosmedia commented on GitHub (Jun 11, 2023):
Either DEBUG or RELEASE was having the issues on my Windows 7 Ultimate x86 machine...
Anyway I think it's something particular to the Windows build I had.
I downloaded a Windows 7 Professional x86 (6.1, Build 7600) with .NET framework 4.5.2, and it works perfect either DEBUG or RELEASE.
I will post any further find just to document it.
Thans for your help.
@BurntDog commented on GitHub (Jun 11, 2023):
The reason I asked is it must be compiled as RELEASE for it to work correctly for normal use in or out of network.
@dedosmedia commented on GitHub (Jun 11, 2023):
I was able to get it working properly with any Windows version.
I just changed two lines:
github.com/quasar/Quasar@bcca6010de/Quasar.Client/Networking/Client.cs (L277)and
github.com/quasar/Quasar@bcca6010de/Quasar.Server/Networking/Server.cs (L282)Changing SslProtocols.Tls12 to SslProtocols.Default made it possible to my old OS (without TLS1.2 support) to communicate with my quasar server. This way I did not have to make changes to registry nor other settings.
On my tests I was running DEBUG and RELEASE versions and it always connected it does not matter who is the server (W7 or W10), so at least for me this workaround works!. I don't know what implications the change have to other cases.
Thanks for your help!!