Skip to content

About

Post-quantum-secure, peer-to-peer tunneling for local services.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

thepeer.stream

Special thanks to Andrew Thomas (@andrewmthomas87). This project took inspiration from his web-p2p-tunnel repository.

Post-quantum-secure, peer-to-peer access to a localhost web app from another computer or Android phone. Try Direct first; Relay requires explicit configuration.

         Sharing computer                         Phone or connecting computer
┌────────────────────────┐                  ┌────────────────────────┐
│ Local web application  │                  │        Browser         │
│           ↕            │                  │           ↕            │
│  ┌─ CLI ────────────┐  │                  │  ┌─ App ────────────┐  │
│  │    ▄▄▄ ▄ ▄▄▄     │  │                  │  │    ┌─      ─┐    │  │
│  │    █ █ ▀ █ █     │  │◄════ Tunnel ════►│  │                  │  │
│  │    ▀▀▀ ▄ ▀▀▀     │  │                  │  │    └─      ─┘    │  │
│  │  Text / QR offer │  │                  │  │  Paste / scan    │  │
│  └──────────────────┘  │                  │  └──────────────────┘  │
└────────────────────────┘                  └────────────────────────┘
                            Direct or Relay

Roadmap

  • Open a computer’s local web application in an Android phone’s browser.
  • Terminal-to-terminal tunneling for localhost web apps (share / connect).
  • iOS support.
  • Operate a community-funded relay.
  • Explore remote shell and other scoped protocols (not part of the web-app tunnel).
  • Benchmark Direct and Relay performance; evaluate HTTP/3 where it offers measurable benefits.

Installation

CLI

Once a normal release is published, install the latest version with:

curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/benjaminpreiss/thepeer.stream/main/scripts/install.sh | sh

The installer verifies the release checksum and installs thepeer in ~/.local/bin, without sudo. Add that directory to your PATH if needed. Supports Linux x86_64 (glibc 2.35+) and macOS 15+ (Apple silicon/Intel). It retains the archive containing licenses under ~/.local/share/thepeer.stream/.

You can also install a draft release or build from source; see the installation guide.

Phone app

For a published release, download its signed thepeer.stream-TAG-android-arm64.apk from GitHub Releases, open it on your phone, and allow installation when Android prompts. Requires an arm64 phone running Android 8.0 or newer and a browser such as Chrome or Brave.

You can also install a draft release or build from source; see the installation guide.

How to

Share an app

On the computer running your web app (including over SSH):

thepeer share localhost:3000

Replace 3000 with the app’s port. Direct is tried first; for relay fallback, add --relay IP:PORT using a compatible relay you have permission to use. No relay is configured by default.

Open it on your phone

The sharing terminal's keyboard shortcuts switch between the connection string and its QR. In the Android app, tap Connect and scan the QR. The app opens the web app in your phone's browser. See CLI pairing.

Open it on another computer

Use the matching CLI version on the browsing computer:

thepeer connect

Paste the sharing terminal's connection string at the hidden prompt. Open the printed local URL in that computer's browser. See CLI pairing and Stop for session behavior and source-build instructions for a runnable example.

Features

  • ✅ HTTP, API writes, cookies, local redirects, SSE and WebSockets within bounded HTTP/resource policies.
  • ✅ No VPN or system proxy required.
  • ✅ Local targets: localhost:PORT, 127.0.0.1:PORT, [::1]:PORT, or a hostname that resolves only to loopback addresses.
  • ✅ Hostnames resolved once before pairing.
  • ❌ Remote targets, URL-form targets and HTTPS upstreams are not supported.

Packages

crates/tunnel-core/       Offers, planning, authentication, HTTP, owned cleanup
crates/tunnel-android/    JNI and foreground/Stop ownership
crates/cli/              Share/connect CLI, text/QR pairing, desktop browser gateway
apps/android-controller/ Android UI, scanner, service and Gradle
tests/fixtures/          Disposable localhost application for host/phone checks

Keep live offers private. Copy the connection string only through a trusted terminal; never put it in a command, file, screenshot or log. Scan QRs with the app, not a generic scanner that might send them to search.

License

MIT. See third-party licensing for dependency notices.

About

Post-quantum-secure, peer-to-peer tunneling for local services.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages