aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-chanmgr/src/transport/default.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* tor-rtcompat+misc: add `NetStreamProvider::ConnectOptions`Steven Engler2026-06-081-1/+3
| | | | | | | | | This adds the trait type `ConnectOptions` to `NetStreamProvider` and adds this `ConnectOptions` as an argument to `NetStreamProvider::connect()`. You probably want to look at the changes in tor-rtcompat first, then the rest of this commit is updating the various places we use `NetStreamProvider`.
* Merge branch 'socket-buf-size' into 'main'opara2026-05-211-2/+14
|\ | | | | | | | | | | | | Set socket buffer sizes (`SO_SNDBUF` and `SO_RCVBUF`) for proxy sockets Closes #2500 See merge request tpo/core/arti!3957
| * tor-rtcompat+misc: add `NetStreamProvider::ListenOptions`Steven Engler2026-05-071-2/+14
| | | | | | | | | | | | | | | | | | This adds the trait type `ListenOptions` to `NetStreamProvider` and adds this `ListenOptions` as an argument to `NetStreamProvider::listen()`. You probably want to look at the changes in tor-rtcompat first, then the rest of this commit is updating the various places we use `NetStreamProvider`.
* | chanmgr: report target address, not proxy address, in errorNick Mathewson2026-05-071-1/+4
| | | | | | | | | | | | Also, change the address type in the error to String for now. In reality we need a better representation of this error, but that shouldn't block this.
* | chanmgr: refactor error typesNick Mathewson2026-05-071-1/+1
| | | | | | | | | | Proxy belonged as a subcase of ChannelBuild. And ChannelBuild was only about making an initial connection.
* | chanmgr: Do not turn connect errors into proxy errors.Nick Mathewson2026-05-071-14/+9
|/ | | | | | | This fixes the problem where we'd report all connect failures as proxy failures. Closes #2459.
* tor-chanmgr: don't `warn_report!` for failed connectionsSteven Engler2026-03-241-1/+0
| | | | | | | | | | | | | | | | | | | | `warn_report!` is useful when there's an error that we need to ignore and can't propagate up the call stack. But here we're using `warn_report!` while also returning the error in a `Error::ChannelBuild`. This is not great because: 1. The caller should warn if it wants to, since it will have the error message and the proper context. 2. This code is doing something like happy eyeballs, which means we only care that one connection succeeds, not if any fail. One instance where this is problematic is when running Arti on a machine without IPv6 support. If connecting to a relay with both an IPv4 and IPv6 address, the IPv6 attempt will always fail. We don't want to warn about every outgoing IPv6 connection failure when the IPv4 connection succeeds.
* tor-chanmgr: add loopback validation, startup warning and httparseNihal2026-03-181-8/+4
|
* tor-chanmgr: fix type inference in handshakeNihal2026-03-181-5/+5
|
* tor-chanmgr: implement HTTP CONNECT proxy handshake and wire transportNihal2026-03-181-6/+24
|
* proto: Use the PeerAddr accross channel handshakeDavid Goulet2026-02-191-8/+3
| | | | | | | This is a large change but it is basically using PeerAddr in the channel builder through the channel handshake code and into the Channel itself. Signed-off-by: David Goulet <[email protected]>
* tor-chanmgr: remove SocketAddr and improve errorNihal2026-02-161-21/+14
|
* tor-chanmgr: add URI-style parsing for ProxyProtocol outbound_proxy configNihal2026-02-161-8/+21
|
* tor-chanmgr: integrate outbound proxy into DefaultTransportNihal2026-02-161-13/+39
|
* opentelemetry: Instrument a bunch of functions.Wesley Aptekar-Cassels2025-11-241-0/+1
| | | | | These are all aimed at figuring out in more detail what's going on in #2079 and related issues.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* opentelemetry: Add some instrument macros.Wesley Aptekar-Cassels2025-09-241-1/+2
| | | | | I've added these in places that are useful for the debugging that I've been doing.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-3/+3
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* rtcompat: Rename TcpProvider to NetStreamProvider.Nick Mathewson2024-09-241-3/+3
| | | | | | | | | | | | | | (And similarly rename TcpListener to NetStreamListener, along with their TcpStream/TcpListener associated types.) These types are about to become generic over addresses, and therefore shouldn't be named after TCP. Renaming was done mostly with Rust Analyzer, except for some macros that needed to be hand-edited. (I'll revise the comments in the next commit; this one is all about renaming.)
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Throughout: Use *_report!() macros for reporting Errors.Nick Mathewson2023-07-071-2/+2
| | | | | | | | | | | | | | | I identified the cases to replace by searching for the string `.report()`. There are a few that I didn't change: * A couple of cases that used anyhow::Error, * One case that reported two Errors. * Two cases in `tor_hsclient::err` that just did `error!("Bug: {}")`. I have also not audited the cases in `tor-hsclient` where we're using `tor_error::Report` manually. Nonetheless, closes #949.
* Use ErrorReport for errors in warn! in tor-chanmgrIan Jackson2023-01-301-2/+2
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* chanmgr: trace-level logs when launching connections.Nick Mathewson2023-01-061-0/+3
| | | | Based on more temporary debugging code. Yet another part of #677.
* Rename TransportHelper => TransportImplHelper.Nick Mathewson2022-11-301-1/+1
|
* tor-chanmgr: Invent [Box]ChanSensitive for two error payloadsIan Jackson2022-11-231-1/+4
| | | | | | | | | | | This 1. Makes the errors smaller (in the case of Io's PtTargetAddr; ChannelBuild's addresses are already indirected in a Vec). 2. Redacts (currently, scrubs) the PtTargetAddr and SocketAddr when safe logging is enabled These are the remaining error variants in tor-chanmgr that contain information that should become sensitive as part of bridge support.
* guardmgr: Refactor the interior of FirstHop.Nick Mathewson2022-10-241-4/+2
| | | | | | | | | | | | | 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".
* ChanMgr: Reorganize factory, builder, transport code.Nick Mathewson2022-10-131-0/+228
There is no actual code change here: just movement.