summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* socksproto: fuze the handshake object on error.Nick Mathewson2020-12-171-1/+12
| | | | | | Found by fuzzing: without doing this, there are ways to make the SocksHandshake panic. I don't think any of them are reachable from the network assuming this crate is used correctly, but let's be safer.
* Run cargo fmtNick Mathewson2020-12-171-1/+4
|
* Merge branch 'mr_1_squashed' into mainNick Mathewson2020-12-174-4/+47
|\
| * Fixup! issue #34: adding support for xz2owen662020-12-103-14/+16
| |
| * issue #34: adding support for xz2owen662020-12-023-0/+41
| |
* | Simplification: Every relay is in the same family as itself.Nick Mathewson2020-12-172-7/+7
| |
* | Fix a few clippy warningsNick Mathewson2020-12-172-5/+8
| |
* | Merge remote-tracking branch 'origin/mr/8' into mainNick Mathewson2020-12-172-28/+26
|\ \
| * | Handle an error in circuit.rs without crashing.George Kadianakis2020-12-171-1/+4
| | |
| * | Simplify RelayCellBody::recognized() method.George Kadianakis2020-12-171-27/+22
| | | | | | | | | | | | | | | | | | self is no longer mutable. Co-authored-by: David Goulet <[email protected]>
* | | Merge remote-tracking branch 'origin/mr/6' into mainNick Mathewson2020-12-174-3/+45
|\ \ \
| * | | Make sure that a circuit doesn't use relays in the same familyLunar2020-12-164-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We implement `Relay::in_same_family` which is in turn used by `ExitPathBuilder::pick_path` to avoid picking relays in the same family. Compared to the original C implementation, we are missing support for options EnforceDistinctSubnets and NodeFamilySets. This has only been very lightly tested so far. Closes: #43
* | | | Merge remote-tracking branch 'origin/mr/7' into mainNick Mathewson2020-12-174-0/+97
|\ \ \ \
| * | | | Adds issue creation templates for bugs, features, proposals and documentation.Gaba2020-12-174-0/+97
| | |/ / | |/| |
* | | | Download and use consensus diffs.Nick Mathewson2020-12-173-18/+104
| | | | | | | | | | | | | | | | | | | | Had to refactor a few methods for database access, and fix a bug where we were storing valid_until times with the wrong information.
* | | | Add a function to see if a document looks like a diff.Nick Mathewson2020-12-171-0/+6
| | | |
* | | | Whoops: add fuzzers code.Nick Mathewson2020-12-173-0/+51
|/ / /
* | | Mention tor-consdiff in list of cratesNick Mathewson2020-12-171-0/+2
| | |
* | | consdiff: disallow usize::MAX as a line number.Nick Mathewson2020-12-171-1/+11
| | | | | | | | | | | | This prevents some overflow cases; found by fuzzing.
* | | Add a fuzzer to tor-consdiffNick Mathewson2020-12-171-8/+20
| | | | | | | | | | | | | | | This fuzzer checks both implementations and makes sure they give the same result.
* | | consdiff: move responsibility for checking sort order into iteratorNick Mathewson2020-12-171-23/+43
| | |
* | | More tests for tor-consdiff.Nick Mathewson2020-12-173-75/+191
| | |
* | | tor-consdiff: document everything.Nick Mathewson2020-12-172-33/+162
| | |
* | | consdiff: use real error messagesNick Mathewson2020-12-172-25/+26
| | |
* | | consdiff: extract Error type to new module.Nick Mathewson2020-12-173-19/+29
| | |
* | | Make the O(n^2) slow diff-apply algorithm off-by-default.Nick Mathewson2020-12-163-0/+9
| | |
* | | Handle the headers on our diff format correctly.Nick Mathewson2020-12-163-17/+77
| | |
* | | Implement the O(n) algorithm for applying diffsNick Mathewson2020-12-162-14/+111
| | |
* | | Initial work on client-side consensus diff code.Nick Mathewson2020-12-169-0/+669
|/ /
* | Write a few misc unit testsNick Mathewson2020-12-154-33/+103
| |
* | Basic support for IPv6 and begin flags.Nick Mathewson2020-12-155-20/+84
| | | | | | | | | | | | We now have a way to tell a circuitmgr whether we require ipv4/ipv6 support for a target address in an exit policy, and we use similar logic to set begin flags.
* | Use a set of named flags for BeginFlags in tor-cell.Nick Mathewson2020-12-152-6/+33
| |
* | dirmgr: Refactor so it has no unusable state.Nick Mathewson2020-12-153-46/+61
| | | | | | | | | | | | With this new API, if you have a DirMgr, it has a NetDir that was bootstrapped, and was live at least once during your program's execution.
* | Implement a notion of "circuit dirtiness", as in Tor.Nick Mathewson2020-12-151-6/+33
| |
* | Fix some clippy warnings.Nick Mathewson2020-12-151-3/+7
| |
* | circmgr: refactor and bugfix a bit.Nick Mathewson2020-12-141-28/+83
| | | | | | | | | | | | | | | | Notably, turn the hashmap into its own type. This will help with other refactoring and fixes in the future. Also notably, fix the code we use when a pending circuit is complete. There's still a design flaw there though.
* | tor-circmgr: update documentationNick Mathewson2020-12-142-2/+23
| |
* | Give more information if we fail to create a pending circuit.Nick Mathewson2020-12-142-5/+8
| |
* | Remove now-unused busted From<TargetCircUsage> for CircUsageNick Mathewson2020-12-141-19/+0
| |
* | tor-circmgr: always remove closed circuits from the list.Nick Mathewson2020-12-141-8/+8
| |
* | tor-circmgr: Use a better key type for our circuit map.Nick Mathewson2020-12-141-70/+88
| | | | | | | | | | | | | | We now use the unique id of each non-pending circuit as its key in the map. I wish I could do this without copying, but I don't see a great way to do that while keeping the pending entries in the same map for now.
* | Remember the actual usable ports for an exit after we've built a circuitNick Mathewson2020-12-144-52/+165
| | | | | | | | | | | | | | | | Previously we'd just remember the port that we _wanted_ a circuit for, and forget all the ports that it _could_ support. This is part of a bigger circmgr revision/refactoring pass; there should be cleanups before I merge this.
* | Add a "RetryError" to capture the idea of multiple failed attempts.Nick Mathewson2020-12-125-16/+157
| | | | | | | | | | | | When we try to do something a few times and it fails each time, it can be a good idea to remember why the individual failures happened.
* | Use anyhow::Context in tor-chanmgr.Nick Mathewson2020-12-112-3/+9
| |
* | Add more anyhow Contexts in client-mainNick Mathewson2020-12-111-6/+18
| |
* | Do not keep a NetDir alive just because we have a stream.Nick Mathewson2020-12-101-1/+1
| |
* | Merge remote-tracking branch 'origin/mr/5' into mainNick Mathewson2020-12-102-9/+26
|\ \
| * | Use anyhow crate to add extra context for various dirclient errors.George Kadianakis2020-12-102-9/+26
| | |
* | | Add a couple of anyhow contexts in main.rsNick Mathewson2020-12-101-3/+9
|/ /
* | Fix some rustdoc warnings.Nick Mathewson2020-12-097-9/+11
| |