summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-proto: Preserve the ChannelMethod, not the SocketAddrNick Mathewson2022-10-064-33/+64
|
* ChannelMethod: Add method to access the (optional) SocketAddrNick Mathewson2022-10-061-0/+18
|
* Add builders for OwnedChanTarget/OwnedCircTargetNick Mathewson2022-10-063-13/+63
| | | | | This will become the preferred way to make one of these objects, and insulate us against future API changes.
* Begin revising HasAddr and its relationship to ChanTargetNick Mathewson2022-10-069-17/+87
| | | | | | | | | | | | | | | | | | | 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-067-68/+206
|\ | | | | | | | | 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.
| * netdoc: Add accessors for protocols and ntor key.Nick Mathewson2022-10-041-0/+11
| | | | | | | | | | These are needed to actually be able to build circuits through a bridge.
| * 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.
| * tor-netdoc: Add relay ID accessors for RouterDesc.Nick Mathewson2022-10-042-7/+27
| | | | | | | | | | | | | | | | | | To implement a reasonable RsaIdentity accessor, we have to store the RsaIdentity in the RouterDesc, or else we'd have to recalculate it using SHA1 and DER every time. The Ed25519 identity is hidden inside the identity cert, but it's safe to get a reference to it.
* | Merge branch 'workaround_589' into 'main'eta2022-10-061-0/+5
|\ \ | | | | | | | | | | | | Temporarily suppress a false positive from nightly. See merge request tpo/core/arti!754
| * | 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.
* | | remove manual limitation of coredump sizetrinity-1686a2022-10-052-5/+0
| | | | | | | | | | | | it's already disabled by secmem_proc
* | | feature-gate some functions requiring PreferredRuntimetrinity-1686a2022-10-051-1/+10
| |/ |/|
* | n_key_set: Fix bugs in API documentation.Nick Mathewson2022-10-041-6/+6
| | | | | | | | | | For whatever reason, rustdoc didn't like these multiline strings in `doc` attributes.
* | tor-linkspec: ByRelayIds<> type to hold a set of HasRelayIdsNick Mathewson2022-10-045-1/+68
| | | | | | | | | | This is based on the type generated with n_key_set, with a couple of extra methods to take advantage of RelayId and RelayIdRef.
* | n_key_set: Wrap "where" clauses in square brackets too.Nick Mathewson2022-10-041-7/+7
| | | | | | | | Otherwise, there is a parsing ambiguity. :(
* | n_key_set: Rename generic parameters on functions.Nick Mathewson2022-10-041-11/+11
| | | | | | | | | | Previously we used `<T>` in a bunch of places. But that fails if you try to declare `T` as a parameter on the structure itself.
* | n_key_set: Add a try_insert().Nick Mathewson2022-10-041-8/+30
|/ | | | I am finding as I use this that I want a variant that can't panic.
* Merge branch 'bridge-parse' into 'main'Ian Jackson2022-10-035-13/+599
|\ | | | | | | | | 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: transport ID error: Fix style to remove full stopIan Jackson2022-10-031-1/+1
| |
| * pt: Check PT key=value syntaxIan Jackson2022-10-032-5/+27
| | | | | | | | | | 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-033-6/+27
| | | | | | | | | | | | 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: PtTransportAddr: change None string to "-"Ian Jackson2022-10-031-2/+2
| | | | | | | | | | This is going to appear in config files etc. We don't want the user to have to type "<none>" in a bridge line.
| * 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
| |
| * pt: Provide accessors for PtTargetIan Jackson2022-09-301-1/+15
| |
| * 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-302-4/+4
| | | | | | | | I wanted this for testing. I think it's reasonable to promise this.
| * pt: Provide constructors for PtTargetIan Jackson2022-09-301-5/+23
| | | | | | | | | | | | | | | | Make PtTargetSettings be Default. No longer wrap it in Arc. We want to be able to update it here during construction. If we want to save memory with copies of the same bridge line, we should do this for the whole Bridge I think.
| * tor-error::internal: Remove a redundant suppressionIan Jackson2022-09-301-1/+0
| | | | | | | | Spotted this in passing.
* | Merge branch 'new-libfuzzer' into 'main'Nick Mathewson2022-10-036-6/+6
|\ \ | | | | | | | | | | | | Upgrade all fuzzers to newer libfuzzer-sys version. See merge request tpo/core/arti!752
| * | Upgrade all fuzzers to newer libfuzzer-sys version.Nick Mathewson2022-10-036-6/+6
| | |
* | | Merge branch 'hostname-validation' into 'main'Nick Mathewson2022-10-032-18/+2
|\ \ \ | |/ / |/| | | | | | | | Use hostname-validator crate for hostname validation See merge request tpo/core/arti!739
| * | Use hostname-validator crate for hostname validationReylaba2022-10-032-18/+2
| | |
* | | Remove semver.md files now that arti 1.0.1 is out.Nick Mathewson2022-10-036-9/+0
| | |
* | | Merge branch 'multi_keyed_set' into 'main'Nick Mathewson2022-10-033-0/+572
|\ \ \ | | | | | | | | | | | | | | | | Include a HashSet variant that can be keyed on multiple keys. See merge request tpo/core/arti!747
| * | | n_key_set: fix doctest compilation.Nick Mathewson2022-10-031-2/+2
| | | |
| * | | n_key_set: Update generic syntaxNick Mathewson2022-10-031-12/+14
| | | | | | | | | | | | | | | | Doing this lets us work with defaults and const generics.
| * | | n_key_set: rename map elements.Nick Mathewson2022-10-031-9/+9
| | | | | | | | | | | | | | | | This prevents an explosion if somebody has a key called "values".
| * | | n_key_set: Add support for generic lifetimes.Nick Mathewson2022-10-031-6/+48
| | | | | | | | | | | | | | | | | | | | It doesn't work for const generics yet, since they can't be repeated in quite the same way.
| * | | Tweaks and improvements in documentation.Nick Mathewson2022-10-031-7/+16
| | | | | | | | | | | | | | | | Most of these were suggested by Ian
| * | | Require slab 0.4.4Nick Mathewson2022-10-031-1/+1
| | | | | | | | | | | | | | | | The `try_remove()` method, which we need, was introduced there.