mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
5f61e19d8a
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 |
||
---|---|---|
.. | ||
testdata | ||
.enable_practracker_in_hooks | ||
exceptions.txt | ||
includes.py | ||
metrics.py | ||
practracker_tests.py | ||
practracker.py | ||
problem.py | ||
README | ||
test_practracker.sh | ||
util.py |
Practracker is a simple python tool that keeps track of places where our code is ugly, and tries to warn us about new ones or ones that get worse. Right now, practracker looks for the following kinds of best-practices violations: .c files greater than 3000 lines long .h files greater than 500 lines long .c files with more than 50 includes .h files with more than 15 includes All files that include a local header not listed in a .may_include file in the same directory, when that .may_include file has an "!advisory" marker. The list of current violations is tracked in exceptions.txt; slight deviations of the current exceptions cause warnings, whereas large ones cause practracker to fail. For usage information, run "practracker.py --help".