Skip to content

Commit

Permalink
Upgrades core engine
Browse files Browse the repository at this point in the history
Upgrade core engine to inherit addition of process ID to the firewall request class.
  • Loading branch information
TechnikEmpire committed Jul 28, 2018
1 parent 6da16c5 commit 0807f0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
14 changes: 5 additions & 9 deletions CitadelCore.Windows/CitadelCore.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>3.0.9</Version>
<Version>3.0.10</Version>
<Title>CitadeCore.Windows</Title>
<Authors>Jesse Nicholson</Authors>
<Company>Technik Empire</Company>
Expand All @@ -11,15 +11,11 @@
<PackageLicenseUrl>https://raw.githubusercontent.com/TechnikEmpire/CitadelCore.Windows/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/TechnikEmpire/CitadelCore.Windows</PackageProjectUrl>
<RepositoryUrl>https://github.com/TechnikEmpire/CitadelCore.Windows</RepositoryUrl>
<PackageReleaseNotes>Inherits the following changes from new CitadelCore version:

Fixes an issue where duplicate headers were being generated.
Fixes an issue where user generated header values could be ignored.
Adds an interface to the Start mechanism of the ProxyServer class where the user can specify the total number of packet IO threads. Defaults to 0, which is auto-select for the platform specific diverter that is actually using this value.</PackageReleaseNotes>
<PackageReleaseNotes>Firewall requests now include the process ID, not just the name.</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyVersion>3.0.9.0</AssemblyVersion>
<FileVersion>3.0.9.0</FileVersion>
<AssemblyVersion>3.0.10.0</AssemblyVersion>
<FileVersion>3.0.10.0</FileVersion>
<RepositoryType>git</RepositoryType>
<PackageTags>proxy, filter, filtering, content filtering, content-filter, websocket proxy, http proxy, https proxy</PackageTags>
</PropertyGroup>
Expand All @@ -43,7 +39,7 @@ Adds an interface to the Start mechanism of the ProxyServer class where the user
</ItemGroup>

<ItemGroup>
<PackageReference Include="CitadelCore" Version="3.0.8" />
<PackageReference Include="CitadelCore" Version="3.0.10" />
<PackageReference Include="WinDivertSharp" Version="1.4.3.2" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions CitadelCore.Windows/Diversion/WindowsDiverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -649,15 +649,15 @@ private void HandleNewTcpConnection(ITcpConnectionInfo connInfo, ref TcpHeader t
FirewallResponse response = null;
if (connInfo == null || connInfo.OwnerPid == 4 || connInfo.OwnerPid == 0)
{
var firewallRequest = new FirewallRequest("SYSTEM", tcpHeader.SrcPort, tcpHeader.DstPort);
var firewallRequest = new FirewallRequest("SYSTEM", tcpHeader.SrcPort, tcpHeader.DstPort, connInfo.OwnerPid);
response = ConfirmDenyFirewallAccess?.Invoke(firewallRequest);
}
else
{
// No need to null check here, because the above IF catches whenever connInfo
// is null.
var procPath = connInfo.OwnerProcessPath.Length > 0 ? connInfo.OwnerProcessPath : "SYSTEM";
var firewallRequest = new FirewallRequest(procPath, tcpHeader.SrcPort, tcpHeader.DstPort);
var firewallRequest = new FirewallRequest(procPath, tcpHeader.SrcPort, tcpHeader.DstPort, connInfo.OwnerPid);
response = ConfirmDenyFirewallAccess?.Invoke(firewallRequest);
}

Expand Down

0 comments on commit 0807f0c

Please sign in to comment.