Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/moriyoshi/inverse-tcp-tunnel

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/moriyoshi/inverse-tcp-tunnel

  • v0.0.1
  • Source
  • Go
  • Socket score

Version published
Created
Source

Inverse TCP tunnel

What is this?

Inverse TCP Tunnel Diagram

Inverse TCP tunnel (ITT) is a TCP proxy that tunnels multiple connections to a service that sits in another private network and not directly accessible from the outside, with the help of the client agent that resides where it can get to the service. Ordinary proxy servers deal with incoming connections by establishing corresponding ones to the upstream one by one. On the other hand, the ITT server multiplexes those incoming connections into a single TCP session with the client agent, and lets the client make actual connections to the upstream, hence the name "inverse."

This is pretty useful in the situation where you are using Docker and the docker daemon is listening on the unix domain socket that cannot be exposed to within the containers. (Docker Desktop for Mac, for example)

Installation

For the server,

go get github.com/moriyoshi/inverse-tcp-tunnel/cmd/server

and for the client,

go get github.com/moriyoshi/inverse-tcp-tunnel/cmd/client

Usage

The server program accepts these arguments:

Usage of server:
  -listen string
        address to listen (acceptor)
  -loglevel string
        loglevel (default "info")
  -tunnel string
        address to listen (tunnel)
  • -listen

    Specifies the local address to listen on that accepts the connections from the user clients which want to connect to the service in the other network. Unix domain sockets can be specified by prefixing the path with unix:.

  • -loglevel

    Specifies the log level. The possible values are fatal, error, warning, info, debug, and trace. Beware that setting this to trace will make the server to dump the raw network traffic.

  • -tunnel

    Specifies the local address to listen on that accepts the connection from the client agent that reside where accessible to the service in question. Unix domain sockets can be specified by prefixing the path with unix:.

The client program accepts these arguments:

Usage of ./client:
  -downstream string
    	address to connect (downstream)
  -loglevel string
    	loglevel (default "info")
  -proxy string
    	proxy URL (e.g. socks5://localhost:1080)
  -upstream string
    	address to connect (upstream)
  • -downstream

    Specifies the remote address where the ITT server is listening (the counterpart should have been configured with -tunnel). Unix domain sockets can be specified by prefixing the path with unix:.

  • -upstream

    Specifies the remote address of the service in question. Unix domain sockets can be specified by prefixing the path with unix:.

  • -loglevel

    Specifies the log level. The possible values are fatal, error, warning, info, debug, and trace. Beware that setting this to trace will make the server to dump the raw network traffic.

  • -proxy

    Specifies another proxy to establish the connection with. Currently the following are supported:

    • socks5:// (actually this works in the same way as socks5h://...)
    • socks5h://

License

MIT

FAQs

Package last updated on 26 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc