aboutsummaryrefslogtreecommitdiff
path: root/src/app
AgeCommit message (Collapse)Author
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-14Merge remote-tracking branch 'asn-github/adaptive_padding-final'Nick Mathewson
2019-01-09Merge branch 'maint-0.3.5'Nick Mathewson
2019-01-09Fix (and make consistent) the use of OpenBSD preprocessor macro testsKris Katterjohn
Prior to this commit, the testsuite was failing on OpenBSD. After this commit the testsuite runs fine on OpenBSD. It was previously decided to test for the OpenBSD macro (rather than __OpenBSD__, etc.) because OpenBSD forks seem to have the former macro defined. sys/param.h must be included for the OpenBSD macro definition; however, many files tested for the OpenBSD macro without having this header included. This commit includes sys/param.h in the files where the OpenBSD macro is used (and sys/param.h is not already included), and it also changes some instances of the __OpenBSD__ macro to OpenBSD. See commit 27df23abb675ffeb198bf0c1cc85c4baed77a988 which changed everything to use OpenBSD instead of __OpenBSD__ or OPENBSD. See also tickets #6982 and #20980 (the latter ticket is where it was decided to use the OpenBSD macro). Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2019-01-02Config option to specify specific MiddleNodes.Mike Perry
Hope is this will make it easier to test on the live tor network. Does not need to be merged if we don't want to, but will come in handy for researchers. Co-authored-by: George Kadianakis <desnacked@riseup.net>
2019-01-02Initialize circuit padding machines and global state.Mike Perry
Co-authored-by: George Kadianakis <desnacked@riseup.net>
2018-12-21Merge branch 'orconn-tracker_squashed'Nick Mathewson
2018-12-21Fix priority on process subsystem level: it uses "net"Nick Mathewson
2018-12-21Use the subsystem list to initialize and shutdown process module.Alexander Færøy
This patch makes the process module use the subsystem list for initializing and shutting down. See: https://bugs.torproject.org/28847
2018-12-20Add bootstrap tracker subsystemTaylor Yu
Add a tracker for bootstrap progress, tracking events related to origin circuit and ORCONN states. This uses the ocirc_event and orconn_event publish-subscribe subsystems. Part of ticket 27167.
2018-12-20Add origin circuit event pubsub systemTaylor Yu
Add a publish-subscribe subsystem to publish messages about changes to origin circuits. Functions in circuitbuild.c and circuitlist.c publish messages to this subsystem. Move circuit event constants out of control.h so that subscribers don't have to include all of control.h to take actions based on messages they receive. Part of ticket 27167.
2018-12-20Add ORCONN event pubsub systemTaylor Yu
Add a publish-subscribe subsystem to publish messages about changes to OR connections. connection_or_change_state() in connection_or.c and control_event_or_conn_event() in control.c publish messages to this subsystem via helper functions. Move state constants from connection_or.h to orconn_state.h so that subscribers don't have to include all of connection_or.h to take actions based on changes in OR connection state. Move event constants from control.h for similar reasons. Part of ticket 27167.
2018-12-20Remove Process initializer/shutdown function from main.c.Alexander Færøy
See: https://bugs.torproject.org/28847
2018-12-18Merge branch 'maint-0.3.5'Nick Mathewson
2018-12-18Merge branch 'bug28612_squashed' into maint-0.3.5Nick Mathewson
2018-12-18Call run_tor_main_loop() in ntmain.c, rather than do_main_loop().Nick Mathewson
Fixes bug 28612; bugfix on 0.3.5.3-alpha.
2018-12-18Merge branch 'maint-0.3.5'Nick Mathewson
2018-12-18Always initialize addr in parse_port_config()Nick Mathewson
It was always analyzed before use, but scan-build wasn't able to persuade itself of that. Closes ticket 28881.
2018-12-18Merge remote-tracking branch 'tor-github/pr/595'Nick Mathewson
2018-12-17Merge branch 'ticket28179_squashed' into ticket28179_squashed_mergedNick Mathewson
2018-12-17Move remaining code from subprocess.{h,c} to more appropriate places.Alexander Færøy
This patch moves the remaining code from subprocess.{h,c} to more appropriate places in the process.c and process_win32.c module. We also delete the now empty subprocess module files. See: https://bugs.torproject.org/28179
2018-12-17Add new Process subsystem.Alexander Færøy
This patch adds a new Process subsystem for running external programs in the background of Tor. The design is focused around a new type named `process_t` which have an API that allows the developer to easily write code that interacts with the given child process. These interactions includes: - Easy API for writing output to the child process's standard input handle. - Receive callbacks whenever the child has output on either its standard output or standard error handles. - Receive callback when the child process terminates. We also support two different "protocols" for handling output from the child process. The default protocol is the "line" protocol where the process output callbacks will be invoked only when there is complete lines (either "\r\n" or "\n" terminated). We also support the "raw" protocol where the read callbacks will get whatever the operating system delivered to us in a single read operation. This patch does not include any operating system backends, but the Unix and Windows backends will be included in separate commits. See: https://bugs.torproject.org/28179
2018-12-14allow any value for HearbeatPeriod in testing Tor networksRob Jansen
2018-12-13Merge branch 'dormant_persist_squashed'Nick Mathewson
2018-12-11Merge branch 'maint-0.3.4' into maint-0.3.5Nick Mathewson
2018-12-11Merge branch 'maint-0.3.5'Nick Mathewson
2018-12-05Merge remote-tracking branch 'tor-github/pr/508'Nick Mathewson
2018-12-04Add an option to start tor in dormant mode for the first time.Nick Mathewson
2018-12-04Remember in our state file how long we've spent since user activityNick Mathewson
Rather than initializing the "Dormant" status to "off" and the "last activity" count to "now", initialize them based on our state file: stay dormant if we were dormant, or remember the amount of time we've spent inactive.
2018-12-01Merge branch 'ticket27490a_squashed'Nick Mathewson
2018-12-01Add new option ClientAutoIPv6ORPort to switch between IPv4 and IPv6 OR portsNeel Chauhan
2018-12-01Move net.inet.ip.random_id code to lib/net/Nick Mathewson
2018-12-01Merge remote-tracking branch 'tor-github/pr/527'Nick Mathewson
2018-11-26Add options to control dormant-client feature.Nick Mathewson
The DormantClientTimeout option controls how long Tor will wait before going dormant. It also provides a way to disable the feature by setting DormantClientTimeout to e.g. "50 years". The DormantTimeoutDisabledByIdleStreams option controls whether open but inactive streams count as "client activity". To implement it, I had to make it so that reading or writing on a client stream *always* counts as activity. Closes ticket 28429.
2018-11-19Complain if net.inet.ip.random_id is not set on FreeBSD-based serversFabian Keil
Apparently a couple of operators haven't gotten the memos [0] yet and it looks like FreeBSD's default value will not change any time soon [1]. [0]: https://lists.torproject.org/pipermail/tor-relays/2014-March/004199.html https://lists.torproject.org/pipermail/tor-relays/2014-November/005687.html https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195828 [1]: https://lists.freebsd.org/pipermail/freebsd-net/2015-April/041942.html
2018-11-15Make the NET_PARTICIPANT role dependent on user activityNick Mathewson
This patch implements all of 28337, except for the part where we turn off the role if we've been idle for a long time.
2018-11-15Turn second_elapsed_callback into a normal periodic event.Nick Mathewson
2018-11-14Add an include to main.cNick Mathewson
2018-11-14Remove dependency on lib/net from lib/sandbox.Nick Mathewson
This was trivial, and the easiest way to remove the remaining .may_include circularities.
2018-11-14Move buffers.c out of lib/containers to resolve a circularity.Nick Mathewson
2018-11-09Annotate subsystem list with their levels.Nick Mathewson
2018-11-09Merge branch 'subsystems'Nick Mathewson
2018-11-09Log before performing a subsystem operationNick Mathewson
2018-11-09Add list of levels in subsystem_list.cNick Mathewson
2018-11-07Merge branch 'ticket27225_squashed'Nick Mathewson
2018-11-07Memoize summarize_protover_flags()Nick Mathewson
Our tests showed that this function is responsible for a huge number of our malloc/free() calls. It's a prime candidate for being memoized. Closes ticket 27225.
2018-11-06Merge remote-tracking branch 'tor-github/pr/484' into maint-0.3.5Nick Mathewson
2018-11-05Make tortls use the subsystems interfaceNick Mathewson
This one only needs a shutdown right now.
2018-11-05Turn "compress" into a subsystem.Nick Mathewson
2018-11-05Move monotonic time setup into a subsystemNick Mathewson