Crate connection_checker

Source
Expand description

§connection-checker

Use methods to test connections to Tor: directly or by using pluggable transports snowflake, obfs4, and meek

§Intro

This project aims to illustrate how to make connections to Tor using different methods, and uses those to create a tool that users can run to see if they can connect to the Tor network in any way from their own networks.

For more info on pluggable transports, you can refer to these docs

§Usage

Run the program: cargo run

By default only a direct Tor connection is tested. In order to test other pluggable transports, we can pass the path to the PT binary to the program.

For example, if you wished to test an obfs4 and snowflake connection, pass --snowflake-path snowflake-client --obfs4-client lyrebird, where lyrebird is the path to the obfs4 pluggable transport binary and snowflake-client is the Snowflake counterpart

You can also optionally specify a different host:port than the default torproject.org:80 to be tested by passing the value using the --connect-to argument.

For more information please refer to cargo run -- --help

The program can test connections using snowflake, obfs4, and meek, and thus requires the pluggable transports which are to be tested are already installed. To install the pluggable transports, you can check your package manager or build “lyrebird”, “meek” and “snowflake” from source, obtainable from the corresponding Tor Project’s GitLab repositories

§Disclaimer

The connection-checker is experimental, not for production use. It’s intended for experimental purposes, providing insights into connection methods.

Structs§

Opts 🔒
Test connections to the Tor network via different methods

Enums§

ConnType 🔒
Denotes the connection type

Constants§

MEEK_BRIDGE_LINE 🔒
Test bridge we will use for validating meek connections
OBFS4_BRIDGE_LINE 🔒
Test bridge we will use for validating obfs4 connections
SNOWFLAKE_BRIDGE_LINE 🔒
Test bridge we will use for validating snowflake connections

Functions§

build_circuit 🔒
Connect to a sample host and print the path it used to get there. Note that due to the way Tor works, other requests may use a different path than the one we obtain using this function, so this is mostly for demonstration purposes.
build_pt_config 🔒
Attempts to build a pluggable transport-enabled TorClientConfig using the supplied data
main 🔒
Main function ends up running most of the tests one by one
test_connection_via_config 🔒
Reconfigure a given TorClient and try getting the circuit