aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr
Commit message (Collapse)AuthorAgeFilesLines
...
* | BridgeDescEvent: Change the sole variant to SomethingChangedIan Jackson2022-10-251-5/+17
|/ | | | And explain what this all means.
* Merge branch 'guards_as_bridges_part1' into 'main'Nick Mathewson2022-10-248-135/+255
|\ | | | | | | | | Allow GuardMgr to expose bridges as guards (part 1) See merge request tpo/core/arti!785
| * guardmgr: Refactor the interior of FirstHop.Nick Mathewson2022-10-244-45/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | Now it contains either an `OwnedChanTarget` or an `OwnedCircTarget`, which will let `GuardMgr` return bridges that can be used to make circuits. As part of this change, it was necessary to revise some address-modification functions that applied to filters and `OwnedChanTarget`. Now they do the smart thing, and remove only the address that are in the `ChanMethod`. This means that the addresses from HasAddrs are still accurate about which addresses the relay "has".
| * guardmgr: Hold FallbackDir in fallback::set::EntryNick Mathewson2022-10-213-43/+61
| | | | | | | | This resolves an old TODO, and will simplify our work a little.
| * guardmgr: Add bridges sample, encode sample ID in FirstHopId.Nick Mathewson2022-10-215-52/+88
| | | | | | | | | | | | | | | | | | | | | | | | The most important part of this commit is to make sure that each `FirstHopId` includes the `GuardSetSelector` from which the guard was selected. Doing this lets us be certain that when we report that a guard has succeeded or failed, we're reporting it in the right context. Additionally, this commit uses strum to make an iterator over the samples, so that we can make sure that our "for each sample" code is robust against future changes, and we don't miss the bridge sample.
* | tor-guardmgr: descs: Make BridgeDescError DynCloneIan Jackson2022-10-212-1/+5
| |
* | tor-guardmgr: descs: Make BridgeDescError into a traitIan Jackson2022-10-211-4/+15
|/
* Merge branch 'bridge-internal-apis' into 'main'Ian Jackson2022-10-201-3/+12
|\ | | | | | | | | Use BridgeConfig to identify bridges in two places See merge request tpo/core/arti!781
| * bridge descriptors: Change types of the descriptor cacheIan Jackson2022-10-201-3/+12
| | | | | | | | | | | | | | Now keyed by Arc<BridgeConfig>, and the values can be errors. Currently there is no implementation so there can't be any errors, but the error enum will become nonempty.
* | impl ChanTarget etc. for BridgeConfigIan Jackson2022-10-201-1/+17
|/
* fix a couple of spelling errors in guardmgrNick Mathewson2022-10-192-2/+2
|
* Merge branch 'readmes' into 'main'Nick Mathewson2022-10-121-93/+1
|\ | | | | | | | | | | | | Abolish maint/readme and use doc include Closes #603 See merge request tpo/core/arti!768
| * cargo fmt to remove blank linesIan Jackson2022-10-121-1/+0
| | | | | | | | | | | | | | Apparently cargo fmt doesn't like these, which my perl rune didn't delete. This commit is precisely the result of `cargo fmt`.
| * Replace all README copies in src/lib.rs with includesIan Jackson2022-10-121-92/+1
| | | | | | | | | | | | | | | | The feature we want is `#[doc = include_str!("README.md")]`, which is stable since 1.54 and our MSRV is now 1.56. This commit is precisely the result of the following Perl rune: perl -i~ -0777 -pe 's{(^//!(?!.*\@\@).*\n)+}{#![doc = include_str!("../README.md")]\n}m' crates/*/src/lib.rs
* | struct BridgeConfig: Rename from BridgeIan Jackson2022-10-123-17/+17
| | | | | | | | Fixes #599
* | struct Bridge: add ref to ticketIan Jackson2022-10-121-1/+1
|/
* tor-guardmgr: Export BridgeParseError from toplevelIan Jackson2022-10-121-1/+1
| | | | | Callers could `use` it as `tor_guardmgr::config::BridgeParseError` but it seems unecessary to force them to.
* Allow "clippy::single_char_pattern" in tests.Ian Jackson2022-10-122-0/+2
| | | | | | | This lint exists for perf reasons, and this is rarely relevant in tests. Using double quoted str is generally cognitively less burdensome.
* Change multiplicity of ChannelMethod and addressesNick Mathewson2022-10-112-8/+14
| | | | | | | Now each `ChanTarget` has at most one `ChannelMethod`, and only `Direct` `ChannelMethods` can have multiple addresses. Closes #600.
* tor-guardmgr: Fix build without pt-client featureIan Jackson2022-10-111-1/+3
|
* tor-linkspec: Remove the old OwnedFoo::new() functionsNick Mathewson2022-10-061-1/+7
| | | | These are now builders.
* Begin revising HasAddr and its relationship to ChanTargetNick Mathewson2022-10-064-1/+21
| | | | | | | | | | | | | | | | | | | HasAddr used to mean "Here are addresses that I have, at which I can be contacted." But "Where (and how) can I be contacted?" is now a question for HasChannelMethod to answer. (We still need to have "HasAddr", though, so we can answer things like "what country is this relay in" and "are these relays in the same /8?") So this commit introduces: * A new trait for adding an implementation of HasChannelMethod in terms of HasAddr. * A requirement on ChanTarget that it needs to implement HasChannelMethod. There is some temporary breakage here, marked with "TODO pt-client", that I'll fix later in this branch.
* Merge branch 'bridge_containers' into 'main'Nick Mathewson2022-10-065-61/+168
|\ | | | | | | | | Start implementing more data structures to hold Bridge descriptors. See merge request tpo/core/arti!755
| * Extend some comments about bridge descriptorsNick Mathewson2022-10-062-2/+11
| |
| * Add a temporary HasAddrs for BridgeRelayNick Mathewson2022-10-041-1/+10
| | | | | | | | See comment for an explanation of the next issue here.
| * BridgeRelay: Implement more traits.Nick Mathewson2022-10-042-2/+58
| | | | | | | | | | | | Also add a BridgeRelayWithDesc type (name tbd) to guarantee that a bridge relay really does have a known descriptor before you try to build a circuit with it.
| * Start on a new BridgeRelay type.Nick Mathewson2022-10-042-1/+41
| | | | | | | | | | | | | | | | This is the one we'll actually use to connect to bridges. It has a `Bridge` line, and an optional `BridgeDesc`. Maybe this will turn into a `BridgeRelay<'a>` by analogy to `Relay` some time; I'm not sure.
| * Implement HasRelayIds for Bridge.Nick Mathewson2022-10-041-1/+11
| |
| * Implement BridgeDesc and BridgeDescList.Nick Mathewson2022-10-041-58/+41
| | | | | | | | | | | | | | | | | | | | BridgeDesc is a separate type to make sure that we do not confuse bridges' descriptors with the descriptors from other routers down the road. (Bridges' descriptors need to be used differently, and treated as more private.) With this code, BridgerDescList is now just an alias for `ByRelayIds<BridgeDesc>`, which is pretty keen.
* | Temporarily suppress a false positive from nightly.Nick Mathewson2022-10-041-0/+5
|/ | | | | | Nightly rust gives a warning about this "pub use", but the warning is a false positive. Since it doesn't seem to be going away in a hurry, let's suppress it for now.
* Merge branch 'bridge-parse' into 'main'Ian Jackson2022-10-032-2/+516
|\ | | | | | | | | Parse (and format) bridge lines See merge request tpo/core/arti!745
| * pt: bridge line parsing: overhaul errorsIan Jackson2022-10-031-36/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | Include the offending word in all the applicable errors. Always print it with {word:?}. As a consequence, there are no From impls any more and error generation/conversion is by hand in all cases. Clarify InvalidPtOrAddr vs InvalidIAddrorPt, and don't make the attempted parse be a source error for those. Where we still have source errors, don't print them in Display.
| * pt: Check PT key=value syntaxIan Jackson2022-10-031-3/+0
| | | | | | | | | | This is not perfect but it at least ensures that our own parsing and printing code works correctly with all the values we accept.
| * pt: Make PtTarget::push_setting fallible, and take IntoIan Jackson2022-10-031-3/+8
| | | | | | | | | | | | It has its own error type PtTargetInvalidSetting. In check_doc_features, adjust suppression to new code.
| * pt: bridge line parsing: Add commentaryIan Jackson2022-10-031-0/+26
| |
| * pt: Document Bridge line syntaxIan Jackson2022-10-031-0/+31
| |
| * pt: bridge parsing: Add an IPv6 test caseIan Jackson2022-09-301-0/+12
| |
| * pt: impl Display for Bridge and test itIan Jackson2022-09-301-0/+43
| |
| * implement FromStr for Bridge, and test itIan Jackson2022-09-301-0/+327
| |
| * tor-guardmgr: Introduce pt-client featureIan Jackson2022-09-301-1/+3
| | | | | | | | | | guardmgr needs to know how to parse Bridge lines into Bridge structs so it needs to know about PTs specifically
| * pt: Make some more types EqIan Jackson2022-09-301-1/+1
| | | | | | | | I wanted this for testing. I think it's reasonable to promise this.
* | Remove semver.md files now that arti 1.0.1 is out.Nick Mathewson2022-10-031-2/+0
| |
* | Bump minor version of tor-rtcompat and most of its dependentsNick Mathewson2022-10-031-5/+5
| | | | | | | | | | | | | | (Since the APIs for the `Schedule::sleep*` functions changed, this is a breaking change in tor-rtcompat. Therefore, the Runtime trait in tor-rtcompat is now a different trait. Therefore, anything that uses the Runtime trait in its APIs has also broken.)
* | Bump crates that have had backward compatible API changes.Nick Mathewson2022-10-031-4/+4
|/
* Mark all bridge and pt features as experimental for now.Nick Mathewson2022-09-291-0/+2
| | | | | | Also, document the features. Closes #588.
* Add the necessary APIs for bridge-based circuit construction.Nick Mathewson2022-09-261-0/+10
|
* GuardMgr/DirMgr: Add APIs for bridge descriptor listsNick Mathewson2022-09-264-3/+114
|
* GuardMgr: Add TODOs for bridge support.Nick Mathewson2022-09-262-0/+29
| | | | | | This covers only the most basic notions of working with bridges: that we need a separate set of guards, and that they have to come from the list of known bridges.
* A basic configuration type for a bridge.Nick Mathewson2022-09-265-1/+66
| | | | | | | This type goes in tor-guardmgr, since that's where decisions about circuits' first hops are made. There are a lot of "todo"s here for us to resolve.
* Remove semver.md from arti-1.0.0Nick Mathewson2022-09-071-6/+0
|