MCPcopy Index your code
hub / github.com/center2055/BridgeHop

github.com/center2055/BridgeHop @v1.2.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.4 ↗ · + Follow
241 symbols 452 edges 31 files 66 documented · 27%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

BridgeHop

A lightweight, cross-platform Tor bridge reachability scanner with a modern UI.

BridgeHop

BridgeHop tests whether Tor bridges are reachable from your network across all bridge typesvanilla, obfs4, webtunnel, snowflake, meek, conjure, and dnstt — so you can quickly find bridges that actually work where you are. It ships with built-in bridge lists and live sources, and you can add your own.

Built with Tauri (a small Rust core + web UI) and a matching command-line companion that shares the same engine.

Features

  • Reachability checks for every transport
  • Fast TCP-connect probe for direct transports (vanilla, obfs4, …).
  • Front-host TLS probe on :443 for fronted/broker transports (snowflake, meek, conjure, dnstt, webtunnel) — a completed TLS handshake confirms fronting works.
  • Built-in lists & live sources — the community bridge collector (with mirror fallback), built-in defaults for fronted transports, and your own bridges (pasted or imported from a file). Fetched lists are cached and served (stale) when you're offline.
  • Deep verify (desktop) — optionally launch the real obfs4 client (lyrebird/obfs4proxy) to confirm an actual handshake; prompts you to install it if it's missing.
  • Scan history & reliability — every scan is recorded; the Library ranks bridges by uptime and latency across runs.
  • Import / export — plain lines, torrc, JSON files, and per-bridge QR codes for sharing.
  • CLI companion — scriptable scanning and exporting that shares the app's engine and database.
  • 8 languages — English, German, French, Russian, Simplified Chinese, South Azerbaijani, Central Kurdish, and Persian (right-to-left supported).
  • Modern, responsive UI — light/dark theming, live result streaming, and a mobile layout.

Architecture

crates/bridgehop-core   # parsing, scanning engine, sources, storage, import/export
crates/bridgehop-cli    # command-line companion (binary: `bridgehop`)
src-tauri               # Tauri desktop shell (thin command/event layer)
ui                      # SvelteKit + Tailwind front end (static SPA)

All logic lives in bridgehop-core; the desktop app and CLI are thin shells over it.

Building from source

Requirements: a recent stable Rust toolchain and Node.js 20+. (Linux also needs the WebKitGTK dev packages — see the release workflow for the exact list.)

# Install dependencies
npm install            # root: Tauri CLI
npm --prefix ui install

# Run the desktop app in dev mode
npm run dev

# Build the desktop app (installer/bundle)
npm run build

# Build & use the CLI
cargo build --release -p bridgehop-cli
target/release/bridgehop sources --list
target/release/bridgehop scan --source obfs4 --category tested
cargo test --workspace --exclude bridgehop-app

Android

BridgeHop also builds for Android (arm64). The desktop-only pieces — native file dialogs and deep verify, which spawns pluggable-transport clients — are compiled out; everything else (scanning every transport, live sources, history, QR) works on mobile.

Requires the Android SDK + NDK and a JDK 17. With ANDROID_HOME and NDK_HOME set:

rustup target add aarch64-linux-android
npm run tauri -- android init
npm run tauri -- android build --apk --debug --target aarch64
# → src-tauri/gen/android/app/build/outputs/apk/.../*.apk

CLI usage

bridgehop scan --file bridges.txt              # scan lines from a file
bridgehop scan --source all --category tested  # fetch from a source, then scan
cat bridges.txt | bridgehop scan               # scan from stdin
bridgehop scan --file bridges.txt --format torrc > working.torrc  # save only working bridges
bridgehop sources obfs4 --category full-archive # fetch a list
bridgehop export --source snowflake --format torrc
bridgehop history                              # recent scan runs
bridgehop history --reliability                # per-bridge uptime leaderboard

Releases

The release workflow (run on a v* tag or manually) builds the desktop bundles for Windows, Linux, and macOS, the CLI for each platform, and an Android arm64 APK, and uploads them all to a draft GitHub Release. Code signing is left to the maintainer (configure the relevant secrets in the workflow); the Android APK is debug-signed for sideloading.

License

BridgeHop is free software, licensed under the GNU General Public License v3.0 or later.

Extension points exported contracts — how you extend this code

DeepResult (Interface)
(no doc)
ui/src/lib/ipc.ts
ScanResult (Interface)
(no doc)
ui/src/lib/ipc.ts
ScanRequest (Interface)
(no doc)
ui/src/lib/ipc.ts
RunSummary (Interface)
(no doc)
ui/src/lib/ipc.ts
Reliability (Interface)
(no doc)
ui/src/lib/ipc.ts

Core symbols most depended-on inside this repo

parse_bridge_line
called by 20
crates/bridgehop-core/src/parse/mod.rs
record_run
called by 6
crates/bridgehop-core/src/store/mod.rs
make_result
called by 6
crates/bridgehop-core/src/scan/mod.rs
http_client
called by 5
crates/bridgehop-core/src/sources/mod.rs
parse_bridge_lines
called by 5
crates/bridgehop-core/src/parse/mod.rs
import
called by 4
crates/bridgehop-core/src/io.rs
token
called by 4
crates/bridgehop-core/src/model.rs
fetch
called by 4
crates/bridgehop-core/src/sources/mod.rs

Shape

Function 174
Class 24
Method 23
Enum 10
Interface 10

Languages

Rust81%
TypeScript19%

Modules by API surface

ui/src/lib/ipc.ts26 symbols
crates/bridgehop-core/src/parse/mod.rs25 symbols
crates/bridgehop-cli/src/main.rs24 symbols
crates/bridgehop-core/src/model.rs19 symbols
crates/bridgehop-core/src/sources/mod.rs18 symbols
src-tauri/src/commands.rs17 symbols
crates/bridgehop-core/src/store/mod.rs16 symbols
crates/bridgehop-core/src/scan/deep/pt.rs15 symbols
crates/bridgehop-core/src/io.rs15 symbols
crates/bridgehop-core/src/scan/mod.rs12 symbols
ui/src/lib/update.svelte.ts8 symbols
ui/src/lib/i18n.svelte.ts8 symbols

For agents

$ claude mcp add BridgeHop \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact