summaryrefslogtreecommitdiff
path: root/src/feature
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-14Merge branch 'maint-0.3.5'Nick Mathewson
2019-01-14Rework rep_hist_log_link_protocol_counts()rl1987
2019-01-11Merge branch 'maint-0.3.5'Nick Mathewson
2019-01-11Merge remote-tracking branch 'tor-github/pr/563' into maint-0.3.5Nick Mathewson
2019-01-09Merge remote-tracking branch 'tor-github/pr/627'Nick Mathewson
2019-01-09Merge branch 'ticket28843'Nick Mathewson
2019-01-09Merge branch 'maint-0.3.5'Nick Mathewson
2019-01-09Stop logging 'Your Guard' in circpathbias.crl1987
2019-01-09Merge branch 'bug28591_035_squashed'Nick Mathewson
2019-01-09Dir: allow directory mirrors to serve future consensusesteor
When Tor's clock is behind the clocks on the authorities, allow Tor to serve future consensuses. Fixes bug 28654; bugfix on 0.3.0.1-alpha.
2019-01-09Merge branch 'ticket28856_v2'Nick Mathewson
2019-01-04Fix typo in bootstrap messageTaylor Yu
The message for the "ap_conn_proxy" bootstrap status tag was missing some text. Fixes bug 28929. Bug not in any released Tor.
2019-01-03Merge branch 'maint-0.3.5'Nick Mathewson
2019-01-03Merge branch 'ticket28879' into maint-0.3.5Nick Mathewson
2019-01-03Merge branch 'ticket28852'Nick Mathewson
2019-01-03Completely remove 'GETINFO status/version/num-{concurring,versioning}'rl1987
2019-01-02Concentrate all TOR_USEC_PER_SEC definitions in a single header file.George Kadianakis
Co-authored-by: Mike Perry <mikeperry-git@torproject.org>
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-02Circuit padding ProtoVer plumbing.Mike Perry
This helps us to determine if a middle node can pad to us or not. 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-21The big bootstrap phase redefinitionTaylor Yu
Redefine the set of bootstrap phases to allow display of finer-grained progress in the early connection stages of connecting to a relay. This includes adding intermediate phases for proxy and PT connections. Also add a separate new phase to indicate obtaining enough directory info to build circuits so we can report that independently of actually initiating an ORCONN to build the first application circuit. Previously, we would claim to be connecting to a relay when we had merely finished obtaining directory info. Part of ticket 27167.
2018-12-21Hook up control_event_bootstrap() to btrack_orconnTaylor Yu
Replace a few invocations of control_event_bootstrap() with calls from the bootstrap tracker subsystem. This mostly leaves behavior unchanged. The actual behavior changes come in the next commit. Part of ticket 27167.
2018-12-21Add a comment about bto_update_best.Taylor Yu
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-20Escape the PT K/V data before sending it to the logger.Alexander Færøy
See: https://bugs.torproject.org/28846
2018-12-20Add support for STATUS messages from Pluggable Transports.Alexander Færøy
This patch adds support for the new STATUS message that PT's can emit from their standard out. The STATUS message uses the `config_line_t` K/V format that was recently added in Tor. See: https://bugs.torproject.org/28846
2018-12-20Use K/V parser to handle LOG messages for pluggable transports.Alexander Færøy
This patch changes the LOG pluggable transport message to use the recent K/V parser that landed in Tor. This allows PT's to specify the log severity level as well as the message. A mapping between the PT log severity levels and Tor's log serverity level is provided. See: https://bugs.torproject.org/28846
2018-12-18Merge branch 'ticket28839_v2_squashed'Nick Mathewson
2018-12-18Avoid a needless decode/re-encode step in assigning onion keysNick Mathewson
Previously we had decoded the asn.1 to get a public key, and then discarded the asn.1 so that we had to re-encode the key to store it in the onion_pkey field of a microdesc_t or routerinfo_t. Now we can just do a tor_memdup() instead, which should be loads faster.
2018-12-18Use a single path for all PEM-like objects in get_next_token()Nick Mathewson
Previously, we would decode the PEM wrapper for keys twice: once in get_next_token, and once later in PEM decode. Now we just do all of the wrapper and base64 stuff in get_next_token, and store the base64-decoded part in the token object for keys and non-keys alike. This change should speed up parsing slightly by letting us skip a bunch of stuff in crypto_pk_read_*from_string(), including the tag detection parts of pem_decode(), and an extra key allocation and deallocation pair. Retaining the base64-decoded part in the token object will allow us to speed up our microdesc parsing, since it is the asn1 portion that we actually want to retain.
2018-12-18Revert "Log bootstrap tag names"Nick Mathewson
This reverts commit 1b855af5e33189d70d74273af03a535c343b63a5.
2018-12-17Merge branch 'ticket28179_squashed' into ticket28179_squashed_mergedNick Mathewson
2018-12-17Add an additional space when we check for the PROTO_LOG handler.Alexander Færøy
See: https://bugs.torproject.org/28179
2018-12-17Use `const char *` instead of `char *` for line parameter for process callbacks.Alexander Færøy
This patch changes the type definition of the process callbacks to use `const char *` instead of `char *`. See: https://bugs.torproject.org/28179
2018-12-17Change EVENT_TRANSPORT_LOG to EVENT_PT_LOG.Alexander Færøy
This patch changes our EVENT_TRANSPORT_LOG event to be EVENT_PT_LOG. The new message includes the path to the PT executable instead of the transport name, since one PT binary can include multiple transport they sometimes might need to log messages that are not specific to a given transport. See: https://bugs.torproject.org/28179
2018-12-17Change the Process exit_callback to return bool.Alexander Færøy
This patch changes our process_t's exit_callback to return a boolean value. If the returned value is true, the process subsystem will call process_free() on the given process_t. See: https://bugs.torproject.org/28179
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-17Delete old process_handle_t code.Alexander Færøy
This patch removes the old process_handle_t code. Everything should by now be using the process_t interface. See: https://bugs.torproject.org/28179
2018-12-17Add support for logging messages from pluggable transports.Alexander Færøy
This patch adds support for the "LOG" protocol message from a pluggable transport. This allows pluggable transport developers to relay log messages from their binary to Tor, which will both emit them as log messages from the Tor process itself, but also pass them on via the control port. See: https://bugs.torproject.org/28180 See: https://bugs.torproject.org/28181 See: https://bugs.torproject.org/28182
2018-12-17Use process_t for managed proxies.Alexander Færøy
This patch makes the managed proxy subsystem use the process_t data structure such that we can get events from the PT process while Tor is running and not just when the PT process is being configured. See: https://bugs.torproject.org/28179
2018-12-17Check hostname before using it in send_resolved_hostname_cell()Nick Mathewson
Also, turn an absent hostname into a BUG(), not a crash. Found by scan-build. Closes ticket 28879; bugfix on 0.1.2.7-alpha
2018-12-17Replace use of strcmp_len() with new mem_eq_token().Nick Mathewson
The strcmp_len() function was somewhat misconceived, since we're only using it to test whether a length+extent string is equal to a NUL-terminated string or not. By simplifying it and making it inlined, we should be able to make it a little faster. (It *does* show up in profiles.) Closes ticket 28856.
2018-12-14Remove a needless memset() in get_token_arguments()Nick Mathewson
I believe we originally added this for "just in case" safety, but it isn't actually needed -- we never copy uninitialized stack here. What's more, this one memset is showing up on our startup profiles, so we ought to remove it. Closes ticket 28852.
2018-12-14Use 25% less RAM for base64-encoded directory objectsNick Mathewson
We were allocating N bytes to decode an N-byte base64 encoding, when 3N/4 would have been enough.
2018-12-13Add a DROPOWNERSHIP controller command to undo TAKEOWNERSHIP.Nick Mathewson
Closes ticket 28843.
2018-12-13Merge branch 'maint-0.3.5'Nick Mathewson