Skip to content

Commit

Permalink
Merge changes from main
Browse files Browse the repository at this point in the history
  • Loading branch information
haga-rak committed Sep 12, 2024
2 parents 81fa0d0 + 72131c9 commit 0548975
Show file tree
Hide file tree
Showing 22 changed files with 134 additions and 23 deletions.
41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributor License Agreement (CLA)

**Project Name**: fluxzy.core

**Project Owner**: Fluxzy SAS

This Contributor License Agreement ("Agreement") is agreed to by the undersigned ("Contributor") and the owner of the repository, Fluxzy SAS ("Project Owner"), to govern the rights associated with any contribution made by the Contributor to the fluxzy.core project ("Project").

## 1. Grant of Copyright License

The Contributor grants to the Project Owner and all recipients of software distributed by the Project a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute any contribution made to the Project.

## 2. Waiver of Rights

The Contributor irrevocably waives, surrenders, and relinquishes all rights, title, and interest in and to their contributions to the Project, including any and all copyrights, moral rights, patents, trademarks, and any other intellectual property rights.

The Contributor also waives any right to assert any claims, including but not limited to, claims for compensation, royalties, or any other payment in relation to their contributions to the Project.

## 3. Right to Attribution

The Contributor retains the right to be mentioned as a contributor to the Project. The Project Owner agrees to acknowledge the Contributor's contributions in a manner consistent with the norms of the open-source community (such as by mentioning the Contributor's name in a CONTRIBUTORS file, changelog, or similar documentation).

## 4. Representations and Warranties

The Contributor represents and warrants that:

- The contributions are original, and the Contributor is the sole author.
- The contributions do not violate any third-party rights, including intellectual property rights.
- The Contributor has the necessary legal authority to make this Agreement and grant the rights described herein.

## 5. No Obligation to Use Contributions

The Project Owner is under no obligation to use, merge, or distribute the contributions submitted by the Contributor.

## 6. Entire Agreement

This Agreement constitutes the entire understanding between the Contributor and the Project Owner with respect to contributions to the Project.

---

By signing or otherwise agreeing to this Agreement, the Contributor acknowledges and agrees to its terms.
2 changes: 1 addition & 1 deletion build/Fluxzy.Build/Fluxzy.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Bullseye" Version="4.2.1" />
<PackageReference Include="Octokit" Version="11.0.1" />
<PackageReference Include="Octokit" Version="13.0.1" />
<PackageReference Include="SimpleExec" Version="11.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.133" />
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.143" />
<PackageReference Include="Fluxzy.Core" Version="1.22.12" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
<PackageReference Include="Fluxzy.Core" Version="1.23.1" />
<PackageReference Include="Fluxzy.Core" Version="1.26.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
<PackageReference Include="Fluxzy.Core" Version="1.23.1" />
<PackageReference Include="Fluxzy.Core" Version="1.26.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
<PackageReference Include="Fluxzy.Core" Version="1.23.1" />
<PackageReference Include="Fluxzy.Core" Version="1.26.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
<PackageReference Include="Fluxzy.Core" Version="1.23.1" />
<PackageReference Include="Fluxzy.Core" Version="1.26.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
<PackageReference Include="Fluxzy.Core" Version="1.23.1" />
<PackageReference Include="Fluxzy.Core" Version="1.26.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
<PackageReference Include="Fluxzy.Core" Version="1.23.1" />
<PackageReference Include="Fluxzy.Core" Version="1.26.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
<PackageReference Include="Fluxzy.Core" Version="1.23.1" />
<PackageReference Include="Fluxzy.Core" Version="1.26.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
<PackageReference Include="Fluxzy.Core" Version="1.23.1" />
<PackageReference Include="Fluxzy.Core" Version="1.26.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
<PackageReference Include="Fluxzy.Core" Version="1.23.1" />
<PackageReference Include="Fluxzy.Core" Version="1.26.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.139" />
<PackageReference Include="Fluxzy.Core" Version="1.23.1" />
<PackageReference Include="Fluxzy.Core" Version="1.26.3" />
</ItemGroup>

</Project>
40 changes: 40 additions & 0 deletions examples/Samples.No015.ReadingArchive/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using Fluxzy.Misc.Streams;
using Fluxzy.Readers;

namespace Samples.No015.ReadingArchive
{
internal class Program
{
/// <summary>
/// This example shows how to read an archive file
/// </summary>
/// <param name="args"></param>
static void Main(string[] args)
{
var archiveReader = new FluxzyArchiveReader("example.com.fxzy");

// Use DirectoryArchiveReader to read from a dump directory
// var archiveReader = new DirectoryArchiveReader("directory_name")

var allExchanges = archiveReader.ReadAllExchanges();

var exchange = allExchanges.First();

foreach (var header in exchange.GetRequestHeaders()) {
Console.WriteLine($"{header.Name}: {header.Value}");
}

Console.WriteLine();

foreach (var header in exchange.GetResponseHeaders()!) {
Console.WriteLine($"{header.Name}: {header.Value}");
}

var responseBodyStream = archiveReader.GetDecodedResponseBody(exchange.Id)!;

var responseAsString = responseBodyStream.ReadToEndGreedy();

Console.WriteLine(responseAsString);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<None Update="example.com.fxzy">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Fluxzy.Core\Fluxzy.Core.csproj" />
</ItemGroup>
</Project>
Binary file not shown.
18 changes: 14 additions & 4 deletions fluxzy.core.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
Expand Down Expand Up @@ -39,9 +38,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "__global", "__global", "{00
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{30657256-C907-42C2-B7B2-DA4FD8D0E412}"
ProjectSection(SolutionItems) = preProject
examples\Samples.No001.RecordAsHarOrFxzy\Samples.No001.RecordAsHarOrFxzy.csproj = examples\Samples.No001.RecordAsHarOrFxzy\Samples.No001.RecordAsHarOrFxzy.csproj
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{F5C5DD67-8A16-4561-8545-2EF0441A2015}"
ProjectSection(SolutionItems) = preProject
Expand Down Expand Up @@ -95,6 +91,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docker", "docker", "{BBFE36
docker\entrypoint.sh = docker\entrypoint.sh
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.No001.RecordAsHarOrFxzy", "examples\Samples.No001.RecordAsHarOrFxzy\Samples.No001.RecordAsHarOrFxzy.csproj", "{711E4B08-93E0-4A31-8AE7-8E7C97DA5260}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.No015.ReadingArchive", "examples\Samples.No015.ReadingArchive\Samples.No015.ReadingArchive.csproj", "{8DEDB40D-1244-4A8A-A776-69971B219CBC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -189,6 +189,14 @@ Global
{5B29B355-BA5C-4ED5-AC79-49A58C4ECB07}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B29B355-BA5C-4ED5-AC79-49A58C4ECB07}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B29B355-BA5C-4ED5-AC79-49A58C4ECB07}.Release|Any CPU.Build.0 = Release|Any CPU
{711E4B08-93E0-4A31-8AE7-8E7C97DA5260}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{711E4B08-93E0-4A31-8AE7-8E7C97DA5260}.Debug|Any CPU.Build.0 = Debug|Any CPU
{711E4B08-93E0-4A31-8AE7-8E7C97DA5260}.Release|Any CPU.ActiveCfg = Release|Any CPU
{711E4B08-93E0-4A31-8AE7-8E7C97DA5260}.Release|Any CPU.Build.0 = Release|Any CPU
{8DEDB40D-1244-4A8A-A776-69971B219CBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DEDB40D-1244-4A8A-A776-69971B219CBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DEDB40D-1244-4A8A-A776-69971B219CBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DEDB40D-1244-4A8A-A776-69971B219CBC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -213,6 +221,8 @@ Global
{0153056B-8EB0-45D0-86E7-E2AD08B2657A} = {30657256-C907-42C2-B7B2-DA4FD8D0E412}
{BABC5626-5E8F-4DDE-8649-6BE68BAA59E5} = {30657256-C907-42C2-B7B2-DA4FD8D0E412}
{5B29B355-BA5C-4ED5-AC79-49A58C4ECB07} = {30657256-C907-42C2-B7B2-DA4FD8D0E412}
{711E4B08-93E0-4A31-8AE7-8E7C97DA5260} = {30657256-C907-42C2-B7B2-DA4FD8D0E412}
{8DEDB40D-1244-4A8A-A776-69971B219CBC} = {30657256-C907-42C2-B7B2-DA4FD8D0E412}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {82E271CB-7073-4A6C-8FF6-6DA616720D3A}
Expand Down
2 changes: 1 addition & 1 deletion src/Fluxzy.Core.Pcap.Cli/Fluxzy.Core.Pcap.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.133" />
<PackageReference Update="Nerdbank.GitVersioning" Version="3.6.143" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/Fluxzy.Core/Archiving/ZipHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private static async Task InternalCompressDirectory(
newEntry.CompressionMethod = CompressionMethod.Stored;
}

zipStream.PutNextEntry(newEntry);
await zipStream.PutNextEntryAsync(newEntry);
await fsInput.CopyToAsync(zipStream);
zipStream.CloseEntry();
}
Expand Down Expand Up @@ -131,7 +131,7 @@ private static async Task InternaCompressDirectoryWithFileInfos(
newEntry.CompressionMethod = CompressionMethod.Stored;
}

zipStream.PutNextEntry(newEntry);
await zipStream.PutNextEntryAsync(newEntry);
await fsInput.CopyToAsync(zipStream);
zipStream.CloseEntry();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Fluxzy.Core/Core/ReverseProxyExchangeSourceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public ReverseProxyExchangeSourceProvider(ICertificateProvider certificateProvid
CertificateRevocationCheckMode = X509RevocationMode.NoCheck,
EncryptionPolicy = EncryptionPolicy.RequireEncryption,
ServerCertificateSelectionCallback = (sender, name) => {
var certificate = _certificateProvider.GetCertificate(name ?? "fluxzy.io");
var certificate = _certificateProvider.GetCertificate(string.IsNullOrWhiteSpace(name) ? "fluxzy.io" : name);
authorityName = name;
return certificate;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Fluxzy.Core/Fluxzy.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@

<ItemGroup>
<PackageReference Include="Fluxzy.BouncyCastle.Crypto.Async" Version="2.5.2" />
<PackageReference Include="MessagePack" Version="2.5.168" />
<PackageReference Include="MessagePack" Version="2.5.171" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.IO.Pipelines" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.Threading.Channels" Version="8.0.0" />
<PackageReference Include="YamlDotNet" Version="13.7.1" />
</ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion test/Fluxzy.Tests/Cli/ReverseProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public async Task Validate(string stringUri, string method)

using var response = await httpClient.SendAsync(requestMessage);

Assert.Equal(System.Net.HttpStatusCode.OK, response.StatusCode);
Assert.Contains(response.StatusCode,
new[] { System.Net.HttpStatusCode.OK, System.Net.HttpStatusCode.MethodNotAllowed });
}

public static IEnumerable<object[]> GetArguments()
Expand Down

0 comments on commit 0548975

Please sign in to comment.