Skip to content

Commit 67ae811

Browse files
Merge branch 'release/1.24.1'
2 parents fa481b4 + bd5c577 commit 67ae811

File tree

136 files changed

+1903
-2770
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+1903
-2770
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,15 @@ include:
167167
file: '/jobs/sync-crowdin.gitlab-ci.yml'
168168

169169
i18n-sync-crowdin:
170+
when: manual
170171
variables:
171172
I18N_SYNC_CROWDIN_PROJECT: 'windows-vpn'
172-
extends: .i18n-sync-crowdin-shared-windows
173+
extends: .i18n-sync-crowdin-common
173174

174175
i18n-manual-sync-crowdin:
175176
when: manual
176177
only:
177178
- branches
178179
variables:
179180
I18N_SYNC_CROWDIN_PROJECT: 'windows-vpn'
180-
extends: .i18n-sync-crowdin-shared-windows
181+
extends: .i18n-sync-crowdin-common

ProtonVPN.RestoreInternet/ProtonVPN.RestoreInternet.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<DefineConstants>DEBUG;TRACE</DefineConstants>
2323
<ErrorReport>prompt</ErrorReport>
2424
<WarningLevel>4</WarningLevel>
25+
<LangVersion>latest</LangVersion>
2526
</PropertyGroup>
2627
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2728
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -31,6 +32,7 @@
3132
<DefineConstants>TRACE</DefineConstants>
3233
<ErrorReport>prompt</ErrorReport>
3334
<WarningLevel>4</WarningLevel>
35+
<LangVersion>latest</LangVersion>
3436
</PropertyGroup>
3537
<PropertyGroup>
3638
<ApplicationManifest>app.manifest</ApplicationManifest>

Setup/ProtonVPN.aip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
<ROW Property="Manufacturer" Value="Proton Technologies AG"/>
2828
<ROW Property="MsiLogging" MultiBuildValue="DefaultBuild:vp"/>
2929
<ROW Property="PENDING_REBOOT" Value="0"/>
30-
<ROW Property="ProductCode" Value="1031:{F3E73A9C-83B2-41B3-92CA-F116607FE318} 1033:{F3E73A9C-83B2-41B3-92CA-F116607FE318} 1036:{F3E73A9C-83B2-41B3-92CA-F116607FE318} 1040:{F3E73A9C-83B2-41B3-92CA-F116607FE318} 1043:{F3E73A9C-83B2-41B3-92CA-F116607FE318} 1045:{F3E73A9C-83B2-41B3-92CA-F116607FE318} 1046:{F3E73A9C-83B2-41B3-92CA-F116607FE318} 1049:{F3E73A9C-83B2-41B3-92CA-F116607FE318} 1065:{F3E73A9C-83B2-41B3-92CA-F116607FE318} 2070:{F3E73A9C-83B2-41B3-92CA-F116607FE318} 3082:{F3E73A9C-83B2-41B3-92CA-F116607FE318} " Type="16"/>
30+
<ROW Property="ProductCode" Value="1031:{57C4E518-CE13-4F6B-BA1C-647667ECACFE} 1033:{57C4E518-CE13-4F6B-BA1C-647667ECACFE} 1036:{57C4E518-CE13-4F6B-BA1C-647667ECACFE} 1040:{57C4E518-CE13-4F6B-BA1C-647667ECACFE} 1043:{57C4E518-CE13-4F6B-BA1C-647667ECACFE} 1045:{57C4E518-CE13-4F6B-BA1C-647667ECACFE} 1046:{57C4E518-CE13-4F6B-BA1C-647667ECACFE} 1049:{57C4E518-CE13-4F6B-BA1C-647667ECACFE} 1065:{57C4E518-CE13-4F6B-BA1C-647667ECACFE} 2070:{57C4E518-CE13-4F6B-BA1C-647667ECACFE} 3082:{57C4E518-CE13-4F6B-BA1C-647667ECACFE} " Type="16"/>
3131
<ROW Property="ProductLanguage" Value="1033"/>
3232
<ROW Property="ProductName" Value="ProtonVPN"/>
33-
<ROW Property="ProductVersion" Value="1.24.0" Type="32"/>
33+
<ROW Property="ProductVersion" Value="1.24.1" Type="32"/>
3434
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
3535
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
3636
<ROW Property="SelectedLanguage" Value="This will be set by custom action"/>
@@ -82,7 +82,7 @@
8282
</COMPONENT>
8383
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
8484
<ROW Component="A7C0318B44EF690B391D753065B05" ComponentId="{8DFC0212-F989-444F-81FB-9D221A745FE8}" Directory_="APPDIR" Attributes="0" Options="2"/>
85-
<ROW Component="AI_CustomARPName" ComponentId="{6BDED770-B13D-4888-BE7B-AF2D94F84CA4}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
85+
<ROW Component="AI_CustomARPName" ComponentId="{7AAF5EB8-E529-4356-B1B3-46F0ACFABF83}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
8686
<ROW Component="AI_ExePath" ComponentId="{47427A21-60A2-43B4-A150-6CBA74CF4A07}" Directory_="APPDIR" Attributes="4" KeyPath="AI_ExePath"/>
8787
<ROW Component="APPDIR" ComponentId="{75DDD993-CDFE-4D39-8C1A-07484ADD1A4E}" Directory_="APPDIR" Attributes="0"/>
8888
<ROW Component="ARSoft.Tools.Net.dll" ComponentId="{05CE9A73-14A8-494D-B2D3-8438A2A16DDB}" Directory_="APPDIR" Attributes="0" KeyPath="ARSoft.Tools.Net.dll"/>
436 KB
Binary file not shown.
55.5 KB
Binary file not shown.

src/GlobalAssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[assembly: AssemblyTrademark("")]
1414
[assembly: AssemblyCulture("")]
1515

16-
[assembly: AssemblyVersion("1.24.0.0")]
17-
[assembly: AssemblyFileVersion("1.24.0.0")]
16+
[assembly: AssemblyVersion("1.24.1.0")]
17+
[assembly: AssemblyFileVersion("1.24.1.0")]
1818
[assembly: ComVisible(false)]
1919
[assembly: AssemblyInformationalVersion("$AssemblyVersion")]

src/ProtonVPN.App/Account/VpnPlanHelper.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public static string GetPlanName(string vpnPlan)
3232
case "vpnbasic":
3333
case "vpnplus":
3434
case "visionary":
35-
case "trial":
3635
return Translation.Get($"VpnPlan_val_{vpnPlan.FirstCharToUpper()}");
3736
default:
3837
return "Unknown plan";
@@ -48,7 +47,6 @@ public static string GetPlanColor(string vpnPlan)
4847
case "vpnbasic":
4948
return "#fb7454";
5049
case "vpnplus":
51-
case "trial":
5250
return "#8ec122";
5351
case "visionary":
5452
return "#54d8fd";

src/ProtonVPN.App/App.config

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,6 @@
126126
<setting name="WelcomeModalShown" serializeAs="String">
127127
<value>False</value>
128128
</setting>
129-
<setting name="TrialExpirationTime" serializeAs="String">
130-
<value>0</value>
131-
</setting>
132-
<setting name="AboutToExpireModalShown" serializeAs="String">
133-
<value>False</value>
134-
</setting>
135-
<setting name="ExpiredModalShown" serializeAs="String">
136-
<value>False</value>
137-
</setting>
138129
<setting name="OnboardingStep" serializeAs="String">
139130
<value>0</value>
140131
</setting>
@@ -195,9 +186,6 @@
195186
<setting name="UserDelinquent" serializeAs="String">
196187
<value />
197188
</setting>
198-
<setting name="UserExpirationTime" serializeAs="String">
199-
<value />
200-
</setting>
201189
<setting name="UserMaxConnect" serializeAs="String">
202190
<value />
203191
</setting>
@@ -213,15 +201,6 @@
213201
<setting name="UserWelcomeModalShown" serializeAs="String">
214202
<value />
215203
</setting>
216-
<setting name="UserTrialExpirationTime" serializeAs="String">
217-
<value />
218-
</setting>
219-
<setting name="UserAboutToExpireModalShown" serializeAs="String">
220-
<value />
221-
</setting>
222-
<setting name="UserExpiredModalShown" serializeAs="String">
223-
<value />
224-
</setting>
225204
<setting name="UserOnboardingStep" serializeAs="String">
226205
<value />
227206
</setting>

src/ProtonVPN.App/Core/AppSettings.cs

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ public CachedProfileDataContract Profiles
6262
set => SetPerUser(value);
6363
}
6464

65-
public IReadOnlyList<AnnouncementItem> Announcements
65+
public IReadOnlyList<Announcement> Announcements
6666
{
67-
get => GetPerUser<IReadOnlyList<AnnouncementItem>>() ?? new List<AnnouncementItem>();
67+
get => GetPerUser<IReadOnlyList<Announcement>>() ?? new List<Announcement>();
6868
set => SetPerUser(value);
6969
}
7070

@@ -212,30 +212,12 @@ public bool WelcomeModalShown
212212
set => SetPerUser(value);
213213
}
214214

215-
public long TrialExpirationTime
216-
{
217-
get => GetPerUser<long>();
218-
set => SetPerUser(value);
219-
}
220-
221-
public bool AboutToExpireModalShown
222-
{
223-
get => GetPerUser<bool>();
224-
set => SetPerUser(value);
225-
}
226-
227215
public bool NetShieldModalShown
228216
{
229217
get => GetPerUser<bool>();
230218
set => SetPerUser(value);
231219
}
232220

233-
public bool ExpiredModalShown
234-
{
235-
get => GetPerUser<bool>();
236-
set => SetPerUser(value);
237-
}
238-
239221
public int OnboardingStep
240222
{
241223
get => GetPerUser<int>();

src/ProtonVPN.App/Core/Bootstraper.cs

Lines changed: 18 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
using System;
2121
using System.Collections.Generic;
2222
using System.Globalization;
23-
using System.IO;
2423
using System.Linq;
2524
using System.Net.Http;
2625
using System.ServiceModel;
@@ -33,7 +32,6 @@
3332
using ProtonVPN.Common.Abstract;
3433
using ProtonVPN.Common.Extensions;
3534
using ProtonVPN.Common.Logging;
36-
using ProtonVPN.Common.OS.Processes;
3735
using ProtonVPN.Common.OS.Services;
3836
using ProtonVPN.Common.Storage;
3937
using ProtonVPN.Common.Vpn;
@@ -66,6 +64,7 @@
6664
using ProtonVPN.Map;
6765
using ProtonVPN.Map.ViewModels;
6866
using ProtonVPN.Modals.ApiActions;
67+
using ProtonVPN.Modals.Welcome;
6968
using ProtonVPN.Notifications;
7069
using ProtonVPN.Onboarding;
7170
using ProtonVPN.P2PDetection;
@@ -77,7 +76,6 @@
7776
using ProtonVPN.Sidebar.Announcements;
7877
using ProtonVPN.Streaming;
7978
using ProtonVPN.Translations;
80-
using ProtonVPN.Trial;
8179
using ProtonVPN.ViewModels;
8280
using ProtonVPN.Vpn.Connectors;
8381
using ProtonVPN.Windows;
@@ -111,8 +109,7 @@ protected override void Configure()
111109
.RegisterModule<BugReportingModule>()
112110
.RegisterModule<LoginModule>()
113111
.RegisterModule<P2PDetectionModule>()
114-
.RegisterModule<ProfilesModule>()
115-
.RegisterModule<TrialModule>();
112+
.RegisterModule<ProfilesModule>();
116113

117114
_container = builder.Build();
118115
}
@@ -142,7 +139,13 @@ protected override async void OnStartup(object sender, StartupEventArgs e)
142139
SetHardwareAcceleration();
143140
RegisterEvents();
144141
Resolve<Language>().Initialize(_args);
145-
await ShowInitialWindow();
142+
143+
if (Resolve<IAppSettings>().StartMinimized == StartMinimizedMode.Disabled)
144+
{
145+
ShowInitialWindow();
146+
}
147+
148+
await StartAllServices();
146149

147150
if (Resolve<IUserStorage>().User().Empty() || !await IsUserValid() || await SessionExpired())
148151
{
@@ -156,26 +159,10 @@ protected override async void OnStartup(object sender, StartupEventArgs e)
156159
public void OnExit()
157160
{
158161
Resolve<TrayIcon>().Hide();
159-
Resolve<VpnSystemService>().StopAsync();
162+
Resolve<MonitoredVpnService>().StopAsync();
160163
Resolve<AppUpdateSystemService>().StopAsync();
161164
}
162165

163-
private async Task StartVpnService()
164-
{
165-
if (!Resolve<BaseFilteringEngineService>().Running())
166-
{
167-
return;
168-
}
169-
170-
MonitoredVpnService service = Resolve<MonitoredVpnService>();
171-
if (!service.Enabled())
172-
{
173-
return;
174-
}
175-
176-
await StartService(service);
177-
}
178-
179166
private async Task<bool> SessionExpired()
180167
{
181168
if (string.IsNullOrEmpty(Resolve<ITokenStorage>().AccessToken))
@@ -235,26 +222,19 @@ private async Task<bool> IsUserValid()
235222

236223
private async Task StartAllServices()
237224
{
238-
await StartVpnService();
225+
await StartService(Resolve<VpnSystemService>());
239226
await StartService(Resolve<AppUpdateSystemService>());
240227
await InitializeStateFromService();
241228
}
242229

243-
private async Task ShowInitialWindow()
230+
private void ShowInitialWindow()
244231
{
245-
if (Resolve<IAppSettings>().StartMinimized != StartMinimizedMode.Disabled)
246-
{
247-
return;
248-
}
249-
250232
LoginWindow loginWindow = Resolve<LoginWindow>();
251233
LoginWindowViewModel loginWindowViewModel = Resolve<LoginWindowViewModel>();
252234
Application.Current.MainWindow = loginWindow;
253235
loginWindowViewModel.CurrentPageViewModel = Resolve<LoadingViewModel>();
254236
loginWindow.DataContext = loginWindowViewModel;
255237
loginWindow.Show();
256-
257-
await StartAllServices();
258238
}
259239

260240
private void RegisterEvents()
@@ -284,7 +264,7 @@ private void RegisterEvents()
284264
}
285265
};
286266

287-
Resolve<IAnnouncements>().AnnouncementsChanged += (sender, e) =>
267+
Resolve<IAnnouncementService>().AnnouncementsChanged += (sender, e) =>
288268
{
289269
IEnumerable<IAnnouncementsAware> instances = Resolve<IEnumerable<IAnnouncementsAware>>();
290270
foreach (IAnnouncementsAware instance in instances)
@@ -436,24 +416,6 @@ private void RegisterEvents()
436416
}
437417
};
438418

439-
Resolve<TrialTimer>().TrialTimerTicked += (sender, e) =>
440-
{
441-
IEnumerable<ITrialDurationAware> instances = Resolve<IEnumerable<ITrialDurationAware>>();
442-
foreach (ITrialDurationAware instance in instances)
443-
{
444-
instance.OnTrialSecondElapsed(e);
445-
}
446-
};
447-
448-
Resolve<Trial.Trial>().StateChanged += async (sender, e) =>
449-
{
450-
IEnumerable<ITrialStateAware> instances = Resolve<IEnumerable<ITrialStateAware>>();
451-
foreach (ITrialStateAware instance in instances)
452-
{
453-
await instance.OnTrialStateChangedAsync(e);
454-
}
455-
};
456-
457419
Resolve<GuestHoleState>().GuestHoleStateChanged += (sender, active) =>
458420
{
459421
IEnumerable<IGuestHoleStateAware> instances = Resolve<IEnumerable<IGuestHoleStateAware>>();
@@ -547,9 +509,9 @@ private async Task SwitchToAppWindow(bool autoLogin)
547509
Resolve<LoginWindow>().Hide();
548510

549511
Resolve<PlanDowngradeHandler>();
550-
await Resolve<Trial.Trial>().Load();
512+
Resolve<WelcomeModalManager>().Load();
551513
await Resolve<IUserLocationService>().Update();
552-
await Resolve<IAnnouncements>().Update();
514+
await Resolve<IAnnouncementService>().Update();
553515
await Resolve<SystemTimeValidator>().Validate();
554516
await Resolve<AutoConnect>().Load(autoLogin);
555517
Resolve<SyncProfiles>().Sync();
@@ -583,24 +545,10 @@ private async Task InitializeStateFromService()
583545
private async Task StartService(IConcurrentService service)
584546
{
585547
Result result = await service.StartAsync();
586-
587-
if (result.Failure)
548+
if (result.Failure && result.Exception != null)
588549
{
589550
ReportException(result.Exception);
590-
591-
AppConfig config = Resolve<AppConfig>();
592-
string filename = config.ErrorMessageExePath;
593-
string error = GetServiceErrorMessage(service.Name, result.Exception);
594-
try
595-
{
596-
Resolve<IOsProcesses>().Process(filename, error).Start();
597-
}
598-
catch (Exception e)
599-
{
600-
string serviceName = Path.GetFileNameWithoutExtension(filename);
601-
Resolve<ILogger>().Error($"Failed to start {serviceName} process: {e.CombinedMessage()}");
602-
ReportException(e);
603-
}
551+
Resolve<ILogger>().Error($"[Bootstrapper] Failed to start {service.Name} service.", result.Exception);
604552
}
605553
}
606554

@@ -614,14 +562,6 @@ private void ReportException(Exception e)
614562
});
615563
}
616564

617-
private string GetServiceErrorMessage(string serviceName, Exception e)
618-
{
619-
string error = e.InnerException?.Message ?? e.Message;
620-
string failedToStart = string.Format(Translation.Get("Dialogs_ServiceStart_msg_FailedToStart"), serviceName);
621-
622-
return $"\"{failedToStart}\" \"{error}\"";
623-
}
624-
625565
private void RegisterMigrations(ISupportsMigration subject, IEnumerable<IMigration> migrations)
626566
{
627567
foreach (IMigration migration in migrations)
@@ -635,4 +575,4 @@ public void OnToastNotificationUserAction(NotificationUserAction data)
635575
_notificationUserActionHandler?.Handle(data);
636576
}
637577
}
638-
}
578+
}

0 commit comments

Comments
 (0)