aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.h
AgeCommit message (Collapse)Author
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-05Merge branch 'http_tunnel_squashed'Nick Mathewson
2017-09-05Export http-command parsing functions.Nick Mathewson
2017-08-28Fix compilation warning on old clangs.George Kadianakis
2017-08-24prop224: Add directory_request_fetch_set_hs_ident()David Goulet
Needed by the client when fetching a descriptor. This function checks the directory purpose and hard assert if it is not for fetching. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24test: Add tests for fetching descs and handling SOCKS conns.George Kadianakis
- Add tests that ensure that SOCKS requests for v2/v3 addresses get intercepted and handled. - Add test that stores and lookups an HS descriptor in the client-side cache. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24prop224: Add client code to handle fetched HS descriptors.George Kadianakis
This code handles received HS descriptors by storing them in the client-side HS cache. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08Do more type checking when setting HS idents.George Kadianakis
I repurposed the old directory_request_set_hs_ident() into a new directory_request_upload_set_hs_ident() which is only used for the upload purpose and so it can assert on the dir_purpose. When coding the client-side we can make a second function for fetch.
2017-08-08prop224: Directory function to upload descriptorDavid Goulet
This commit adds a directory command function to make an upload directory request for a service descriptor. It is not used yet, just the groundwork. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-07-07Merge branch 'bug17750_029_squashed'Nick Mathewson
2017-07-07Refactor exponential backoff multipliers into macrosteor
There are only so many times you can type "4".
2017-07-07Use download_status_get_next_attempt_at() more oftenteor
This guards against future occurrences of 17750.
2017-07-07Make clients try fallbacks before authoritiesteor
Make clients wait for 6 seconds before trying to download their consensus from an authority. Fixes bug 17750, bugfix on 0.2.8.1-alpha.
2017-05-22Log a warning if we receive a disallowed compression method for an anonymous ↵Alexander Færøy
connection. See: https://bugs.torproject.org/22305
2017-05-22Merge remote-tracking branch 'ahf/bugs/22305'Nick Mathewson
2017-05-22Ensure that only GZip and Zlib compression is handled for anonymous connections.Alexander Færøy
See: https://bugs.torproject.org/22305
2017-05-22Fix a compilation warning about duplicate typedefNick Mathewson
2017-05-22Set guard state on bridge descriptor fetches.George Kadianakis
We used to not set the guard state in launch_direct_bridge_descriptor_fetch(). So when a bridge descriptor fetch failed, the guard subsystem would never learn about the fail (and hence the guard's reachability state would not be updated).
2017-05-12Send "Accept-Encoding" to directory servers.Alexander Færøy
See: https://bugs.torproject.org/21667
2017-05-04New function to add additional headers to a directory requestNick Mathewson
2017-04-27Merge branch 'parse_accept_encoding'Nick Mathewson
2017-04-27Merge branch 'dirreq'Nick Mathewson
2017-04-25Tests for parse_accept_encodingNick Mathewson
2017-04-21Make directory_request_set_guard_state static.Nick Mathewson
2017-04-21Document the new directory_request_t API and add some assertionsNick Mathewson
2017-04-21Remove old directory_initiate_command_*() functions.Nick Mathewson
2017-04-21Have directory_get_from_all_authorities use requests.Nick Mathewson
2017-04-21continue refactoring directory API: remove initiate_command_rendNick Mathewson
This commit mainly moves the responsibility for directory request construction one level higher. It also allows a directory request to contain a pointer to a routerstatus, which will get turned into the correct contact information at the last minute.
2017-04-17Rename `zlib_compression_level_t` to `compression_level_t`.Alexander Færøy
See https://bugs.torproject.org/21663
2017-04-16Begin work to turn "directory request" into an objectNick Mathewson
This patch adds the object type, and makes all of the functions that used to feed into directory_initiate_command_rend() feed into that type instead.
2017-03-28Merge branch 'spooling_squashed'Nick Mathewson
2017-03-28Refactor the directory spool implementationNick Mathewson
The old implementation had duplicated code in a bunch of places, and it interspersed spool-management with resource management. The new implementation should make it easier to add new resource types and maintain the spooling code. Closing ticket 21651.
2017-03-15Run the copyright update script.Nick Mathewson
2017-01-30Restrict fuzzing to the directory headersteor
2016-12-19For fuzzing: Expose directory_handle_command.teor
(Nick extracted this patch from a larger patch by Teor.)
2016-11-30Use the new guard notification/selection APIs throughout TorNick Mathewson
This patch doesn't cover every case; omitted cases are marked with "XXXX prop271", as usual. It leaves both the old interface and the new interface for guard status notification, since they don't actually work in the same way: the new API wants to be told when a circuit has failed or succeeded, whereas the old API wants to know when a channel has failed or succeeded. I ran into some trouble with directory guard stuff, since when we pick the directory guard, we don't actually have a circuit to associate it with. I solved that by allowing guard states to be associated with directory connections, not just circuits.
2016-11-07Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-06Do not apply 'max_failures' to random-exponential schedules.Nick Mathewson
Fixes bug 20536; bugfix on 0.2.9.1-alpha.
2016-11-04Merge branch 'ticket17238_029_02-resquash'Nick Mathewson
Conflicts: src/or/rendclient.c src/or/rendcommon.c src/or/routerparse.c src/test/test_dir.c src/trunnel/ed25519_cert.h
2016-11-04test: Add prop224 directory fetch/upload unit testsGeorge Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Directory support for v3 descriptor fetchGeorge Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Directory support for v3 descriptor publishingDavid Goulet
Closes #19205 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-10-26Allow asking a bridge's own descriptor over one-hop connectionNick Mathewson
When we refactored purpose_needs_anonymity(), we made it so _all_ bridge requests required anonymity. But that missed the case that we are allowed to ask a bridge for its own descriptor. With this patch, we consider the resource, and allow "authority.z" ("your own descriptor, compressed") for a bridge's server descriptor to be non-anonymous. Fix for bug 20410; bug not in any released Tor.
2016-10-18Refactor to use purpose_needs_anonymity and remove is_sensitive_dir_purposeChelsea H. Komlo
2016-09-13Implement Prop #260: Single Onion Servicesteor (Tim Wilson-Brown)
Add experimental OnionServiceSingleHopMode and OnionServiceNonAnonymousMode options. When both are set to 1, every hidden service on a tor instance becomes a non-anonymous Single Onion Service. Single Onions make one-hop (direct) connections to their introduction and renzedvous points. One-hop circuits make Single Onion servers easily locatable, but clients remain location-anonymous. This is compatible with the existing hidden service implementation, and works on the current tor network without any changes to older relays or clients. Implements proposal #260, completes ticket #17178. Patch by teor & asn. squash! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Implement Prop #260: Single Onion Services Redesign single onion service poisoning. When in OnionServiceSingleHopMode, each hidden service key is poisoned (marked as non-anonymous) on creation by creating a poison file in the hidden service directory. Existing keys are considered non-anonymous if this file exists, and anonymous if it does not. Tor refuses to launch in OnionServiceSingleHopMode if any existing keys are anonymous. Similarly, it refuses to launch in anonymous client mode if any existing keys are non-anonymous. Rewrite the unit tests to match and be more comprehensive. Adds a bonus unit test for rend_service_load_all_keys().
2016-07-01Call purpose_needs_anonymity in authority_certs_fetch_missingteor (Tim Wilson-Brown)
2016-06-18Move exponential-random backoff computation out of ↵Andrea Shepard
download_status_schedule_get_delay() into separate function, per code review
2016-06-18Implement DL_SCHED_RANDOM_EXPONENTIAL support for download_status_tAndrea Shepard
2016-05-09avoid another redundant checkRoger Dingledine
we should avoid launching a consensus fetch if we don't want one, but if we do end up with an extra one, we should let the other checks take care of it.
2016-05-09get rid of the scattered checks to cancel a consensus fetchRoger Dingledine
We'll back off from the request in connection_ap_handshake_attach_circuit, or cancel it in connection_dir_close_consensus_fetches, and those are the only places we need to check.