Show HN: BitBang – Reach machines behind NAT from a browser, no account
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.
bitbang servedisplays a code.- The connector visits
bitba.ng/<code>or runsbitbang connect <code>. - 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:
This approach is conceptually similar to Magic Wormhole.
⚖️ BitBang vs. SSH
While BitBang is shaped like SSH (with serve sshd, connect ssh, and cp scp), it solves specific pain points:
| Feature | Traditional SSH | BitBang |
|---|---|---|
| Network | Requires inbound path/Port Forwarding | Works behind NAT/CGNAT/Firewalls |
| Setup | Needs root/daemon/config | Runs as ordinary user; no config |
| Access | SSH Client + Keys/Passwords | Any Web Browser |
| Web Apps | Manual tunnels per application | Generic proxy; target chosen at runtime |
| Onboarding | Public keys must be pre-installed | 6-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-uploadto 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