aboutsummaryrefslogtreecommitdiff
path: root/crates/arti/src/proxy.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Try to resolve the "Truncated" error in tor-socksprotoNick Mathewson2022-02-111-3/+3
| | | | | I'm not in love with this solution; the others just seem a bit ugly too.
* Make the Error detail type non-exported from arti-clientNick Mathewson2022-02-041-3/+3
| | | | | | | | | | | At least by default, we should have Error be private, and not expose it as part of our APIs. To keep functionality in `arti`, I had to add an `ExitTimeout` error kind. For interface consistency, I also re-exported ErrorKind and HasError from `arti_client`.
* Remove many needless borrows and slicesIan Jackson2022-02-021-2/+2
| | | | | | | Found via clippy::needless_borrow. In some cases I removed needless `[..]` too. See also: needless_borrow suggestion doesn't go far enough https://github.com/rust-lang/rust-clippy/issues/8389
* Un-Arc<> TorClient in the arti crateNick Mathewson2022-02-011-3/+3
| | | | | TorClient doesn't need to be wrapped in an Arc any longer, thanks to other refactoring.
* StreamPrefs: Re-alphabetise imports following renameIan Jackson2022-01-211-1/+1
| | | | Placates rustfmt
* StreamPrefs: rename from ConnectPrefsIan Jackson2022-01-211-3/+3
| | | | | | | | | | | | | The docs even say this is about stream. As @nickm writes in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/252#note_2771289 we generally call end-to-end connections that are tunneled over Tor "Streams" to distinguish them from everything else in the Tor protocols that could possibly be called a "Connection". That seems to apply here too.
* connection preferences: Take ConnectPrefs by referenceIan Jackson2022-01-191-3/+3
| | | | | This may save quite a bit of copying. The callees don't need to copy the whole struct; they copy the bits they need.
* Use *_with_prefs() for Option<ConnectPrefs> callers in TorClient::connectNeel Chauhan2022-01-081-3/+5
|
* proxy: introduce new functions to write_all & flush/closeMuhammad Falak R Wani2021-12-151-42/+42
| | | | Signed-off-by: Muhammad Falak R Wani <[email protected]>
* proxy: send SOCKS5 reply on failure casesMuhammad Falak R Wani2021-12-111-1/+14
| | | | Signed-off-by: Muhammad Falak R Wani <[email protected]>
* proxy: report an error if all listeners fail.Nick Mathewson2021-12-081-1/+1
|
* Resolve XXXXs in proxy.rsNick Mathewson2021-12-081-3/+3
| | | | These issues all have tickets, so can become TODOs.
* More typo fixes that I forgot to save :(Nick Mathewson2021-11-241-1/+1
|
* Typo fix in an expect() message.Nick Mathewson2021-10-281-1/+1
|
* Tests and refactoring for IsolationMap.Nick Mathewson2021-10-261-13/+50
|
* TorClient::resolve_ptr should take an IpAddr.Nick Mathewson2021-10-261-1/+13
|
* Rename tor_client/arti_tor_client to arti_client.Nick Mathewson2021-10-211-2/+2
| | | | | | Solves a name conflict with the existing tor_client create. Closes #130.
* Change how we connect to target addresses.Nick Mathewson2021-10-181-1/+1
| | | | | | | Now we all both address:port, (address, port), and more. We also allow SocketAddr and IpAddr, but only via a trait labeled as "Dangerous".
* Do not use downcast_ref, use tor-client error.Jani Monoses2021-10-181-8/+6
|
* Add a cast to correct a type error about WSAEMFILENick Mathewson2021-10-151-1/+7
|
* proxy: Mark ENFILES and EMFILES as survivable.Nick Mathewson2021-10-141-2/+27
| | | | | | | | I don't love this approach, but those errors aren't distinguished by ErrorKind, so we have to use libc or winapi, apparently. At least nothing here is unsafe. Addresses part of #188.
* Fix typosJani Monoses2021-09-071-1/+1
|
* Light refactoring and documentation improvements in proxy.rsNick Mathewson2021-08-271-40/+103
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+346
This will cause some pain for now, but now is really the best time to do this kind of thing.