All Projects → berstend → Hypertunnel

berstend / Hypertunnel

Licence: mit
✨ Expose any local TCP/IP service on the internet.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Hypertunnel

Nutzmore
让Nutz更好用
Stars: ✭ 328 (+154.26%)
Mutual labels:  ngrok
Andtroj
A tool for integrating the Metasploit payload with Android's healthy programs and bypassing antivirus
Stars: ✭ 43 (-66.67%)
Mutual labels:  ngrok
Docker Ngrok Server
ngrok服务器的docker image,实现内网穿透。也可以下载附件中的ngrok客户端使用
Stars: ✭ 98 (-24.03%)
Mutual labels:  ngrok
Docker Ngrok
An Ngrok v2 container based on wizardapps/ngrok and fnichol/ngrok
Stars: ✭ 368 (+185.27%)
Mutual labels:  ngrok
Nexphisher
Advanced Phishing tool for Linux & Termux
Stars: ✭ 822 (+537.21%)
Mutual labels:  ngrok
Docker Magento Mutagen
Mage2click Docker-based development environment for Magento with mutagen.io sync for files on macOS
Stars: ✭ 64 (-50.39%)
Mutual labels:  ngrok
Host
Expose your LocalHost with this tool
Stars: ✭ 268 (+107.75%)
Mutual labels:  ngrok
Docker Ngrok
Deploy ngrok server and build client use docker
Stars: ✭ 111 (-13.95%)
Mutual labels:  ngrok
Awesome Tunneling
List of ngrok alternatives and other ngrok-like tunneling software and services. Focus on self-hosting.
Stars: ✭ 946 (+633.33%)
Mutual labels:  ngrok
Ngrok For Vscode
A VSCode extension to control ngrok
Stars: ✭ 75 (-41.86%)
Mutual labels:  ngrok
Kithack
Hacking tools pack & backdoors generator.
Stars: ✭ 377 (+192.25%)
Mutual labels:  ngrok
Easy hack
Hack the World using Termux
Stars: ✭ 549 (+325.58%)
Mutual labels:  ngrok
Bullet
【主线】基于Ngrok内网穿透开源项目,稳定、高效的内网穿透系统。私有部署、云服务。
Stars: ✭ 71 (-44.96%)
Mutual labels:  ngrok
Tunneller
Allow internal services, running on localhost, to be accessed over the internet..
Stars: ✭ 346 (+168.22%)
Mutual labels:  ngrok
Autopwn
A simple bash based metasploit automation tool!
Stars: ✭ 99 (-23.26%)
Mutual labels:  ngrok
Lunnel
fast reverse-proxy
Stars: ✭ 293 (+127.13%)
Mutual labels:  ngrok
Docker Serveo Server
https://serveo.net is an alternative for ngrok. taichunmin/serveo-server can let you host your own serveo. And taichunmin/serveo can let you secure URL to your localhost server through any NAT or firewall in Docker.
Stars: ✭ 44 (-65.89%)
Mutual labels:  ngrok
Sish
HTTP(S)/WS(S)/TCP Tunnels to localhost using only SSH.
Stars: ✭ 2,087 (+1517.83%)
Mutual labels:  ngrok
Django Shop Tutorial
Use Django To Create A Simple Shopping Site Tutorial
Stars: ✭ 109 (-15.5%)
Mutual labels:  ngrok
Tcptunnel
将本地内网服务器映射到公网。
Stars: ✭ 72 (-44.19%)
Mutual labels:  ngrok

✨ hypertunnel Build Status

When localtunnel/ngrok is not enough.

This free TCP relay/reverse proxy service can be used to expose any TCP/IP service running behind a NAT. It's using hypertunnel-tcp-relay under the hood, which itself is based on the excellent node-tcp-relay from tewarid, adding self-service multi-client support similar to localtunnel, a cool project name with "hyper" in it and a free public server.

Installation

# Use directly with no installation (npx is part of npm):
❯❯❯ npx hypertunnel --port 8080

# Or install globally:
❯❯❯ npm install -g hypertunnel

Usage

❯❯❯ hypertunnel --help

  Usage: hypertunnel --port 8080 [options]

  Expose any local TCP/IP service on the internet.

  Options:

    -v, --version                output the version number
    -p, --port [port]            local TCP/IP service port to tunnel
    -l, --localhost [localhost]  local server (default: localhost)
    -s, --server [server]        hypertunnel server to use (default: https://hypertunnel.ga)
    -t, --token [token]          token required by the server (default: free-server-please-be-nice)
    -i, --internet-port [port]   the desired internet port on the public server
    --ssl                        enable SSL termination (https://) on the public server    
    -h, --help                   output usage information

Examples (click to expand)


Example Local webserver

Example: Local webserver

Run a static web server in your current directory:

❯❯❯ npx http-server -p 7777

In another terminal window create a hypertunnel to make that server accessible from the internet:

❯❯❯ npx hypertunnel -p 7777

Et voila:

  ✨ Hypertunnel created.

  Tunneling hypertunnel.ga:19432 > localhost:7777

Bonus: Free SSL termination (https://)

Run hypertunnel with the --ssl flag, to let it know you wish for https support (with a valid certificate):

❯❯❯ npx [email protected] -p 7777 --ssl
  ✨ Hypertunnel created.

  Tunneling https://hypertunnel.ga:26949 > localhost:7777

SSL is not enabled by default as it makes mostly sense for HTTP servers, which is not the sole use-case for hypertunnel. :-)

Tip: Run commands in parallel

You can use bash niceties to run mutiple commands in parallel and stop all of them when hitting ctrl+c:

❯❯❯ (npx http-server -p 7777 & npx hypertunnel --port 7777 --ssl)

Example Remote SSH login

Example: Remote SSH login

As hypertunnel is a generic TCP/IP relay, why not use it for something different than a webserver.

Say you're running MacOS or Linux on your workstation and you want to quickly ssh into it from anywhere.

Note: Make sure your local SSH daemon is running (macOS instructions).

# Create a tunnel for the local SSH service running on port 22
❯❯❯ npx hypertunnel --port 22

Use the hypertunnel to SSH into that machine, from anywhere:

# Example, adjust the port based on the previous output:
❯❯❯ ssh hypertunnel.ga -p 21357
Warning: Permanently added 'hypertunnel.ga:21357' (ECDSA) to the list of known hosts.
Password:

Example Run and expose a local telnet chat server

Example: Run and expose a local telnet chat server

❯❯❯ npx netchat server -p 3000

In another terminal:

❯❯❯ npx hypertunnel -p 3000

From anywhere:

❯❯❯ telnet hypertunnel.ga 31967
Trying 159.69.23.189...
Connected to hypertunnel.ga.
Escape character is '^]'.
bob
Welcome, ::ffff:127.0.0.1:56252
Type "quit" to exit.

Enter username: You are now bob
> hello world
> _

Comparison to localtunnel/ngrok

Both are great services! If your use-case is to simply tunnel local http web server traffic I suggest using them. :-)

I ran into issues when trying to expose a local proxy server (to use the client as forwarding proxy). Both services need to inspect and rewrite HTTP headers for routing, so using the tunnel as a proxy in e.g. Chrome won't work. There are a couple other use-cases where raw TCP stream tunnelling is desired and hypertunnel is the only available option.

Technical differences

Instead of using hostnames to direct traffic to clients, hypertunnel is using a dedicated public port per tunnel. This greatly simplifies things as TCP/IP traffic can be routed based on the assigned port, without http header inspection and rewriting.

Free server: hypertunnel.ga

I really like the simplicity of services like localtunnel & ngrok as they're generously offering a free server. I'm doing the same for hypertunnel but beware of using this free server in mission critical settings. If you'd like to offer sponsorship for the public server feel cheered at and please raise a ticket. :-)

PS: You can also self-host a private hypertunnel-server and point the client to it.

Limits

There are currently no enforced usage limits, in the hopes that you will use the server in good faith. Tunnels are destroyed when you exit the client and latest after 24 hours of creation.

Status

It's doing what it says on the tin. Certain things could be improved and battle-hardened. It works for my current use-case so please raise an issue if you encounter problems.

The CLI interface is stable, but programmatic usage comes with no warranty as internals might change in the future (the internals are also not properly documented currently).

Have a look at the tests to get an idea of how to use hypertunnel programmatically.

Given that there is no alternative to hypertunnel I figured I'd rather release it early. :-)

Contributing

Contributions are welcome.

We use a monorepo powered by Lerna (and yarn workspaces), ava for testing and the standard style for linting.

Monorepo cheat sheet
# Make sure you have a recent version of yarn & lerna installed:
npm install -g yarn lerna

# Bootstrap the packages in the current Lerna repo. 
# Installs all of their dependencies and links any cross-dependencies.
yarn bootstrap

# Install debug in all packages
lerna add debug

# Install debug in all packages as dev dependency
lerna add --dev debug

# Install fs-extra to hypertunnel-server
lerna add fs-extra --scope=hypertunnel-server

# Remove dependency
# https://github.com/lerna/lerna/issues/833
lerna exec -- yarn remove fs-extra

# Run test in all packages
yarn test

Todo

server & client

  • Hook into hypertunnel-tcp-relay events for better cleanup, error reporting and to show established connections
  • Support environment variables next to cli params

client

  • Support --basic-auth flag as a simple way to secure a local http server
  • Add --timeout flag, so a tunnel will self-destruct after a specified delay

server

  • Use e.g. redis or message passing for tunnel manager data to support clustering
  • Battle-hardening (e.g. rate-limits to keep bad actors out) - don't make this a necessity please ಠ_ಠ

Related

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].