aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Work around a new nightly clippy warningNick Mathewson2022-09-304-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The warning `clippy::bool_to_int_with_if` is meant to shout at you when you say `if x { 1 } else { 0 }` and instead suggest that you say `inttype::from(x)`. I agreed with this for the case in tor-cert, where we are literally converting a boolean into a flag. I don't agree with this in tor-netdoc, where we are using a boolean to decide how many fields to skip in a given document format. So for this case, I decided to clean up the code a little by renaming "skip" to "n_skip", and changing the boolean to use an enum instead.
* | | | Mark all bridge and pt features as experimental for now.Nick Mathewson2022-09-297-1/+68
| |/ / |/| | | | | | | | | | | | | | 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.
* | Merge branch 'always_safelog_on_console' into 'main'Ian Jackson2022-09-261-30/+10
|\ \ | | | | | | | | | | | | | | | | | | Enforce SafeLogging on the console. Closes #553 See merge request tpo/core/arti!742
| * | Enforce SafeLogging on the console.Nick Mathewson2022-09-261-30/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we always assumed that the console was ephemeral, and so we disabled safe logging. But the console can be piped to journald. And even if we enforce isatty there's no guarantee that the user isn't using some kind of terminal that logs to disk or something. Best just to enable SafeLogging unconditionally. I've added a note about where and how we might re-enable this. Closes #553.
* | | Add the necessary APIs for bridge-based circuit construction.Nick Mathewson2022-09-262-0/+11
| | |
* | | GuardMgr/DirMgr: Add APIs for bridge descriptor listsNick Mathewson2022-09-266-3/+116
| | |
* | | Make RouterDesc implement Clone and Debug.Nick Mathewson2022-09-262-0/+3
| | | | | | | | | | | | Their omission was an oversight.
* | | 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.
* | Merge branch 'cell-introduce2' into 'main'Ian Jackson2022-09-263-16/+67
|\ \ | | | | | | | | | | | | Implement Introduce2 tor cell See merge request tpo/core/arti!736
| * | Implement Introduce2 tor cellYuan Lyu2022-09-213-16/+67
| | | | | | | | | | | | | | | Reuse the same Introduce inner body implementation of Introduce1.
* | | Add a few comments based on review.Nick Mathewson2022-09-232-0/+11
| | |
* | | 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 the skeleton of a tor-ptmgr crateNick Mathewson2022-09-234-0/+244
| | | | | | | | | | | | | | | When complete, this crate will handle launching and using pluggable transports on demand.
* | | ChanMgr: new (unimplemented) APIs for pluggable transportsNick Mathewson2022-09-236-0/+152
| | |
* | | 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
| | |
* | | Merge branch 'fix-nightly-clippy' into 'main'Ian Jackson2022-09-229-32/+28
|\ \ \ | | | | | | | | | | | | | | | | Fix nightly clippy See merge request tpo/core/arti!729
| * | | Apply 1 suggestion(s) to 1 file(s)Ian Jackson2022-09-221-1/+1
| | | |
| * | | fix clippy::needless_borrowtrinity-1686a2022-09-108-23/+22
| | | |
| * | | fix clippy::unwrap_used and old TODO for msrv 1.56trinity-1686a2022-09-101-9/+6
| | | |
* | | | Merge branch 'channel-usage-doc' into 'main'Ian Jackson2022-09-221-7/+15
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Improve docs for ChannelUsage See merge request tpo/core/arti!737
| * | | | Improve docs for ChannelUsageNick Mathewson2022-09-221-7/+15
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Try to clarify more that the ChannelUsage is for describing the usage for one particular channel request, not for the channel as a whole. This is a potentially confusing point, so we should spell it out completely.
* | | | Merge branch 'expose-builder' into 'main'Ian Jackson2022-09-221-0/+8
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | CircMgr: Add an accessor for the CircuitBuilder. See merge request tpo/core/arti!738
| * | | CircMgr: Add an accessor for the CircuitBuilder.Nick Mathewson2022-09-221-0/+8
| |/ / | | | | | | | | | | | | | | | | | | Without this, actually building circuits manually is a pain. This API is behind the `experimental-api` feature, and so it does not require a semver.md entry.
* | | Intoduce1: Use a constant-time check for all-zero RsaIdentityNick Mathewson2022-09-201-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a matter of good crypto practice, we shouldn't use short-circuiting checks to compare keys or key-like objects, since the amount of time taken by those checks can leak information about their inputs. I don't think it's actually _necessary_ to use a constant-time operation in this case, but let's establish the precedent. This is a follow-up to !724.
* | | Add a new constant-time is_zero() check for RsaIdentityNick Mathewson2022-09-203-0/+33
|/ / | | | | | | | | | | | | | | | | | | | | | | | | There are some places in the protocol where we have an all-zero RSA identity that does not truly represent a key, but rather represents an absent or unknown key. For these, it's better to use `RsaIdentity::is_zero` instead of manually checking for a set of zero bytes: it expresses the intent better, and ensures that the operation is constant-time. I am deliberately not introducing a more general IsZero trait here, or implementing is_zero for anything else: This is the only one we seem to need right now. We can generalize it later if we have to.
* | Merge branch 'cell-introduce1' into 'main'Nick Mathewson2022-09-203-6/+130
|\ \ | | | | | | | | | | | | Implement onion service Introduce1 See merge request tpo/core/arti!724
| * | Implement onion service Introduce1Yuan Lyu2022-09-083-6/+130
| | |
* | | enumerate platform with getresuid supporttrinity-1686a2022-09-102-19/+20
| |/ |/|
* | force no inlining on internal_macro_testtrinity-1686a2022-09-091-0/+1
| | | | | | | | it may fix this test when running in release, where the function gets inlined, so its name does not appear in the backtrace
* | Add a dbg!() to diagnose #570.Nick Mathewson2022-09-081-0/+9
| | | | | | | | | | This won't fix anything, but it will let us see what the backtrace looks like when it fails.
* | Merge branch 'fix-async-std' into 'main'eta2022-09-072-2/+5
|\ \ | | | | | | | | | | | | fix compilation error with async-std See merge request tpo/core/arti!723
| * | fix compilation error with async-stdtrinity-1686a2022-09-062-2/+5
| |/
* | `TaskSchedule`: give error on `sleep*()` if last handle is droppedNick Mathewson2022-09-076-9/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an busy-loop. When the last `TaskHandle` on a `TaskSchedule` is dropped, the schedule is permanently canceled: whatever operation it was scheduling should no longer be performed. But our code was broken: the `sleep()` and `sleep_until_wallclock()` functions don't verify whether the handles are dropped or not. This breakage caused an CPU-eating busy-loop in `sleep_until_wallclock`. With this patch, we now return a `Result<(), SleepError>` from these functions. Fixes #572.
* | Remove semver.md from arti-1.0.0Nick Mathewson2022-09-0716-55/+0
|/
* document TOR_SKIP_CONTROLPORTTEST=1 for no warning on Tor Browsertrinity-1686a2022-09-032-18/+14
|
* READMEs: Drop stability warning re configIan Jackson2022-09-021-9/+0
| | | | | The referenced ticket is closed and I think the top-level caveats remaining after !717 are sufficient.