Fast, concurrent OBFS4 Tor bridge reachability checker with a terminal UI
Project description
bridge-checker
A fast, concurrent reachability checker for Tor OBFS4 bridges, with an interactive terminal UI.
Bridges are unlisted Tor relays that help people get online in places where Tor is blocked or throttled. Public bridge lists rot quickly — many entries go offline — so this tool re-tests a list and tells you which bridges are actually up right now.
What it does
- Parses a plain-text list of
obfs4 ...bridge lines (from a file or a URL). - Opens a raw TCP connection to each
host:portconcurrently (default: 150 at once) and records whether it's reachable and how long it took. - Streams results into a live terminal UI, or runs headlessly for scripts/CI.
- Writes the working (and, optionally, failed) bridges back out to plain
bridge-list files you can drop straight into
torrc.
Note on what "reachable" means: this only proves the host is accepting TCP connections on that port — it does not perform the actual obfs4 handshake, which requires the real Tor/obfs4proxy stack. A bridge that passes this check is very likely a live relay, but a full Tor connection is the only true test.
Install
pip install -r requirements.txt
pip install -e .
Requires Python 3.10+. Only dependencies are textual
(the TUI) and rich (headless progress output).
Usage
Interactive TUI (default)
bridge-checker
With no arguments it fetches a default public bridge list and drops you into the TUI. Point it at your own list instead:
bridge-checker path/to/bridges.txt
bridge-checker https://example.com/my-bridges.txt
Keys: s start/refresh, w save working bridges to disk, q quit. You can
also change the source in the input field and click Start.
Headless / scripting mode
bridge-checker bridges.txt --no-tui --output working.txt --failed failed.txt
Loading bridges from bridges.txt …
Found 214 bridge(s). Checking with concurrency=150, timeout=4.0s …
✔ 203.0.113.4:443 212 ms
✘ 203.0.113.9:8443
...
checking ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 214/214 up 137 down 77 0:00:06
Results
Total checked : 214
Working : 137
Failed : 77
Time elapsed : 6.1s (35.1 bridges/s)
All options
usage: bridge-checker [-h] [--workers CONCURRENCY] [--timeout TIMEOUT]
[--output OUTPUT] [--failed FAILED] [--no-tui] [--quiet]
[--version]
[source]
positional arguments:
source Path to a local bridge list, or a URL to fetch one
from
options:
--workers, -w Number of concurrent connection attempts (default: 150)
--timeout, -t Per-connection timeout in seconds (default: 4.0)
--output, -o Where to write working bridges
--failed, -f Also write failed bridges to this file
--no-tui Run headlessly instead of the interactive TUI
--quiet, -q Headless mode only: summary output only
Project layout
bridge_checker/
models.py # Bridge / BridgeResult / RunStats dataclasses
parser.py # obfs4 line parsing
fetch.py # load a bridge list from a file or URL
checker.py # async concurrent TCP reachability checks
tui.py # Textual-based interactive UI
headless.py # rich-based non-interactive mode
cli.py # argument parsing / entry point
tests/
test_parser.py
Development
pip install -e ".[dev]"
pytest
Releasing
.github/workflows/publish.yml builds and publishes the package to PyPI
whenever a tag matching v*.*.* is pushed (e.g. v1.0.1), or when run
manually from the Actions tab. It uses
PyPI's trusted publishing via
OIDC, so no API token/secret is needed — just:
- Create a
pypienvironment on the PyPI project page and add this repository as a trusted publisher, pointing at thepublish.ymlworkflow. - Bump the
versioninpyproject.toml. - Push a matching tag:
git tag v1.0.1 && git push origin v1.0.1.
A separate .github/workflows/ci.yml runs the test suite on every push and
pull request.
Contributing
Issues and pull requests are welcome. Please keep changes small and covered by a test where practical.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bridge_checker-1.0.0.tar.gz.
File metadata
- Download URL: bridge_checker-1.0.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
916a8f54b30e5fadee7fd2ea45bde6605c76e9a1b9d2105bbf10214f36116915
|
|
| MD5 |
81261e38660081719444237df3917c17
|
|
| BLAKE2b-256 |
1046b7359bca6350ab0025874086289bdf000c61646f5061aa473c5a5bb64151
|
Provenance
The following attestation bundles were made for bridge_checker-1.0.0.tar.gz:
Publisher:
publish.yml on TrueNode-05/bridge-checker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bridge_checker-1.0.0.tar.gz -
Subject digest:
916a8f54b30e5fadee7fd2ea45bde6605c76e9a1b9d2105bbf10214f36116915 - Sigstore transparency entry: 2212637093
- Sigstore integration time:
-
Permalink:
TrueNode-05/bridge-checker@9f94f15d18fe142cd7f373db1bd38a0a533387fc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/TrueNode-05
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9f94f15d18fe142cd7f373db1bd38a0a533387fc -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file bridge_checker-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bridge_checker-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb79faf5aaa33233f81ccbea4b578842f9dcd668672062978338cd357b118646
|
|
| MD5 |
594434a4ecbe5cb8e1fb6c82e8deb50b
|
|
| BLAKE2b-256 |
9f0d0f058c1b8547979e10345e7008615f3f3bf89442865f37896e2530b284c4
|
Provenance
The following attestation bundles were made for bridge_checker-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on TrueNode-05/bridge-checker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bridge_checker-1.0.0-py3-none-any.whl -
Subject digest:
cb79faf5aaa33233f81ccbea4b578842f9dcd668672062978338cd357b118646 - Sigstore transparency entry: 2212637189
- Sigstore integration time:
-
Permalink:
TrueNode-05/bridge-checker@9f94f15d18fe142cd7f373db1bd38a0a533387fc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/TrueNode-05
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9f94f15d18fe142cd7f373db1bd38a0a533387fc -
Trigger Event:
workflow_dispatch
-
Statement type: