Giter Site home page Giter Site logo

net-replay-test's Introduction

net-replay-test

A testing tool for capturing network traffic to a specific server during a query, then replaying the packets and validating the output matches.

Requirements

libpcap (for capture)

See rust-pcap for installation help.

cap_net_raw,cap_net_admin=eip (for capture)

In order to capture packets the binary requires special permissions on linux, to set use:

$ sudo setcap cap_net_raw,cap_net_admin=eip ./net-replay-test

Usage (CLI)

Build

$ cargo build --bin net-replay-test --all-features --release

Capturing

$ ./net-replay-test --implementation node capture --device eth0 csgo 127.0.0.1 27015

A new JSON file named with the date, game, and hostname will be created in the current directory if the capture was successful.

Replay

$ ./net-replay-test --implementation node replay ./replay-...json

Usage (test lib)

TODO

net-replay-test's People

Contributors

douile avatar

Watchers

 avatar  avatar

net-replay-test's Issues

Add CI

Add CI to clippy + fmt + check

Programify output

Lots of the output at the moment is printed to stdout. Instead any important data should be returned to the caller with the option of debug printing via a (feature?) flag.

Out of order packets

In the current implementation packets are sent in the order they were captured, an enhancement might be storing sets of request -> replies, then when server receives a given request it sends all the replies. Related #4

Capture streams

Capture TCP streams so that the server implementation knows when it should accept/close connections, useful for #3

Support UDP+TCP captures

The current implementation can only replay captures that use one of TCP or UDP, this could be made agnostic by simply having a server that has both UDP and TCP listeners open.

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.