aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* config exhaust checking: Move unrecognized lists earlierIan Jackson2022-10-121-3/+3
| | | | It turns out that we will need these even for uncommented parsing.
* arti config exhaust checking: Improve message, add commentIan Jackson2022-10-121-2/+4
| | | | I had a failure that was confusing to me, and I wrote it...
* Allow "clippy::single_char_pattern" in tests.Ian Jackson2022-10-1221-0/+21
| | | | | | | This lint exists for perf reasons, and this is rarely relevant in tests. Using double quoted str is generally cognitively less burdensome.
* Merge branch 'typo' into 'main'eta2022-10-111-2/+2
|\ | | | | | | | | tor-config: CfgPath: Fix two typos "expaneded" See merge request tpo/core/arti!764
| * tor-config: CfgPath: Fix two typos "expaneded"Ian Jackson2022-10-111-2/+2
| |
* | Merge branch 'disable_rtt_test' into 'main'eta2022-10-111-0/+5
|\ \ | | | | | | | | | | | | Disable rtt_test_vectors test on non-Linux platforms See merge request tpo/core/arti!766
| * | Disable rtt_test_vectors test on non-Linux platformsNick Mathewson2022-10-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test depends on `Duration` having a granularity of 1 nanosecond, which is not the case on OSX, and is probably not the case on other places too. We can re-enable this once we have a set of test vectors that use more realistic RTTs, and a set of testing code that tolerates some divergence. Temporary solution for #574.
* | | Fix a warning that I reintroduced.Nick Mathewson2022-10-111-0/+1
|/ / | | | | | | | | It looks like this got fixed, but my branch for !759 reintroduced it by refactoring.
* | Change multiplicity of ChannelMethod and addressesNick Mathewson2022-10-119-60/+63
| | | | | | | | | | | | | | Now each `ChanTarget` has at most one `ChannelMethod`, and only `Direct` `ChannelMethods` can have multiple addresses. Closes #600.
* | Make some things precisely conditionalIan Jackson2022-10-111-1/+6
| | | | | | | | | | | | | | I think this is quite an inconvenient way to be carrying on. Maybe we should disable all dead code warnings unless all features are also enabled, and just let the compiler get rid of unused stuff later.
* | tor-guardmgr: Fix build without pt-client featureIan Jackson2022-10-111-1/+3
| |
* | Allow two useless pattern matches that are going to be not uselessIan Jackson2022-10-112-0/+2
|/
* Merge branch 'progdir' into 'main'Ian Jackson2022-10-111-2/+42
|\ | | | | | | | | | | | | CfgPath: Add support for ${PROGRAM_DIR}. Closes #586 See merge request tpo/core/arti!760
| * CfgPath: Add support for ${PROGRAM_DIR}.Nick Mathewson2022-10-071-2/+42
| | | | | | | | | | | | | | | | | | | | | | `${PROGRAM_DIR}` expands to the equivalent of `std::env::current_exe().parent()`, with appropriate unwrapping and conversions. It is expected to be useful for finding the locations of pluggable transports in some kinds of bundles. Closes #586.
* | Make cargo-sort stop complainingeta2022-10-102-2/+2
| |
* | Fixed grammar mistakeEliTheCoder2022-10-081-1/+1
|/
* tor-cell fuzzer: test more features.Nick Mathewson2022-10-061-0/+1
|
* Clarify limits on socket address from ChannelMethodNick Mathewson2022-10-062-4/+10
|
* Move two users of HasAddrs to HasChannelMethodsNick Mathewson2022-10-062-4/+15
| | | | All the other users of HasAddrs are correct.
* tor-linkspec: Remove the old OwnedFoo::new() functionsNick Mathewson2022-10-0610-79/+124
| | | | These are now builders.
* 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.