Code Monkey home page Code Monkey logo

tcp-over-http's Introduction

๐Ÿ“ก TCP over HTTP

Forked from stable version, changes: add https and cross compile support.

๐Ÿฅฆ The Questions

๐Ÿชƒ What does it do?

You can proxy TCP traffic over HTTP.

An basic setup would be:

[Your TCP target] <--TCP--  [Exit Node]
                                 ^
                                 |
                               HTTP
                                 |
[Your TCP client] --TCP--> [Entry Node]

๐Ÿฉ Why?

I was bored.

This allows you to reach servers behind a HTTP reverse proxy.
Suddenly you can do SSH to a server which is behind a NGINX proxy.

If you have for example a HTTP gateway, you can now also have a TCP gateway.

๐Ÿพ Why not?

Converting binary to base64, send it via HTTP and convert it back is inefficient and pretty slow.
Less than 10MB/s slow.

Also, if a server only opens port 80, nobody expects you to tunnel through and rech the SSH server.
Security wise, no admin would want this tool on his/her server without him/her knowing.

This tool is more a proof of concept. Don't take it too serious.

๐ŸŽบ Usage

Replace tcp-over-http by cargo run -- if you have not installed the binary.

tcp-over-http --help

# Start our exit node to reach our SSH server (default listen localhost:8080)
tcp-over-http exit --help
tcp-over-http exit --target-host localhost --target-port 22

# Start our entry node (default listen localhost:1415)
tcp-over-http entry --help
tcp-over-http entry --target-url http://localhost:8080/

# Test it
ssh localhost -p 1415

โŒš๏ธ Performance

This package is not optimized for stability or speed.

Setup

# Terminal 0 - Netcat listening
nc -l 1234 > /dev/zero

# Terminal 1 - Exit Node
tcp-over-http exit --target-host locahost --target-port 1234

# Terminal 2 - Entry Node
tcp-over-http entry --target-url http://localhost:8080/

# Terminal 3 - Sending random data
# Using pipeviewer (pv) to see current data rate
time dd if=/dev/random bs=1M count=1024 | pv | nc localhost 1415 -q 0

๐Ÿ… Result: 6MiB/s

tcp-over-http's People

Contributors

mikechenczy avatar hezuikn avatar johan-mi avatar julianbuettner avatar yves147 avatar

Stargazers

max.wei avatar  avatar

Forkers

axax002

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.