| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| | |
Added ipv6 and hostname support for reply for socks5
See merge request tpo/core/arti!4063
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
Typos found with codespell
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
Made with https://crates.io/crates/typos-cli
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Example:
```text
warning: struct pattern is not needed for a unit variant
--> crates/hashx/src/program.rs:165:32
|
165 | Instruction::Target { .. } => Opcode::Target,
| ^^^^^^^ help: remove the struct pattern
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern
note: the lint level is defined here
--> crates/hashx/src/lib.rs:9:9
|
9 | #![warn(clippy::all)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::unneeded_struct_pattern)]` implied by `#[warn(clippy::all)]`
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Example:
```text
warning: doc list item overindented
--> crates/arti-rpc-client-core/src/conn/connimpl.rs:322:9
|
322 | /// indicates that no more messages will be received for this request.
| ^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
note: the lint level is defined here
--> crates/arti-rpc-client-core/src/lib.rs:8:9
|
8 | #![warn(clippy::all)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::doc_overindented_list_items)]` implied by `#[warn(clippy::all)]`
```
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This restores the functionality of
socks users: detect closed sockets.
0c595818f713916d94b7b0e4062f953fad7c9799
which we reverted as part of rebasing this branch onto main.
|
| | |
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2436#note_3081884
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2436#note_3081885
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Our new API implementation will need this.
|
| | |
|
| |
|
|
| |
This will support both the new and old API.
|
| |
|
|
|
| |
Remove redundant {} from construction of NextStepImpl::Finished.
(We kept these in the previous commit to reduce the size of the diff there.)
|
| |
|
|
|
|
|
|
| |
We never say both "finished" and "reply". Make this explicit.
Our new caller API is going to depend on this.
Also, notice if the implementation's behaviour implies an infinite
loop, and call that an internal error instead.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This separates the public API from the internal API, which will allow
us to do more work centrally, and defend against various bugs on both
sides.
The name mirrors a new `NestStep` type we'll introduce as part of a
new caller API.
For now, we make only one centralisation change: Action.drain is now
computed centrally rather than ad-hoc in each protocol implementation
branch.
|
| |
|
|
|
|
|
|
|
|
|
| |
This deduplicates some docs and eliminates the two wrapper functiosn
for `run_handshake`, which is now just `handshake`.
We're going to make other API breaks too, and this isn't going to be
the primary API, so we might as well do this.
Proper description of the semver breakage will come at the end when
it's all done.
|
| |
|
|
|
|
| |
Speak of "peer" rather than being specific. Also, fix a copypaste
mistake: `SocksClientHandshake::handshake`'s doc says it's about
`SocksProxyHandshake`. Instead just speak of the "handshake".
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Code flow changes:
* We always construct the Reader, even on paths where we didn't
previously. That's fine because it's infallible and has no side
effects.
* In proxy.rs, the quirk with `input[0]` has gone away.
We can use the supplied `Reader` and peek the first byte.
No overall functional change.
|
| |
|
|
|
|
|
|
|
|
|
| |
This centralises the handling of return values, and paves the way for
further deduplication. (The two return paragraphs were identical.)
There's quite a lot of initial API surface to framework.rs. Some of
that is going to be hidden, but we're also going to extend this to do
more work.
No functional change.
|
| |
|
|
|
|
|
|
|
| |
Type inference seems fragile when comparing with empty slices.
Here's a ticket I filed where an earlier version of the tor-socksproto
API branch triggered this problem:
https://github.com/rust-lang/rust/issues/130480
The latest version seems to trigger it too.
|
| |
|
|
|
|
|
|
|
| |
deprecated
Incomplete is a better name.
This lets us use Truncated for the old, deprecated, conflation of
"Incomplete" with what is now "MissingData".
|
| |
|
|
|
|
|
| |
Here we add the constructor, and document it, and change the call
sites.
No functional change yet.
|
| |
|
|
| |
This will allow us to fix #1592, but it doesn't do so yet.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Actually, to avoid making a breaking change, I'm deprecating
BadMessage and creating a new InvalidMessage variant that takes a
Cow. This way I don't need to track every crate that re-exposes
tor_bytes::Error and call this a breaking change in those.
Making this change will allow tor_bytes errors to be much more
helpful.
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| |
|
|
|
| |
The previous syntax was recognised by the real script, but not by the
ad-hoc script I'm about to use to add all the missing ones.
|
| |
|
|
|
|
|
| |
This lint exists for perf reasons, and this is rarely relevant in
tests.
Using double quoted str is generally cognitively less burdensome.
|
| | |
|
| |
|
|
|
| |
Per a suggestion from Diziet, clarify that the socks handshake code
only wants you to drain your buffers when it tells you to.
|
| |
|
|
|
| |
I don't expect us to need this information much, but we may as well
hang on to it.
|
| |
|
|
|
|
| |
These tests include a few reference cases, as well as a little
framework to make sure that the client and the proxy implementation
will handshake with one another successfully.
|