Skip to content

Commit

Permalink
Fix: Windows: Display Main window location depending on TaskBar position
Browse files Browse the repository at this point in the history
  • Loading branch information
trudyhood committed Jun 17, 2021
1 parent 07ac810 commit 3b7bdc8
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 13 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# v1.2.247
# Upcoming
### Client
* Feature: Windows 7 Support
* Fix: Windows: Display white screen
* Fix: Windows: Display Main window location depending on TaskBar position

# v1.2.247
* Feature: Add UDP Protocol
* Update: Improve datagram performance
* Update: Improve overall performance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="VpnHood.Client">
<Version>1.1.241</Version>
<Version>1.2.247</Version>
</PackageReference>
<PackageReference Include="VpnHood.Client.Device.Android">
<Version>1.1.241</Version>
<Version>1.2.247</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials" Version="1.6.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="VpnHood.Client" Version="1.1.241" />
<PackageReference Include="VpnHood.Client.Device.WinDivert" Version="1.1.241" />
<PackageReference Include="VpnHood.Client" Version="1.2.247" />
<PackageReference Include="VpnHood.Client.Device.WinDivert" Version="1.2.247" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions VpnHood.Client.App.Win.Setup/VpnHood.Client.App.Win.Setup.aip
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@
<ROW UpgradeCode="[|UpgradeCode]" VersionMin="[|ProductVersion]" Attributes="2" ActionProperty="AI_NEWERPRODUCTFOUND"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.PreReqComponent">
<ROW PrereqKey="A9DBE469DEED46998DA553406739ED74" DisplayName=".NET Desktop Runtime 5.0.4 x64" VersionMin="5.0" SetupFileUrl="https://download.visualstudio.microsoft.com/download/pr/7a5d15ae-0487-428d-8262-2824279ccc00/6a10ce9e632bce818ce6698d9e9faf39/windowsdesktop-runtime-5.0.4-win-x64.exe" Location="1" ExactSize="54790696" WinNTVersions="Windows 9x/ME/NT/2000/XP/Vista/Windows 7/Windows 8 x86/Windows 8.1 x86/Windows 10 x86" WinNT64Versions="Windows Vista x64, Windows Server 2008 x64, Windows 7 RTM x64, Windows Server 2008 R2 x64, Windows 8 x64, Windows Server 2012 x64, Windows 10 version 1507 x64, Windows 10 version 1511 x64" Operator="1" ComLine="/passive" BasicUiComLine="/passive" NoUiComLine="/quiet /norestart" Options="xym" MD5="629d073ea7ad831e00f3481f06014228" TargetName=".NET 5.0"/>
<ROW PrereqKey="AEEB73CE673349D2BADF9D8EB73C7437" DisplayName=".NET Desktop Runtime 5.0.4 x86" VersionMin="5.0" SetupFileUrl="https://download.visualstudio.microsoft.com/download/pr/0c5c56a4-8b34-4361-8af9-482c788b2bcf/d734b200547c8c367eb45ebbd69c4698/windowsdesktop-runtime-5.0.4-win-x86.exe" Location="1" ExactSize="49221608" WinNTVersions="Windows Vista x86, Windows Server 2008 x86, Windows 7 RTM x86, Windows 8 x86, Windows 10 version 1507 x86, Windows 10 version 1511 x86" WinNT64Versions="Windows XP/Vista/Windows 7/Windows 8 x64/Windows 8.1 x64/Windows 10 x64" Operator="1" ComLine="/passive" BasicUiComLine="/passive" NoUiComLine="/quiet /norestart" Options="ym" MD5="8293496f1fb02d7011e443fe7f1adb99" TargetName=".NET 5.0"/>
<ROW PrereqKey="A9DBE469DEED46998DA553406739ED74" DisplayName=".NET Desktop Runtime 5.0.7 x64" VersionMin="5.0" SetupFileUrl="https://download.visualstudio.microsoft.com/download/pr/2b83d30e-5c86-4d37-a1a6-582e22ac07b2/c7b1b7e21761bbfb7b9951f5b258806e/windowsdesktop-runtime-5.0.7-win-x64.exe" Location="1" ExactSize="54931280" WinNTVersions="Windows 9x/ME/NT/2000/XP/Vista/Windows 7/Windows 8 x86/Windows 8.1 x86/Windows 10 x86" WinNT64Versions="Windows Vista x64, Windows Server 2008 x64, Windows 7 RTM x64, Windows Server 2008 R2 x64, Windows 8 x64, Windows Server 2012 x64, Windows 10 version 1507 x64, Windows 10 version 1511 x64" Operator="1" ComLine="/passive" BasicUiComLine="/passive" NoUiComLine="/quiet /norestart" Options="xym" MD5="e6005556f55b97a8ad25199078d782ac" TargetName=".NET 5.0"/>
<ROW PrereqKey="AEEB73CE673349D2BADF9D8EB73C7437" DisplayName=".NET Desktop Runtime 5.0.7 x86" VersionMin="5.0" SetupFileUrl="https://download.visualstudio.microsoft.com/download/pr/c8af603e-ef3d-4bf3-89b9-f11dce1c2fc9/d416996ef55aa134b8aba565685d1ed2/windowsdesktop-runtime-5.0.7-win-x86.exe" Location="1" ExactSize="49206376" WinNTVersions="Windows Vista x86, Windows Server 2008 x86, Windows 7 RTM x86, Windows 8 x86, Windows 10 version 1507 x86, Windows 10 version 1511 x86" WinNT64Versions="Windows XP/Vista/Windows 7/Windows 8 x64/Windows 8.1 x64/Windows 10 x64" Operator="1" ComLine="/passive" BasicUiComLine="/passive" NoUiComLine="/quiet /norestart" Options="ym" MD5="c445d348d18dc1c82efbedc5fcfa554e" TargetName=".NET 5.0"/>
<ROW PrereqKey="MicrosoftEdgeWebVi" DisplayName="Microsoft Edge WebView2 x86" SetupFileUrl="https://go.microsoft.com/fwlink/p/?LinkId=2124703" Location="1" ExactSize="0" WinNT64Versions="Windows XP/Vista/Windows 7/Windows 8 x64/Windows 8.1 x64/Windows 10 x64" Operator="0" Options="ym" TargetName="Microsoft Edge WebView2"/>
<ROW PrereqKey="RequiredApplication" DisplayName="Microsoft Edge WebView2 x64" SetupFileUrl="https://go.microsoft.com/fwlink/p/?LinkId=2124703" Location="1" ExactSize="0" WinNTVersions="Windows 9x/ME/NT/2000/XP/Vista/Windows 7/Windows 8 x86/Windows 8.1 x86/Windows 10 x86" Operator="0" Options="ym" TargetName="Microsoft Edge WebView2"/>
<ATTRIBUTE name="PrereqsOrder" value="A9DBE469DEED46998DA553406739ED74 AEEB73CE673349D2BADF9D8EB73C7437 RequiredApplication MicrosoftEdgeWebVi"/>
Expand Down
2 changes: 1 addition & 1 deletion VpnHood.Client.App.Win/VpnHood.Client.App.Win.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

<ItemGroup>
<PackageReference Include=" " Version="1.0.664.37" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.818.41" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.864.35" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions VpnHood.Client.App.Win/WebViewWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ public void Show()
var rect = Screen.PrimaryScreen.WorkingArea;
var size = DefWindowSize;

Form.Location = new Point(rect.Right - size.Width, rect.Bottom - size.Height);
Form.Size = size;
//if (rect.Left > 0) Form.Location = new Point(rect.Left, rect.Bottom - size.Height);
//if (rect.Top > 0) Form.Location = new Point(rect.Right - size.Width, rect.Top);
Form.Location = new Point(rect.Right - size.Width, rect.Bottom - size.Height);
if (rect.Top> 10 ) Form.Location = new Point(rect.Right - size.Width, rect.Top);
if (rect.Left > 10 ) Form.Location = new Point(rect.Left, rect.Bottom - size.Height);

Form.Show();
Form.BringToFront();
Expand Down
8 changes: 7 additions & 1 deletion VpnHood.Client/VpnHoodClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,13 @@ internal async Task<TcpClientStream> GetSslConnectionToServer(EventId eventId, C

// Establish a TLS connection
_logger.LogTrace(eventId, $"TLS Authenticating. HostName: {VhLogger.FormatDns(Token.DnsName)}...");
await stream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions { TargetHost = Token.DnsName }, cancellationToken);
var sslProtocol = Environment.OSVersion.Platform == PlatformID.Win32NT && Environment.OSVersion.Version.Major < 10
? System.Security.Authentication.SslProtocols.Tls12 // windows 7
: System.Security.Authentication.SslProtocols.None; //auto

await stream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions {
TargetHost = Token.DnsName, EnabledSslProtocols = sslProtocol},
cancellationToken);

_lastConnectionErrorTime = null;
return new TcpClientStream(tcpClient, stream);
Expand Down
2 changes: 1 addition & 1 deletion VpnHood.Server.App.Net/VpnHood.Server.App.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="NLog" Version="4.7.10" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.2" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.3" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 3b7bdc8

Please sign in to comment.