Giter Site home page Giter Site logo

tcp-over-websockets's Introduction

tcp-over-websockets

Tunnel TCP through WebSockets. Access anything you want, even from a crappy WiFi which only allows HTTPS.

Note: chisel is probably the same thing but better. @mdslab/wstun is similar.

npm version ISC-licensed support me via GitHub Sponsors chat with me on Twitter

tunneling client

Using npx:

npx tcp-over-websockets wss://example.org github.com:22 8022

Or by installing manually:

npm install -g tcp-over-websockets
tcp-over-websockets wss://example.org github.com:22 8022

This will expose github.com:22 on localhost:8022, tunneled through a tunneling server at example.org.

Works like ssh -N -L 8022:github.com:22 [email protected], except that it's TCP over WebSockets instead of TCP over SSH.

tunneling server

Using npx:

npx -p tcp-over-websockets tcp-over-websockets-server

Or by installing manually:

npm i -g tcp-over-websockets
tcp-over-websockets-server

Contributing

If you have a question, found a bug or want to propose a feature, have a look at the issues page.

tcp-over-websockets's People

Contributors

derhuerst avatar lonerifle avatar xiaoyun94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tcp-over-websockets's Issues

Syntax error launching the server

(running in Ubuntu 16.04)
tcp-over-websockets-server
/usr/local/lib/node_modules/tcp-over-websockets/server.js:44
const verifyClient = ({req}, cb) => {
^

SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3

Typo in readme.md

At line 14 it should be tcp-over-websocket instead of tcp-over-websockets.

Support tunneling to TLS socket endpoints

Certain destination endpoints only accept connections using SSL/TLS. Examples include hosted Postgres services which enforce sslmode, like Neon.

This issue therefore proposes to:

  • allow the client module to request an outbound TLS socket connection to the target destination from the server module, perhaps indicated through a URL query parameter, eg. ws://tunnel.host/target.host?protocol=tls. This will be enabled by a certain command flag like --tls-outbound
  • get the server module to recognise and honor such requests

I'm willing to file the PR to impl this, and have opened the issue to solicit discussion.

README minor modification

when running the program in command line,
"tcp-over-websocket" worked for me, whereas "tcp-over-websockets" (as stated in README) did not

Proxy server

Can we add support to run websockets over an http proxy server?

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.