Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
trudyhood committed Oct 28, 2023
2 parents 424c2da + 5a0b647 commit d22b451
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Pub/Version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Version": "3.1.433",
"BumpTime": "2023-10-28T09:56:44.1734209Z",
"Version": "3.1.434",
"BumpTime": "2023-10-28T22:39:54.0779711Z",
"Prerelease": false,
"DeprecatedVersion": "3.0.400"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="432" package="com.vpnhood.client.android" android:installLocation="preferExternal" android:versionName="3.1.432">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="434" package="com.vpnhood.client.android" android:installLocation="preferExternal" android:versionName="3.1.434">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="33" />
<application android:label="@string/app_name" android:icon="@mipmap/appicon" android:allowBackup="true" android:usesCleartextTraffic="true" android:supportsRtl="true">
</application>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="432" package="com.vpnhood.client.android.web" android:installLocation="preferExternal" android:versionName="3.1.432">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="434" package="com.vpnhood.client.android.web" android:installLocation="preferExternal" android:versionName="3.1.434">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="33" />
<application android:label="@string/app_name" android:icon="@mipmap/appicon" android:allowBackup="true" android:usesCleartextTraffic="true" android:supportsRtl="true">
</application>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/appicon_background" />
<background android:drawable="@mipmap/appicon_background_dev" />
<foreground android:drawable="@mipmap/appicon_foreground" />
<monochrome android:drawable="@mipmap/appicon_monochrome" />
</adaptive-icon>
6 changes: 6 additions & 0 deletions VpnHood.Client.App.Android.Xamarin/_publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ if (-not $noclean) { & $msbuild $projectFile /p:Configuration=Release /t:Clean
/p:AndroidManifest="Properties\AndroidManifest.aab.xml" /p:DefineConstants=ANDROID_AAB `
/p:AndroidSigningKeyPass=$keystorePass /p:AndroidKeyStore=True;

# set app icon
$appIconXmlDoc = [xml](Get-Content $appIconXml);
$appIconXmlNode = $appIconXmlDoc.selectSingleNode("adaptive-icon/background");
$appIconXmlNode.SetAttribute("android:drawable", "@mipmap/appicon_background_dev");
$appIconXmlDoc.save($appIconXml);

#####
# copy to solution ouput
Copy-Item -path $signedPacakgeFile -Destination "$moduleDir/$module_packageFileName" -Force
Expand Down
Binary file modified VpnHood.Client.App.Resources/Resources/SPA.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion VpnHood.Client.App/ClientProfileItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ public class ClientProfileItem
public Guid ClientProfileId => ClientProfile.ClientProfileId;
public required ClientProfile ClientProfile { get; init; }
public required Token Token { get; init; }
public string? Name => ClientProfile.Name ?? Token.Name;
public string? Name => string.IsNullOrWhiteSpace(ClientProfile.Name) ? Token.Name : ClientProfile.Name;
}
18 changes: 7 additions & 11 deletions VpnHood.Client.Device.Android.Xamarin/AndroidPacketCapture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,10 @@ void IDisposable.Dispose()
public override StartCommandResult OnStartCommand(Intent? intent, [GeneratedEnum] StartCommandFlags flags,
int startId)
{
if (!Started)
{
if (AndroidDevice.Current == null)
throw new Exception($"{nameof(AndroidDevice)} has not been initialized");

AndroidDevice.Current.OnServiceStartCommand(this, intent);
}

if (AndroidDevice.Current == null)
throw new Exception($"{nameof(AndroidDevice)} has not been initialized");

AndroidDevice.Current.OnServiceStartCommand(this, intent);
return StartCommandResult.Sticky;
}

Expand Down Expand Up @@ -261,7 +256,7 @@ protected virtual void ProcessPacket(IPPacket ipPacket)
}
catch (Exception ex)
{
VhLogger.Instance.LogError(ex, "Error in processing packet. Packet: {Packet}",
VhLogger.Instance.LogError(ex, "Error in processing packet. Packet: {Packet}",
VhLogger.FormatIpPacket(ipPacket.ToString()));
}
}
Expand All @@ -277,8 +272,9 @@ public override void OnDestroy()

private void Close()
{
if (!Started)
return;
// Started means is established; so we should not leave the service open
// if (!Started)
// return;

VhLogger.Instance.LogTrace("Closing VpnService...");

Expand Down
4 changes: 2 additions & 2 deletions VpnHood.Client.Device/VpnHood.Client.Device.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<RepositoryType></RepositoryType>
<RootNamespace>VpnHood.Client.Device</RootNamespace>
<Version>3.1.433</Version>
<AssemblyVersion>3.1.433</AssemblyVersion>
<Version>3.1.434</Version>
<AssemblyVersion>3.1.434</AssemblyVersion>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand Down

0 comments on commit d22b451

Please sign in to comment.