Skip to content

Commit

Permalink
Publish v4.4.506
Browse files Browse the repository at this point in the history
  • Loading branch information
trudyhood committed May 11, 2024
1 parent b9b4011 commit f092037
Show file tree
Hide file tree
Showing 30 changed files with 46 additions and 61 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v4.4.503
# v4.4.506
### Client
* Update: Android: Show Notification & QuickLaunch Request after connect
* Update: Display AD without VPN
Expand All @@ -7,7 +7,10 @@
* Fix: minor issue in disconnect messages
* Deprecate: ServerProtocol Version 2 (451) is deprecated and no longer supported

# v4.4.500
### Server
* Update: Support Flexible Ad

# v4.4.500
### Client
* Update: Retry failed connection if the access token is updated from the server token URL
* Update: Move VpnHood Public Servers to VpnHood Connect App
Expand Down
6 changes: 3 additions & 3 deletions Pub/PubVersion.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Version": "4.4.503",
"BumpTime": "2024-05-11T08:27:59.0241406Z",
"Prerelease": true,
"Version": "4.4.506",
"BumpTime": "2024-05-11T09:07:36.0577031Z",
"Prerelease": false,
"DeprecatedVersion": "4.0.00"
}
10 changes: 5 additions & 5 deletions Tests/VpnHood.Test/Tests/AdTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public async Task flexible_ad_should_not_close_session_if_load_ad_failed()
await using var server = TestHelper.CreateServer(testAccessManager);

// create access item
var accessItem = fileAccessManager.AccessItem_Create(displayAd: DisplayAd.Flexible);
var accessItem = fileAccessManager.AccessItem_Create(adShow: AdShow.Flexible);
accessItem.Token.ToAccessKey();

// create client app
Expand All @@ -89,7 +89,7 @@ public async Task flexible_ad_should_close_session_if_display_ad_failed()
await using var server = TestHelper.CreateServer(testAccessManager);

// create access item
var accessItem = fileAccessManager.AccessItem_Create(displayAd: DisplayAd.Flexible);
var accessItem = fileAccessManager.AccessItem_Create(adShow: AdShow.Flexible);
accessItem.Token.ToAccessKey();

// create client app
Expand All @@ -115,7 +115,7 @@ public async Task Session_must_be_closed_after_few_minutes_if_ad_is_not_accepted
await using var server = TestHelper.CreateServer(testAccessManager);

// create access item
var accessItem = fileAccessManager.AccessItem_Create(displayAd: DisplayAd.Required);
var accessItem = fileAccessManager.AccessItem_Create(adShow: AdShow.Required);
accessItem.Token.ToAccessKey();

// create client app
Expand All @@ -141,7 +141,7 @@ public async Task Session_expiration_must_increase_by_ad()
await using var server = TestHelper.CreateServer(testAccessManager);

// create access item
var accessItem = fileAccessManager.AccessItem_Create(displayAd: DisplayAd.Required);
var accessItem = fileAccessManager.AccessItem_Create(adShow: AdShow.Required);
accessItem.Token.ToAccessKey();

// create client app
Expand All @@ -167,7 +167,7 @@ public async Task Session_exception_should_be_short_if_ad_is_not_accepted()
await using var server = TestHelper.CreateServer(testAccessManager);

// create access item
var accessItem = fileAccessManager.AccessItem_Create(displayAd: DisplayAd.Required);
var accessItem = fileAccessManager.AccessItem_Create(adShow: AdShow.Required);
accessItem.Token.ToAccessKey();
fileAccessManager.RejectAllAds = true; // server will reject all ads

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
<BaseOutputPath></BaseOutputPath>
<BaseIntermediateOutputPath />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
<BaseOutputPath></BaseOutputPath>
<BaseIntermediateOutputPath />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
<BaseOutputPath></BaseOutputPath>
<BaseIntermediateOutputPath />
Expand Down
6 changes: 3 additions & 3 deletions VpnHood.Client.App.Android/VpnHood.Client.App.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<RootNamespace>VpnHood.Client.App.Droid</RootNamespace>
<OutputType>Exe</OutputType>
<ApplicationId>com.vpnhood.client.android.web</ApplicationId>
<ApplicationVersion>503</ApplicationVersion>
<ApplicationDisplayVersion>4.4.503</ApplicationDisplayVersion>
<ApplicationVersion>506</ApplicationVersion>
<ApplicationDisplayVersion>4.4.506</ApplicationDisplayVersion>
<SupportedOSPlatformVersion>23.0</SupportedOSPlatformVersion>
</PropertyGroup>

Expand All @@ -30,7 +30,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
<BaseOutputPath></BaseOutputPath>
<BaseIntermediateOutputPath />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
<BaseOutputPath></BaseOutputPath>
<BaseIntermediateOutputPath />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion VpnHood.Client.App.Store/VpnHood.Client.App.Store.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

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 @@ -27,7 +27,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion VpnHood.Client.App/VpnHood.Client.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion VpnHood.Client.Device/VpnHood.Client.Device.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion VpnHood.Client/VpnHood.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions VpnHood.Client/VpnHoodClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,8 @@ private async Task ConnectInternal(CancellationToken cancellationToken, bool all
VhLogger.Instance.LogWarning("You suppressed a session of another client!");

// show ad if required
if (sessionResponse.IsAdRequired || sessionResponse.DisplayAd is not DisplayAd.None)
await ShowAd(sessionResponse.DisplayAd is DisplayAd.Flexible, cancellationToken);
if (sessionResponse.IsAdRequired || sessionResponse.AdShow is not AdShow.None)
await ShowAd(sessionResponse.AdShow is AdShow.Flexible, cancellationToken);

// manage datagram channels
await ManageDatagramChannels(cancellationToken);
Expand Down
18 changes: 0 additions & 18 deletions VpnHood.Common/Messaging/DisplayAd.cs

This file was deleted.

2 changes: 1 addition & 1 deletion VpnHood.Common/VpnHood.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions VpnHood.Server.Access/Managers/File/FileAccessManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public AccessItem AccessItem_Create(
string? tokenName = null,
int maxTrafficByteCount = 0,
DateTime? expirationTime = null,
DisplayAd displayAd = DisplayAd.None)
AdShow adShow = AdShow.None)
{
// generate key
var aes = Aes.Create();
Expand All @@ -308,7 +308,7 @@ public AccessItem AccessItem_Create(
MaxTraffic = maxTrafficByteCount,
MaxClientCount = maxClientCount,
ExpirationTime = expirationTime,
DisplayAd = displayAd,
AdShow = adShow,
Token = new Token
{
IssuedAt = DateTime.UtcNow,
Expand Down Expand Up @@ -413,7 +413,7 @@ public class AccessItem
public DateTime? ExpirationTime { get; set; }
public int MaxClientCount { get; set; }
public long MaxTraffic { get; set; }
public DisplayAd DisplayAd { get; set; }
public AdShow AdShow { get; set; }
public required Token Token { get; set; }

[JsonIgnore]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public SessionResponseEx CreateSession(SessionRequestEx sessionRequestEx,
HostEndPoint = sessionRequestEx.HostEndPoint,
ClientIp = sessionRequestEx.ClientIp,
ExtraData = sessionRequestEx.ExtraData,
ExpirationTime = accessItem.DisplayAd is DisplayAd.Required ? DateTime.UtcNow + _adRequiredTimeout : null
ExpirationTime = accessItem.AdShow is AdShow.Required ? DateTime.UtcNow + _adRequiredTimeout : null
};

//create response
Expand Down Expand Up @@ -204,8 +204,8 @@ private SessionResponseEx BuildSessionResponse(Session session, FileAccessManage
ErrorMessage = session.ErrorMessage,
AccessUsage = accessUsage,
RedirectHostEndPoint = null,
IsAdRequired = accessItem.DisplayAd is DisplayAd.Required,
DisplayAd = accessItem.DisplayAd
IsAdRequired = accessItem.AdShow is AdShow.Required,
AdShow = accessItem.AdShow
};
}

Expand Down
2 changes: 1 addition & 1 deletion VpnHood.Server.Access/Messaging/SessionResponseEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public class SessionResponseEx : SessionResponse
public ulong SessionId { get; set; }
public byte[] SessionKey { get; set; } = [];
public bool IsAdRequired { get; set; } //todo: deprecated in version 504 or later
public DisplayAd DisplayAd { get; set; } = DisplayAd.None;
public AdShow AdShow { get; set; } = AdShow.None;

}
2 changes: 1 addition & 1 deletion VpnHood.Server.Access/VpnHood.Server.Access.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

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 @@ -22,7 +22,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
<AssemblyName>VpnHoodServer</AssemblyName>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion VpnHood.Server/ServerHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ private async Task ProcessHello(IClientStream clientStream, CancellationToken ca
AccessKey = sessionResponse.AccessKey,
DnsServers = DnsServers,
IsAdRequired = sessionResponse.IsAdRequired,
DisplayAd = sessionResponse.DisplayAd
AdShow = sessionResponse.AdShow
};
await StreamUtil.WriteJsonAsync(clientStream.Stream, helloResponse, cancellationToken);
await clientStream.DisposeAsync();
Expand Down
2 changes: 1 addition & 1 deletion VpnHood.Server/VpnHood.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion VpnHood.Tunneling/Messaging/HelloResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ public class HelloResponse : SessionResponse
public string? AccessKey { get; set; }
// todo: deprecated in version 504 or later
public bool IsAdRequired { get; set; }
public DisplayAd DisplayAd { get; set; } = DisplayAd.None;
public AdShow AdShow { get; set; } = AdShow.None;
}
2 changes: 1 addition & 1 deletion VpnHood.Tunneling/VpnHood.Tunneling.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageIcon>VpnHood.png</PackageIcon>
<PackageProjectUrl>https://github.com/vpnhood/vpnhood</PackageProjectUrl>
<RepositoryUrl>https://github.com/vpnhood/vpnhood</RepositoryUrl>
<Version>4.4.503</Version>
<Version>4.4.506</Version>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.M.d.HHmm"))</FileVersion>
</PropertyGroup>

Expand Down

0 comments on commit f092037

Please sign in to comment.