tor/scripts
Alexander Færøy 5f61e19d8a Expose TOR_PT_OUTBOUND_BIND_ADDRESS_{V4,V6} to Pluggable Transports.
This patch adds support for exposing the environment variables
`TOR_PT_OUTBOUND_BIND_ADDRESS_V4` and `TOR_PT_OUTBOUND_BIND_ADDRESS_V6` to
Pluggable Transport proccesses. These two values will contain the IPv4
and IPv6 address that the user have specified in torrc that they wish
the PT to use for all outgoing IP packets.

It is important to note here that it is up to the indvidual Pluggable
Transport if they are willing to honor these values or ignore them
completely.

One can test this feature using the following dummy PT written in POSIX
shell script:

    #!/bin/sh

    echo "LOG SEVERITY=warning MESSAGE=\"Value for IPv4: ${TOR_PT_OUTBOUND_BIND_ADDRESS_V4}\""
    echo "LOG SEVERITY=warning MESSAGE=\"Value for IPv6: ${TOR_PT_OUTBOUND_BIND_ADDRESS_V6}\""

    while true ; do
        sleep 1
    done

with the following entries in your torrc:

    OutboundBindAddressPT 203.0.113.4
    OutboundBindAddress 203.0.113.5
    OutboundBindAddressPT 2001:db8::4
    OutboundBindAddress 2001:db8::5

See: https://bugs.torproject.org/5304
2020-10-06 09:30:11 -04:00
..
ci Add a few more options for the CI script. 2020-09-21 12:58:49 -04:00
coccinelle Makefile/git scripts: Add comments to keep owned file lists in sync 2019-12-20 09:35:18 +10:00
codegen Add support for patterns on %include #25140 2020-07-15 22:01:08 +01:00
git Remove 0.4.2 from list of branches in git script: it has reached EOL. 2020-09-15 09:00:44 -04:00
maint Expose TOR_PT_OUTBOUND_BIND_ADDRESS_{V4,V6} to Pluggable Transports. 2020-10-06 09:30:11 -04:00
test python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
README Add scripts/test/chutney-git-bisect.sh, for bisecting using chutney 2018-08-24 12:46:04 +10:00

The scripts directory holds tools for use in building, generating, testing,
and maintaining the Tor source code.  It is mainly for use by developers.

Code maintenance scripts
------------------------

maint/checkLogs.pl -- Verify that Tor log statements are unique.

maint/check_config_macros.pl -- Look for autoconf tests whose results are
never used.

maint/checkOptionDocs.pl -- Make sure that Tor options are documented in the
manpage, and that the manpage only documents real Tor options.

maint/checkSpaces.pl -- Style checker for the Tor source code.  Mainly checks
whitespace.

maint/findMergedChanges.pl -- Find a set of changes/* files that have been
merged into an upstream version.

maint/format_changelog.py -- Flow the changelog into the proper format.

maint/redox.py -- Find places that should have DOCDOC comments to indicate a
need for doxygen comments, and put those comments there.

maint/updateVersions.pl -- Update the version number in the .nsi and windows
orconfig.h files.


Testing scripts
---------------

test/chutney-git-bisect.sh -- a git bisect run script that bisects using
chutney. The script builds tor and tor-gencert, then runs chutney. The script
takes optional arguments for out-of-tree builds, and specific chutney network
flavours. You should copy this script before using it with git bisect, so that
it doesn't change (or disappear) during bisection.

test/cov-blame -- Mash up the results of gcov with git blame.  Mainly useful
to find out who has been writing untested code.

test/cov-diff -- Compare two directories of gcov files to identify changed
lines without coverage.

test/coverage -- Generates a directory full of gcov files. You need to use
this script instead of calling gcov directly because of our confusingly named
object files.

test/scan-build.sh -- Example script for invoking clang's scan-build
static analysis tools.


Code generation scripts
-----------------------

codegen/gen_linux_syscalls.pl -- Generate a table mapping linux syscall
numbers to their names.

codegen/gen_server_ciphers.py -- Generate a sorted list of TLS ciphersuites
for servers to choose from.

codegen/get_mozilla_ciphers.py -- Generate a list of TLS ciphersuites for
clients to use in order to look like Firefox.

Code transformation scripts
---------------------------

coccinelle/calloc.cocci -- Transform code to replace variants of
malloc(a*b) with calloc(a,b)