patrickjonesdotca / purr

Smuggle TCP connections through HTTP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Purr

Gem Version Build Status Inline docs Code Climate codecov

Purr is a TCP-over-HTTP solution which consists:

  • a Rack-based web server implemented in Ruby
  • a desktop client application written in Go
  • a browser extension with the ability to interact with the client
  • a JS library functioning as the control interface of the extension (TODO)

Using Purr it's possible to "smuggle" any kind of TCP traffic (SSH, VNC, etc.) through an HTTP connection.

How it works

  1. Using the (FIXME: not yet implemented) frontend library, the extension triggers the Go client to listen on a local TCP port
  2. If a client application (VNC, SSH, etc.) connects to this local port, the Go client opens a HTTP upgrade request to the Rack server
  3. The Rack server parses the upgrade request and if everything is alright, responds back with a correct response
  4. The Go client establishes proxying between the local TCP port and the remote connection to the Rack server
  5. Based on the user-defined logic in the block passed to the Rack server, it opens a remote TCP connection
  6. The Rack server establishes proxying between the incoming request and the remote TCP connection
  7. The data flows freely in both directions

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/skateman/purr.

License

The application is available as open source under the terms of the MIT License.

About

Smuggle TCP connections through HTTP

License:MIT License


Languages

Language:JavaScript 40.5%Language:Go 29.7%Language:Ruby 27.0%Language:Shell 2.8%