Skip to content

Commit

Permalink
Merge branch 'release/2.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindaugas Veblauskas committed Oct 7, 2022
2 parents 4e4b0ea + 4e7f97c commit f360f74
Show file tree
Hide file tree
Showing 619 changed files with 17,688 additions and 9,710 deletions.
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ csharp_new_line_before_open_brace=all
csharp_new_line_between_query_expression_clauses=true

# http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers#csharp_prefer_braces
csharp_prefer_braces = true:error
csharp_prefer_braces=true:error

# http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers#csharp_prefer_simple_default_expression
csharp_prefer_simple_default_expression=false:error

# IDE0063: Use simple 'using' statement
csharp_prefer_simple_using_statement = false
csharp_prefer_simple_using_statement=false

# http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers#csharp_preserve_single_line_blocks
csharp_preserve_single_line_blocks=true
Expand Down Expand Up @@ -131,7 +131,7 @@ csharp_style_expression_bodied_constructors=false:warning
csharp_style_expression_bodied_indexers=true:error

# http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers#csharp_style_expression_bodied_methods
csharp_style_expression_bodied_methods=true
csharp_style_expression_bodied_methods=false:warning

# http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers#csharp_style_expression_bodied_operators
csharp_style_expression_bodied_operators=false:suggestion
Expand Down Expand Up @@ -263,4 +263,4 @@ dotnet_naming_style.pascal_case_style.capitalization=pascal_case
resharper_arrange_this_qualifier_highlighting=hint

# IDE1006: Naming Styles
dotnet_diagnostic.IDE1006.severity = warning
dotnet_diagnostic.ide1006.severity=warning
32 changes: 29 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ build-release:
- echo "Restoring NuGet Packages..."
- 'c:\nuget\nuget.exe restore ProtonVpn.sln'
- MSBuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo /property:Configuration=Release /verbosity:quiet "src\\ProtonVPN.MarkupValidator\\ProtonVPN.MarkupValidator.csproj"
- echo "Building native dependencies..."
- 'c:\nuget\nuget.exe restore ProtonVPN.InstallActions.sln'
- cmd.exe /c BuildDependencies.bat
- python ci\main.py lint-languages
- python ci\main.py add-commit-hash $env:CI_COMMIT_SHORT_SHA
- python ci\main.py defaultConfig
Expand All @@ -62,6 +65,9 @@ build-debug:
- echo "Restoring NuGet Packages..."
- 'c:\nuget\nuget.exe restore ProtonVpn.sln'
- MSBuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo /property:Configuration=Release /verbosity:quiet "src\\ProtonVPN.MarkupValidator\\ProtonVPN.MarkupValidator.csproj"
- echo "Building native dependencies..."
- 'c:\nuget\nuget.exe restore ProtonVPN.InstallActions.sln'
- cmd.exe /c BuildDependencies.bat
- echo "Downloading translations from crowdin..."
- python ci\main.py lint-languages
- python ci\main.py add-commit-hash $env:CI_COMMIT_SHORT_SHA
Expand All @@ -86,7 +92,7 @@ tests:
- echo "Running tests..."
- 'c:\nuget\nuget.exe restore ProtonVpn.sln'
- MSBuild.exe /consoleloggerparameters:ErrorsOnly /maxcpucount /nologo /property:Configuration=Debug /verbosity:quiet "ProtonVpn.sln"
- coverlet src\bin --target "vstest.console.exe" --targetargs "src/bin/ProtonVPN*Test*.dll /TestCaseFilter:TestCategory!=UI&TestCategory!=Connection /Platform:x64" --format cobertura --output .\coverage-reports --exclude "[*.Test*]*" --exclude "[ProtonVPN.MarkupValidator]*" --exclude "[TestTools*]*" --exclude "[TapInstaller]*" --exclude "[*.Installers]*"
- coverlet src\bin --target "vstest.console.exe" --targetargs "src/bin/ProtonVPN*Tests*.dll /TestCaseFilter:TestCategory!=UI&TestCategory!=Connection /Platform:x64" --format cobertura --output .\coverage-reports --exclude "[*.Tests*]*" --exclude "[ProtonVPN.MarkupValidator]*" --exclude "[TestTools*]*" --exclude "[TapInstaller]*" --exclude "[*.Installers]*"
- powershell -Command "(gc coverage-reports.cobertura.xml) -replace '\\', '/' | Out-File -encoding UTF8 cobertura.xml"
- ReportGenerator.exe "-reports:cobertura.xml" "-targetdir:.\code-coverage-report-html"
artifacts:
Expand Down Expand Up @@ -150,7 +156,7 @@ ui-test:
script:
- powershell -File ci\uninstall-app.ps1
- powershell -File ci\install-the-app.ps1
- VSTest.Console.exe src\bin\ProtonVPN.UI.Test.dll /TestCaseFilter:"Category=UI"
- VSTest.Console.exe src\bin\ProtonVPN.UI.Tests.dll /TestCaseFilter:"Category=UI"
- powershell -File ci\uninstall-app.ps1
except:
- /^debug.*$/
Expand All @@ -169,7 +175,27 @@ connection-tests:
script:
- powershell -File ci\uninstall-app.ps1
- powershell -File ci\install-the-app.ps1
- VSTest.Console.exe src\bin\ProtonVPN.UI.Test.dll /TestCaseFilter:"Category=Connection"
- VSTest.Console.exe src\bin\ProtonVPN.UI.Tests.dll /TestCaseFilter:"Category=Connection"
- powershell -File ci\uninstall-app.ps1
except:
- /^debug.*$/
- release/9.9.9
- master
artifacts:
when: on_failure
paths:
- $SCREENSHOT_PATH
expire_in: 2 weeks

win-11-tests:
stage: ui-test
when: manual
tags:
- win11
script:
- powershell -File ci\uninstall-app.ps1
- powershell -File ci\install-the-app.ps1
- VSTest.Console.exe src\bin\ProtonVPN.UI.Tests.dll /TestCaseFilter:"Category=Smoke"
- powershell -File ci\uninstall-app.ps1
except:
- /^debug.*$/
Expand Down
45 changes: 45 additions & 0 deletions BuildDependencies.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
set outputDirX86=..\bin\x86\
set outputDirX64=..\bin\x64\
set platformToolset=v143

::ProtonVPN.IpFilter.dll (x86)
msbuild src\ProtonVPN.IpFilterLib\ProtonVPN.IpFilterLib.vcxproj /p:PlatformToolset=%platformToolset% /p:Platform=Win32 /p:Configuration=Release /p:OutDir=%outputDirX86%
msbuild src\ProtonVPN.IpFilter\ProtonVPN.IpFilter.vcxproj /p:PlatformToolset=%platformToolset% /p:Platform=Win32 /p:Configuration=Release /p:OutDir=%outputDirX86%

::ProtonVPN.IpFilter.dll (x64)
msbuild src\ProtonVPN.IpFilterLib\ProtonVPN.IpFilterLib.vcxproj /p:PlatformToolset=%platformToolset% /p:Platform=x64 /p:Configuration=Release /p:OutDir=%outputDirX64%
msbuild src\ProtonVPN.IpFilter\ProtonVPN.IpFilter.vcxproj /p:PlatformToolset=%platformToolset% /p:Platform=x64 /p:Configuration=Release /p:OutDir=%outputDirX64%

::ProtonVPN.NetworkUtil.dll (x86)
msbuild src\ProtonVPN.NetworkUtil\ProtonVPN.NetworkUtil.vcxproj /p:PlatformToolset=%platformToolset% /p:Platform=Win32 /p:Configuration=Release /p:OutDir=%outputDirX86%

::ProtonVPN.NetworkUtil.dll (x64)
msbuild src\ProtonVPN.NetworkUtil\ProtonVPN.NetworkUtil.vcxproj /p:PlatformToolset=%platformToolset% /p:Platform=x64 /p:Configuration=Release /p:OutDir=%outputDirX64%

::ProtonVPN.InstallActions.dll (x86)
msbuild src\ProtonVPN.InstallActions\ProtonVPN.InstallActions.vcxproj /p:PlatformToolset=%platformToolset% /p:Platform=Win32 /p:Configuration=Release

::GoSrp.dll
pushd %~dp0\src\srp\windows\cshared
set fn=GoSrp
set gn=main.go
set CGO_ENABLED=1

set GOARCH=386
go build -buildmode=c-shared -v -ldflags="-s -w" -o ..\..\..\bin\x86\%fn%.dll %gn%

set GOARCH=amd64
go build -buildmode=c-shared -v -ldflags="-s -w" -o ..\..\..\bin\x64\%fn%.dll %gn%

::LocalAgent.dll
pushd %~dp0\src\ProtonVPN.LocalAgent\localAgentWin
set GOOS=windows
set GO111MODULE=off
set CGO_CFLAGS=-O3 -Wall -Wno-unused-function -Wno-switch -std=gnu11 -DWINVER=0x0601
set CC=x86_64-w64-mingw32-gcc

set GOARCH=386
go build -buildmode c-shared -ldflags="-w -s" -trimpath -v -o "..\..\bin\Resources\32-bit\LocalAgent.dll" || exit /b 1

set GOARCH=amd64
go build -buildmode c-shared -ldflags="-w -s" -trimpath -v -o "..\..\bin\Resources\64-bit\LocalAgent.dll" || exit /b 1
25 changes: 25 additions & 0 deletions ProtonVPN.InstallActions.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31911.196
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProtonVPN.InstallActions", "src\ProtonVPN.InstallActions\ProtonVPN.InstallActions.vcxproj", "{BBCBB464-BDCB-49CD-830F-965D07CE1446}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BBCBB464-BDCB-49CD-830F-965D07CE1446}.Debug|x86.ActiveCfg = Debug|Win32
{BBCBB464-BDCB-49CD-830F-965D07CE1446}.Debug|x86.Build.0 = Debug|Win32
{BBCBB464-BDCB-49CD-830F-965D07CE1446}.Release|x86.ActiveCfg = Release|Win32
{BBCBB464-BDCB-49CD-830F-965D07CE1446}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {41A36481-10DA-4E55-9DD7-15950838C9CD}
EndGlobalSection
EndGlobal
31 changes: 31 additions & 0 deletions ProtonVPN.NetworkDrivers.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31911.196
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProtonVPN.CalloutDriver", "src\ProtonVPN.CalloutDriver\ProtonVPN.CalloutDriver.vcxproj", "{85E3F2D0-84AA-4DD2-B23A-B41D779A5FA9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{85E3F2D0-84AA-4DD2-B23A-B41D779A5FA9}.Debug|x64.ActiveCfg = Debug|x64
{85E3F2D0-84AA-4DD2-B23A-B41D779A5FA9}.Debug|x64.Build.0 = Debug|x64
{85E3F2D0-84AA-4DD2-B23A-B41D779A5FA9}.Debug|x86.ActiveCfg = Debug|Win32
{85E3F2D0-84AA-4DD2-B23A-B41D779A5FA9}.Debug|x86.Build.0 = Debug|Win32
{85E3F2D0-84AA-4DD2-B23A-B41D779A5FA9}.Release|x64.ActiveCfg = Release|x64
{85E3F2D0-84AA-4DD2-B23A-B41D779A5FA9}.Release|x64.Build.0 = Release|x64
{85E3F2D0-84AA-4DD2-B23A-B41D779A5FA9}.Release|x86.ActiveCfg = Release|Win32
{85E3F2D0-84AA-4DD2-B23A-B41D779A5FA9}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D4840175-D6ED-49DB-BD16-67DF919A17B4}
EndGlobalSection
EndGlobal
51 changes: 51 additions & 0 deletions ProtonVPN.Networking.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31911.196
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProtonVPN.IPFilter", "src\ProtonVPN.IPFilter\ProtonVPN.IpFilter.vcxproj", "{75126704-A03B-4AA2-B182-189263397E8F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProtonVPN.IpFilterLib", "src\ProtonVPN.IpFilterLib\ProtonVPN.IpFilterLib.vcxproj", "{22381B63-9BA0-4DF8-BDB1-EC4AE1B7470D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProtonVPN.NetworkUtil", "src\ProtonVPN.NetworkUtil\ProtonVPN.NetworkUtil.vcxproj", "{912374C4-7A74-4313-8956-1B32383918C8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{75126704-A03B-4AA2-B182-189263397E8F}.Debug|x64.ActiveCfg = Debug|x64
{75126704-A03B-4AA2-B182-189263397E8F}.Debug|x64.Build.0 = Debug|x64
{75126704-A03B-4AA2-B182-189263397E8F}.Debug|x86.ActiveCfg = Debug|Win32
{75126704-A03B-4AA2-B182-189263397E8F}.Debug|x86.Build.0 = Debug|Win32
{75126704-A03B-4AA2-B182-189263397E8F}.Release|x64.ActiveCfg = Release|x64
{75126704-A03B-4AA2-B182-189263397E8F}.Release|x64.Build.0 = Release|x64
{75126704-A03B-4AA2-B182-189263397E8F}.Release|x86.ActiveCfg = Release|Win32
{75126704-A03B-4AA2-B182-189263397E8F}.Release|x86.Build.0 = Release|Win32
{22381B63-9BA0-4DF8-BDB1-EC4AE1B7470D}.Debug|x64.ActiveCfg = Debug|x64
{22381B63-9BA0-4DF8-BDB1-EC4AE1B7470D}.Debug|x64.Build.0 = Debug|x64
{22381B63-9BA0-4DF8-BDB1-EC4AE1B7470D}.Debug|x86.ActiveCfg = Debug|Win32
{22381B63-9BA0-4DF8-BDB1-EC4AE1B7470D}.Debug|x86.Build.0 = Debug|Win32
{22381B63-9BA0-4DF8-BDB1-EC4AE1B7470D}.Release|x64.ActiveCfg = Release|x64
{22381B63-9BA0-4DF8-BDB1-EC4AE1B7470D}.Release|x64.Build.0 = Release|x64
{22381B63-9BA0-4DF8-BDB1-EC4AE1B7470D}.Release|x86.ActiveCfg = Release|Win32
{22381B63-9BA0-4DF8-BDB1-EC4AE1B7470D}.Release|x86.Build.0 = Release|Win32
{912374C4-7A74-4313-8956-1B32383918C8}.Debug|x64.ActiveCfg = Debug|x64
{912374C4-7A74-4313-8956-1B32383918C8}.Debug|x64.Build.0 = Debug|x64
{912374C4-7A74-4313-8956-1B32383918C8}.Debug|x86.ActiveCfg = Debug|Win32
{912374C4-7A74-4313-8956-1B32383918C8}.Debug|x86.Build.0 = Debug|Win32
{912374C4-7A74-4313-8956-1B32383918C8}.Release|x64.ActiveCfg = Release|x64
{912374C4-7A74-4313-8956-1B32383918C8}.Release|x64.Build.0 = Release|x64
{912374C4-7A74-4313-8956-1B32383918C8}.Release|x86.ActiveCfg = Release|Win32
{912374C4-7A74-4313-8956-1B32383918C8}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0E2C8B72-A8BC-4E78-95A9-FF72D0A876C3}
EndGlobalSection
EndGlobal
Loading

0 comments on commit f360f74

Please sign in to comment.