Giter VIP home page Giter VIP logo

tcp_tee's Introduction

tcp_tee

A network utility to forward and dump tcp port data.

Connection before:

client <-------> server

Connection with tcp_tee:

client  <--- tcp_tee ---> server
              |
              v
              ./request.log
              ./responce.log

Tcp_tee utility listens on some tcp port (8080 by default) and forwards all data to a server you want (127.0.0.1:80 by default). Tcp_tee saves all transmitted data to .log files.

It is usefull to quickly monitor http traffic or other tcp traffic. It is a simplified tcpdump alternative which is compatible with most OSes.

Usage:
tcp_tee [--listen_port 8080] [--forward_address 127.0.0.1] [--forward_port 80] [--request_log_file request.log ] [--responce_log_file responce.log]
Usage example:

$tcp_tee --listen_port 8080 --forward_address some-site.com --forward_port 80  &     #run tcp_tee in background
$curl http://127.0.0.1:8080/index.html                                               #get http://some-site.com/index.html 
$cat request.log                                                                     #show request
$cat responce.log                                                                    #show responce

Build from source

run build.sh or run the following commands:

mkdir build
cd build
conan install ..
#conan install --build missing .. 
cmake .. 
cmake --build . 

If you face strange linkage errors then check if conan package manager is configured to use c++11 ABI. You should see the following output in order to solve them:

$ grep compiler.libcxx ~/.conan/profiles/default
compiler.libcxx=libstdc++11

Compatibility

Checked on

  • Ubuntu 22, gcc 11.3
  • Windows 10, MSVS 2022

Licence

You are free to use or modify this code.

tcp_tee's People

Contributors

dim2r avatar

Watchers

 avatar

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.