Giter Club home page Giter Club logo

nocontactinfo_exit_excluder's Introduction

noContactInfo Tor Exit Relay Excluder

Tor (Browser) does not have an option to allow users to say "do not use tor exit relays without ContactInfo in the exit position". This script virtually implements such an option.

Setting a tor relay ContactInfo is considered an expectations for tor relay operators.

This proof-of-concept script connects to a tor client daemon via the tor control socket and tells it to avoid exit relays that have no ContactInfo set. It uses the ExcludeExitNodes torrc configuration option, that means the excluded exits will only be avoided in the exit position but continue to be used for other tor circuit positions (first and second hop). Tor exit relays are in the position to manipulate non-encrypted traffic and malicious exit relays usally pose a higher risk to tor users than malicious middle relays.

The configuration change triggered by this script is non-persistent, meaning that restarting Tor (Browser) will revert the change.

For every excluded exit relay the URL for the Relay Search page is written to standardout.

If the current tor daemon configuration already has an exit relay exclusion list it aborts and does not change the configuration.

The script also excludes relays that allow exiting but do not have the exit flag if they do not have a ContactInfo set.

Tor (Browser) must be running when the script is invoked.

Example Output

Excluded exit relays:
https://metrics.torproject.org/rs.html#details/BBE2858B38C2E21310B182A84D951C27B366F00F
https://metrics.torproject.org/rs.html#details/7EECBAB900DFD29BF5F07AAD41EAF1E2BFF467E9
https://metrics.torproject.org/rs.html#details/9493135BC3EC01A29707EACA058FCEBD619F3BB1
[...]
##################################################################################
Excluded a total of 178 exit relays without ContactInfo from the exit position.
This tor configuration change is not permanently stored (non-persistent). A Tor Browser restart will revert this change.

torrc Dependencies

The script depends on two torrc options, that must be present in the torrc file (Browser/TorBrowser/Data/Tor/torrc) before Tor Browser is started.

Choose a suitable path for the ControlSocket file (that only your user can access) in your home folder, replace the "-replace-me-" string here and in the script. When tor starts it will create the file.

ControlSocket /home/-replace-me-/.tor-control.socket
UseMicrodescriptors 0

Python Dependencies

  • stem - tested with version 1.8.0

Warning

This is an experimental proof-of-concept script!

nocontactinfo_exit_excluder's People

Contributors

nusenu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nocontactinfo_exit_excluder's Issues

disable UseMicrodescriptors temporarily only

Currently we have to add the following line to the torrc

UseMicrodescriptors 0

but we could set that on the fly so they are only fetched once?

when starting:

controller.set_conf('UseMicrodescriptors', '0')

wait until the download completed

at the end:

controller.set_conf('UseMicrodescriptors', '1')

This will make the script run longer because it needs to wait until descriptors are fetched.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.