Giter Site home page Giter Site logo

packetnet-connections's People

Contributors

chmorgan avatar dependabot[bot] avatar qomaa avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

packetnet-connections's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/dotnet-core.yml
  • actions/checkout v3
  • actions/setup-dotnet v3
  • alirezanet/publish-nuget v3.0.4
  • actions/checkout v3
  • actions/setup-dotnet v3
  • crazy-max/ghaction-chocolatey v2
nuget
PacketDotNetConnections/PacketDotNetConnections.csproj
  • NuGet.Build.Packaging 0.2.2
  • sharpziplib 1.4.2
  • sharppcap 6.2.5
  • packetdotnet 1.4.7
  • log4net 2.0.15
UnitTest/UnitTest.csproj
  • xunit.runner.visualstudio 2.4.5
  • xunit 2.4.2
  • Microsoft.NET.Test.Sdk 17.4.1

  • Check this box to trigger a request for Renovate to run again on this repository

Support for Brottli compression

The library is supporting deflate and gzip that are used by browsers for content compression. But what about the Brotli compression? It is also supported by browsers, and System.IO.Compression has support for it.

This is a good project

, you can use packetnet connections + SharpPcap to monitor the specific data of all HTTP requests in the network, right? Can HTTPS also be monitored?

FIXME: we don't handle rolling sequence numbers properly in here

I've been looking into problems with (seemingly random) receiving only "OutOfSequence" packets after a while (and usually only when lots of packets went over the wire), when I found this comment in TcpStreamGenerator.cs#L235:

//FIXME: we don't handle rolling sequence numbers properly in here
// so after 4GB of packets we will have issues

Which might explain my problem: when the initial Seq number is already a big number, we'd probably reach the uint32 limit rather quickly, causing it to not recognize the packet sequence anymore after it rolled over?

I'm not too familiar with TCP internas - How hard would this be to address? I naively imagine it's just a couple modulo operations here and there, or is there more to it?

Example for Open File

Is it possible to leverage this on opening a pcap instead of pulling from the device itself? If so, can you provide a short example?

NullReferenceException in TcpConnectionMananger.ProcessPacket

The ConnectionsExample is working without problems here, but when I try to process a TcpPacket in my program, I get a NullReferenceException:

An unhandled exception of type 'System.NullReferenceException' occurred in PacketDotNetConnections.dll: 'Object reference not set to an instance of an object.'
at PacketDotNet.Connections.TcpConnectionManager.ProcessPacket(PosixTimeval timeval, TcpPacket tcp)
[...]

I provide a timeval from the RawPacket and a TcpPacket which is not null.

Maybe my constellation is a problem here? I receive a stream in pcap format into a unix named pipe file (fifo) and listen to it with CaptureFileReaderDevice. The OnPacketArrival event gets fired with a valid PacketCapture. It is also possible to extract the TcpPacket (with Parent IPv4Packet) from it:

{[TCPPacket: SourcePort=42978, DestinationPort=443, Flags={ack[3259718536 (0xc24b5b88)]|psh}]}

But when I pass the packet into TcpConnectionManager.ProcessPacket(), I always get the NullRefException.

Any ideas what the problem could be? Do you need more info?

packetnet-connections calls missing method in packet.net

When calling
PacketDotNet.Connections.TcpConnectionManager.ProcessPacket(PosixTimeval timeval, TcpPacket tcp)
a missing method exception will be thrown.
Stack trace:

System.MissingMethodException: Method not found: 'Boolean PacketDotNet.TcpPacket.get_Rst()'.
   at PacketDotNet.Connections.TcpConnectionManager.ProcessPacket(PosixTimeval timeval, TcpPacket tcp)

The cause seems to be in PacketDotNetConnections/TcpConnectionManager.cs line 86
if(tcp.Rst)
packet.net TcpPacket only has Reset, not Rst

My version of packet.net is 1.0.1, packet.net-connections seems to be using 0.20.1 which does not have that method
.net core 2.2.300 sdk

Thread safety issue in TcpConnectionmanager

void HandleCloseTimerElapsed (object sender, System.Timers.ElapsedEventArgs e) in TcpConnection is running on a separate thread (see https://stackoverflow.com/questions/7893773/do-system-timers-timer-run-in-independent-threads), which fires OnConnectionClosed, which in turn modifies the Connections in TCPConnectionManager.

This is usually fine but can result in a race condition when the collection is modified. I've encountered exceptions because Connections started having null values

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.