logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·01.11.26
← Back to news

Show HN: BitBang – Reach machines behind NAT from a browser, no account

Original article
github.com|29 points|3 comments|by narragansett|Jul 31, 2026

Tests License

BitBang: Browser-Based Remote Access Without the Hassle

BitBang is a versatile, single-binary tool designed for remote machine access. It allows you to launch an interactive shell, manage files, and access local web applications directly from a web browser. The best part? It requires no port forwarding, no account creation, and no complex configuration.

🚀 Quick Start Guide

To get started, follow these steps:

  • Install the binary on the target machine.
  • Run the server to generate a connection link.
  • Connect via a browser or the BitBang CLI.

Installation

Run the following one-liner to install:

curl -sSfL bitba.ng/install | sh

Establishing a Connection

On the remote host, execute: bitbang serve

This will output a unique URL. Once you open this link in any browser, you instantly gain access to a terminal, a file explorer, and a network proxy. Alternatively, you can connect from another terminal using: bitbang connect <url>

🛠 How It Works

BitBang utilizes WebRTC as its transport layer rather than traditional TCP. The connection is peer-to-peer and end-to-end encrypted.

Note: The signaling server only facilitates the initial handshake. Once the connection is established, the server steps aside. If a direct P2P path is blocked, a TURN relay is used, but it only handles ciphertext.

Secure Pairing

When URLs or QR codes are impractical (e.g., you are speaking to someone over the phone), BitBang uses a 6-digit pairing code.

  1. bitbang serve displays a code.
  2. The connector visits bitba.ng/<code> or runs bitbang connect <code>.
  3. The connector reads back a second 6-digit number to verify the identity.

This mechanism prevents man-in-the-middle attacks. The probability of a random match is roughly: Probability=1106\text{Probability} = \frac{1}{10^6}Probability=1061​

This approach is conceptually similar to Magic Wormhole.

⚖️ BitBang vs. SSH

While BitBang is shaped like SSH (with serve ≈\approx≈ sshd, connect ≈\approx≈ ssh, and cp ≈\approx≈ scp), it solves specific pain points:

FeatureTraditional SSHBitBang
NetworkRequires inbound path/Port ForwardingWorks behind NAT/CGNAT/Firewalls
SetupNeeds root/daemon/configRuns as ordinary user; no config
AccessSSH Client + Keys/PasswordsAny Web Browser
Web AppsManual tunnels per applicationGeneric proxy; target chosen at runtime
OnboardingPublic keys must be pre-installed6-digit code exchange

📖 Usage Details

The Listener (bitbang serve)

You can control exactly what the remote machine exposes:

  • Full Access: bitbang serve (Shell, files, and proxy).
  • Terminal Only: bitbang serve shell.
  • File Sharing: bitbang serve files ~/share (Use -upload to permit uploads).
  • Generic Proxy: bitbang serve proxy (Select target in browser).
  • Specific Proxy: bitbang serve proxy localhost:8080.

The Connector (CLI)

For those who prefer the command line over a browser:

# Open an interactive shell
bitbang connect <url>

# Execute a single command
bitbang connect <url> -- tail -f /var/log/syslog

# Copy a file from remote to local
bitbang cp <url>:/var/log/app.log ./app.log

# Pipe remote data to local stdout
bitbang cp - <url>:/tmp/firmware.bin firmware.bin

Pro Tip: Successful connections are stored in ~/.bitbang/devices.json. After the first pairing, you can simply use a nickname: bitbang connect nas1.

📦 Installation Options

The installation script automatically detects your architecture (amd64, arm64, or armv7), fetches the latest release from GitHub, and verifies the binary using a SHA-256 checksum.

Custom Installation Commands:

  • Specify Version: curl -sSfL bitba.ng/install | sh -s -- --version v0.5.0
  • Change Install Path: curl -sSfL bitba.ng/install | sh -s -- --prefix /usr/local/bin
  • Audit Before Running:
    curl -sSfL bitba.ng/install -o install.sh
    less install.sh
    sh install.sh