summaryrefslogtreecommitdiff
path: root/crates/tor-linkspec
Commit message (Collapse)AuthorAgeFilesLines
...
* Write more tests for RelayId and RelayIdRef.Nick Mathewson2022-10-151-0/+138
|
* Write tests for RelayIdSet.Nick Mathewson2022-10-152-0/+121
|
* Fix deserialize impl for RelayId.Nick Mathewson2022-10-151-1/+1
| | | | | | | We need to handle String, not just str, since some deserializers have to handle escapes and generate new strings. Found while writing tests; fixes #605.
* linkspec: impl Hash for RelayIdRefNick Mathewson2022-10-152-1/+3
|
* Fix some rustdoc errors.Nick Mathewson2022-10-131-1/+1
| | | | | | In addition to the usual "You named that method wrong!" errors, we have a new rustdoc error that complains about bogus "HTML tags" that are actually unquoted usage of types like `Result<Foo>`.
* Merge branch 'factory_redux' into 'main'Nick Mathewson2022-10-131-0/+33
|\ | | | | | | | | chanmgr: Build and use chanmgr factory APIs See merge request tpo/core/arti!769
| * Add several accessors to ChannelMethod.Nick Mathewson2022-10-121-0/+33
| | | | | | | | | | | | * Get `TransportId` * Get the target address (of any type) * Ask, "is this a direct connection"?
* | 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-55/+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
* 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-114-34/+35
| | | | | | | Now each `ChanTarget` has at most one `ChannelMethod`, and only `Direct` `ChannelMethods` can have multiple addresses. Closes #600.
* Allow two useless pattern matches that are going to be not uselessIan Jackson2022-10-111-0/+1
|
* Clarify limits on socket address from ChannelMethodNick Mathewson2022-10-061-2/+8
|
* Move two users of HasAddrs to HasChannelMethodsNick Mathewson2022-10-061-2/+4
| | | | All the other users of HasAddrs are correct.
* tor-linkspec: Remove the old OwnedFoo::new() functionsNick Mathewson2022-10-061-56/+21
| | | | These are now builders.
* 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-064-15/+62
| | | | | | | | | | | | | | | | | | | 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.
* 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.
* Merge branch 'bridge-parse' into 'main'Ian Jackson2022-10-032-10/+83
|\ | | | | | | | | Parse (and format) bridge lines See merge request tpo/core/arti!745
| * pt: transport ID error: Fix style to remove full stopIan Jackson2022-10-031-1/+1
| |
| * pt: Check PT key=value syntaxIan Jackson2022-10-031-2/+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-032-3/+19
| | | | | | | | | | | | It has its own error type PtTargetInvalidSetting. In check_doc_features, adjust suppression to new code.
| * 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: Provide accessors for PtTargetIan Jackson2022-09-301-1/+15
| |
| * pt: Make some more types EqIan Jackson2022-09-301-3/+3
| | | | | | | | 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.
* | Remove semver.md files now that arti 1.0.1 is out.Nick Mathewson2022-10-031-1/+0
| |
* | Bump crates that have had backward compatible API changes.Nick Mathewson2022-10-031-2/+2
| |
* | Update README.md files.Nick Mathewson2022-09-301-0/+18
|/
* Mark all bridge and pt features as experimental for now.Nick Mathewson2022-09-292-0/+20
| | | | | | Also, document the features. Closes #588.
* pt: Reject a pluggable transport named BridgeIan Jackson2022-09-271-0/+5
| | | | https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/91
* Remove docsrs thing which is in wrong place?Ian Jackson2022-09-271-1/+0
|
* pt: Try to fix docsrs problemIan Jackson2022-09-271-0/+1
|
* pt: Use PtTransportName in PtTargetIan Jackson2022-09-271-1/+1
|
* pt: Use PtTransportName in TransportIdIan Jackson2022-09-271-2/+2
|
* pt: PtTransportName: Provide TryFrom, into_inner, AsRefIan Jackson2022-09-271-4/+27
| | | | This seems a minimal API for such a thing.
* pt: tor-linkspec: Shorten some names with useIan Jackson2022-09-271-12/+17
| | | | This repetition was getting repetitive.
* pt: Introduce PtTransportNameIan Jackson2022-09-272-5/+33
| | | | | The config parsing wants this. Also there are some anomalies in the types here that ought to be tidied up.
* Add a few comments based on review.Nick Mathewson2022-09-231-0/+8
|
* Clarify and combine PtTargetAddr constructors.Nick Mathewson2022-09-231-16/+23
|
* Rename various Transport* types to Pt*.Nick Mathewson2022-09-232-43/+42
| | | | | This clarifies that the types apply to pluggable transports only, and not (typically) to the default plain-old-TCP transport.
* Clarify note on "none" transport ID.Ian Jackson2022-09-231-0/+3
|
* Add a HasChanMethods trait, with a bunch of open TODO questions.Nick Mathewson2022-09-233-2/+24
| | | | We'll need to sort these out as we implement pluggable transports.
* New data types to describe transport targets.Nick Mathewson2022-09-232-1/+54
| | | | | I've tried to name and structure these for consistency, and comment reasonably well. We'll still probably want to make changes.
* Add TransportTargetAddr as the target address for a PT-using channelNick Mathewson2022-09-232-1/+118
| | | | | | As with `TransportId`, this type only gets complicated when `pt-client` is enabled: it's meant to stay simple for relays and non-PT-using clients.
* Create an API for TransportIdNick Mathewson2022-09-234-0/+168
|
* Remove semver.md from arti-1.0.0Nick Mathewson2022-09-071-2/+0
|
* Bump crate versions in preparation for Arti 1.0.0 release.Nick Mathewson2022-09-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we want to work more on ensuring that our semver stability story is solid, we are _not_ bumping arti-client to 1.0.0 right now. Here are the bumps we _are_ doing. Crates with "minor" bumps have had API breaks; crates with "patch" bumps have had new APIs added. Note that `tor-congestion` is not bumped here: it's a new crate, and hasn't been published before. ``` tor-basic-utils minor fs-mistrust minor tor-config minor tor-rtcompat minor tor-rtmock minor tor-llcrypto patch tor-bytes patch tor-linkspec minor tor-cell minor tor-proto minor tor-netdoc patch tor-netdir minor tor-persist patch tor-chanmgr minor tor-guardmgr minor tor-circmgr minor tor-dirmgr minor arti-client minor arti-hyper minor arti major arti-bench minor arti-testing minor ```
* enable doc_auto_cfg feature on every crate when documenting for docs.rstrinity-1686a2022-08-242-0/+4
|