chisel - A fast TCP tunnel over HTTP

Chisel is a fast TCP tunnel, transported over HTTP. Single executable including both client and server. Written in Go (Golang). Chisel is mainly useful for passing through firewalls, though it can also be used to provide a secure endpoint into your network. Chisel is very similar to crowbar though achieves much higher performance .

See the latest release or download and install it now with curl! | bash
docker run --rm -it jpillora/chisel --help
$ go get -v


A demo app on Heroku is running this chisel server :
$ chisel server --port $PORT --proxy
# listens on $PORT, proxy web requests to ''
This demo app is also running a simple file server on :3000 , which is normally inaccessible due to Heroku's firewall. However, if we tunnel in with:
$ chisel client 3000
# connects to '',
# tunnels your localhost:3000 to the server's localhost:3000
and then visit localhost:3000 , we should see a directory listing of the demo app's root. Also, if we visit the demo app in the browser we should hit the server's default proxy and see a copy of .


    Usage: chisel [command] [--help]

    Version: 0.0.0-src

      server - runs chisel in server mode
      client - runs chisel in client mode

    Read more:
chisel server --help

    Usage: chisel server [options]


      --host, Defines the HTTP listening host – the network interface
      (defaults to

      --port, Defines the HTTP listening port (defaults to 8080).

      --key, An optional string to seed the generation of a ECDSA public
      and private key pair. All communications will be secured using this
      key pair. Share this fingerprint with clients to enable detection
      of man-in-the-middle attacks.

      --authfile, An optional path to a users.json file. This file should
      be an object with users defined like:
        "<user:pass>": ["<addr-regex>","<addr-regex>"]
        when <user> connects, their <pass> will be verified and then
        each of the remote addresses will be compared against the list
        of address regular expressions for a match. Addresses will
        always come in the form "<host/ip>:<port>".

      --proxy, Specifies the default proxy target to use when chisel
      receives a normal HTTP request.

      -v, Enable verbose logging

      --help, This help text

    Read more:
chisel client --help

    Usage: chisel client [options] <server> <remote> [remote] [remote] ...

    server is the URL to the chisel server.

    remotes are remote connections tunnelled through the server, each of
    which come in the form:


        * remote-port is required.
        * local-port defaults to remote-port.
        * local-host defaults to (all interfaces).
        * remote-host defaults to (server localhost).

        example remotes



      --fingerprint, An optional fingerprint (server authentication)
      string to compare against the server's public key. You may provide
      just a prefix of the key or the entire string. Fingerprint 
      mismatches will close the connection.

      --auth, An optional username and password (client authentication)
      in the form: "<user>:<pass>". These credentials are compared to
      the credentials inside the server's --authfile.

      --keepalive, An optional keepalive interval. Since the underlying
      transport is HTTP, in many instances we'll be traversing through
      proxies, often these proxies will close idle connections. You must
      specify a time with a unit, for example '30s' or '2m'. Defaults
      to '0s' (disabled).

      -v, Enable verbose logging

      --help, This help text

    Read more:
See also programmatic usage .

Encryption is always enabled. When you start up a chisel server, it will generate an in-memory ECDSA public/private key pair. The public key fingerprint will be displayed as the server starts. Instead of generating a random key, the server may optionally specify a key seed, using the --key option, which will be used to seed the key generation. When clients connect, they will also display the server's public key fingerprint. The client can force a particular fingerprint using the --fingerprint option. See the --help above for more information.

Using the --authfile option, the server may optionally provide a user.json configuration file to create a list of accepted users. The client then authenticates using the --auth option. See users.json for an example authentication configuration file. See the --help above for more information.
Internally, this is done using the Password authentication method provided by SSH. Learn more about crypto/ssh here .

With crowbar , a connection is tunnelled by repeatedly querying the server with updates. This results in a large amount of HTTP and TCP connection overhead. Chisel overcomes this using WebSockets combined with crypto/ssh to create hundreds of logical connections, resulting in one TCP connection per client.
In this simple benchmark, we have:
       /    chisel         chisel         \
       \                                  /
        '--> crowbar:4001--->crowbar:4002'
             client           server
Note, we're using an in-memory "file" server on localhost for these tests
:3000 => 1 bytes in 1.440608ms
:3000 => 10 bytes in 658.833µs
:3000 => 100 bytes in 669.6µs
:3000 => 1000 bytes in 570.242µs
:3000 => 10000 bytes in 655.795µs
:3000 => 100000 bytes in 693.761µs
:3000 => 1000000 bytes in 2.156777ms
:3000 => 10000000 bytes in 18.562896ms
:3000 => 100000000 bytes in 146.355886ms
:2001 => 1 bytes in 1.393731ms
:2001 => 10 bytes in 1.002992ms
:2001 => 100 bytes in 1.082757ms
:2001 => 1000 bytes in 1.096081ms
:2001 => 10000 bytes in 1.215036ms
:2001 => 100000 bytes in 2.09334ms
:2001 => 1000000 bytes in 9.136138ms
:2001 => 10000000 bytes in 84.170904ms
:2001 => 100000000 bytes in 796.713039ms
~100MB in 0.8 seconds
:4001 => 1 bytes in 3.335797ms
:4001 => 10 bytes in 1.453007ms
:4001 => 100 bytes in 1.811727ms
:4001 => 1000 bytes in 1.621525ms
:4001 => 10000 bytes in 5.20729ms
:4001 => 100000 bytes in 38.461926ms
:4001 => 1000000 bytes in 358.784864ms
:4001 => 10000000 bytes in 3.603206487s
:4001 => 100000000 bytes in 36.332395213s
~100MB in 36 seconds
See more test/

Known Issues
  • WebSockets support is required
    • IaaS providers all will support WebSockets
      • Unless an unsupporting HTTP proxy has been forced in front of you, in which case I'd argue that you've been downgraded to PaaS.
    • PaaS providers vary in their support for WebSockets
      • Heroku has full support
      • Openshift has full support though connections are only accepted on ports 8443 and 8080
      • Google App Engine has no support


  • 1.0.0 - Init
  • 1.1.0 - Swapped out simple symmetric encryption for ECDSA SSH

  • Better, faster tests
  • Expose a stats page for proxy throughput
  • Treat client stdin/stdout as a socket
  • Allow clients to act as an indirect tunnel endpoint for other clients
  • Keep local connections open and buffer between remote retries

chisel - A fast TCP tunnel over HTTP chisel - A fast TCP tunnel over HTTP Reviewed by Zion3R on 11:07 AM Rating: 5