Git Product home page Git Product logo

tcpmux's Introduction

TcpMux

TCP Mux is a TCP router that supports optional SSL re-encryption and offloading

Build Status

Installation

TcpMux can be installed as a .NET Core global tool. To set it up, install the latest .NET Core SDK, and run:

dotnet tool install -g tcpmux

This will allow you to launch TcpMux directly on the command line by entering tcpmux.

Usage

 tcpmux [options] <listen_port> <target_host> <target_port>

Options

     -v: Verbose mode; display traffic
     -hex: Hex mode; display traffic as hex dump
     -text: Text mode; display traffic as text dump
     -ssl: perform ssl decoding and reencoding
     -sslOff: perform ssl off-loading (ie connect to the target via SSL, and expose a decrypted port)
     -sslCn: CN to use in the generated SSL certificate (defaults to <target_host>)
     -regCA: register self-signed certificate CA

tcpmux's People

Contributors

nicodeslandes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tcpmux's Issues

Multiplexed stream are always sending packets by batch of 4,096 bytes

Command: dotnet run --no-build -- -mux localhost:2202 -l 443 -ssl -sni

Result:

[23:49:41 INF] Read 26280 bytes from multiplexed stream 1
[23:49:41 INF] Sending 4,096 bytes from www.bbc.co.uk:443 to 127.0.0.1:60939...
[23:49:41 INF] Sending 4,096 bytes from www.bbc.co.uk:443 to 127.0.0.1:60939...
[23:49:41 INF] Sending 4,096 bytes from www.bbc.co.uk:443 to 127.0.0.1:60939...
[23:49:41 INF] Sending 4,096 bytes from www.bbc.co.uk:443 to 127.0.0.1:60939...
[23:49:41 INF] Sending 4,096 bytes from www.bbc.co.uk:443 to 127.0.0.1:60939...
[23:49:41 INF] Sending 4,096 bytes from www.bbc.co.uk:443 to 127.0.0.1:60939...
[23:49:41 INF] Read 24887 bytes from multiplexed stream 1

Why are messages split in 4,096 bytes? The batch size should be 65,536.

Tunnel-in mode doesn't handle connection closure

When running in Tunnel-In mode, when a tunnel connection is closed we should:

  • if it's not active: remove it from the channel and wait for the next one
  • if it's active: close the corresponding client connection

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.