Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
Now uses own websocket fork.
Bypasses restrictions on GET requests to enable technically-illegal headers that everyone uses anyway, including Microsoft.
  • Loading branch information
TechnikEmpire committed Nov 9, 2018
1 parent 8d4c808 commit 010c576
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions CitadelCore.Windows.Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private static FirewallResponse OnFirewallCheck(FirewallRequest request)
)
{
// Let's allow chrome to access TCP 80 and 443, but block all other ports.
Console.WriteLine("Filtering application {0} destined for {1}", request.BinaryAbsolutePath, (ushort)IPAddress.HostToNetworkOrder((short)request.RemotePort));
//Console.WriteLine("Filtering application {0} destined for {1}", request.BinaryAbsolutePath, (ushort)IPAddress.HostToNetworkOrder((short)request.RemotePort));
return new FirewallResponse(CitadelCore.Net.Proxy.FirewallAction.FilterApplication);
}
else
Expand All @@ -81,13 +81,13 @@ private static FirewallResponse OnFirewallCheck(FirewallRequest request)
// If we filtered the replays back through the proxy, who knows
// what would happen! Actually that's not true, you'd invoke an infinite
// loopback, spawn a ton of browser tabs and then call me a bad programmer.
Console.WriteLine("Ignoring internet for application {0} destined for {1}", request.BinaryAbsolutePath, (ushort)IPAddress.HostToNetworkOrder((short)request.RemotePort));
//Console.WriteLine("Ignoring internet for application {0} destined for {1}", request.BinaryAbsolutePath, (ushort)IPAddress.HostToNetworkOrder((short)request.RemotePort));
return new FirewallResponse(CitadelCore.Net.Proxy.FirewallAction.DontFilterApplication);
}
}

// For all other applications, just let them access the internet without filtering.
Console.WriteLine("Not filtering application {0} destined for {1}", request.BinaryAbsolutePath, (ushort)IPAddress.HostToNetworkOrder((short)request.RemotePort));
//Console.WriteLine("Not filtering application {0} destined for {1}", request.BinaryAbsolutePath, (ushort)IPAddress.HostToNetworkOrder((short)request.RemotePort));
return new FirewallResponse(CitadelCore.Net.Proxy.FirewallAction.DontFilterApplication);
}

Expand Down Expand Up @@ -190,7 +190,7 @@ private static bool ManuallyFulfill(HttpMessageInfo messageInfo)
/// headers, the request target, etc etc.
/// </remarks>
private static void OnNewMessage(HttpMessageInfo messageInfo)
{
{
if (messageInfo.BodyContentType != string.Empty)
{
Console.WriteLine("New message with content of type: {0}", messageInfo.BodyContentType);
Expand Down
11 changes: 6 additions & 5 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.7.2</Version>
<Version>3.7.4</Version>
<Title>CitadeCore.Windows</Title>
<Authors>Jesse Nicholson</Authors>
<Company>Technik Empire</Company>
Expand All @@ -11,11 +11,12 @@
<PackageLicenseUrl>https://www.mozilla.org/en-US/MPL/2.0/</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/TechnikEmpire/CitadelCore.Windows</PackageProjectUrl>
<RepositoryUrl>https://github.com/TechnikEmpire/CitadelCore.Windows</RepositoryUrl>
<PackageReleaseNotes>Fixes a websocket issue.</PackageReleaseNotes>
<PackageReleaseNotes>Now uses own websocket fork.
Bypasses restrictions on GET requests to enable technically-illegal headers that everyone uses anyway, including Microsoft.</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyVersion>3.7.2.0</AssemblyVersion>
<FileVersion>3.7.2.0</FileVersion>
<AssemblyVersion>3.7.4.0</AssemblyVersion>
<FileVersion>3.7.4.0</FileVersion>
<RepositoryType>git</RepositoryType>
<PackageTags>proxy, filter, filtering, content filtering, content-filter, websocket proxy, http proxy, https proxy</PackageTags>
</PropertyGroup>
Expand All @@ -39,7 +40,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CitadelCore" Version="3.7.2" />
<PackageReference Include="CitadelCore" Version="3.7.4" />
<PackageReference Include="WinDivertSharp" Version="1.4.3.3" />
</ItemGroup>

Expand Down

0 comments on commit 010c576

Please sign in to comment.