summaryrefslogtreecommitdiff
path: root/crates/tor-socksproto
Commit message (Collapse)AuthorAgeFilesLines
* Bump versions of internal arti crates for Arti 1.3.2Nick Mathewson2025-01-071-3/+3
| | | | | | | | | | | | | The affected crates follow our regular versioning. They all get bumped to 0.26.0. Done with ``` for crate in $(./maint/list_crates |grep '^arti-\|tor-' ); do cargo set-version --bump minor -p $crate; done ```
* Merge branch 'mod-module-files' into 'main'Nick Mathewson2025-01-071-0/+1
|\ | | | | | | | | clippy: deny `mod_module_files` See merge request tpo/core/arti!2689
| * clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | | | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* | fix: fix typosDimitris Apostolou2025-01-061-2/+2
|/
* add_warnings, *: Allow clippy::needless_lifetimesNick Mathewson2024-12-031-0/+1
| | | | | | | | In 1.83, this warning triggers on many of our crates. We're thinking of fixing them all, but for now, we're going to disable the warning. This is part of #1765.
* Bump all the unstable tor- and arti- crates to 0.25.0.Gabriela Moldovan2024-12-021-3/+3
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.25.0 done ```
* Bump the versions of the non-{arti-,tor-} crates.Gabriela Moldovan2024-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list_crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error ``` We split them in the following categories: * crates with no changes (no version bumps): ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' oneshot-fused-workaround: No change. test-temp-dir: No change. caret: No change. ``` * crates that only have non-functional changes (bump the patch version): - slotmap-careful - fslock-guard - hashx - equix - fs-mistrust - safelog - retry-error * crates where APIs were broken (bump minor): None The bumps from this commit were created using this script: ``` PATCH=" slotmap-careful fslock-guard hashx equix fs-mistrust safelog retry-error " for crate in $PATCH; do cargo set-version --bump patch -p $crate; done ```
* cargo: Update `thiserror` to `2`Clara Engler2024-11-121-1/+1
|
* Remove obsolete semver files post 1.3.0 releaseIan Jackson2024-10-311-8/+0
|
* Merge branch 'versions' into 'main'Ian Jackson2024-10-301-4/+4
|\ | | | | | | | | Version bumps for release of 1.3.0 See merge request tpo/core/arti!2599
| * Bump minor versions of crates with new APIs/implsIan Jackson2024-10-301-1/+1
| | | | | | | | | | cargo set-version --bump=patch -p slotmap-careful cargo set-version --bump=patch -p safelog
| * Bump unstable tor-* and arti-* crates to 0.24.0Ian Jackson2024-10-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cargo set-version -p tor-async-utils 0.24.0 cargo set-version -p tor-basic-utils 0.24.0 cargo set-version -p tor-bytes 0.24.0 cargo set-version -p tor-cell 0.24.0 cargo set-version -p tor-cert 0.24.0 cargo set-version -p tor-chanmgr 0.24.0 cargo set-version -p tor-checkable 0.24.0 cargo set-version -p tor-circmgr 0.24.0 cargo set-version -p tor-config 0.24.0 cargo set-version -p tor-config-path 0.24.0 cargo set-version -p tor-consdiff 0.24.0 cargo set-version -p tor-dirclient 0.24.0 cargo set-version -p tor-dirmgr 0.24.0 cargo set-version -p tor-error 0.24.0 cargo set-version -p tor-general-addr 0.24.0 cargo set-version -p tor-geoip 0.24.0 cargo set-version -p tor-guardmgr 0.24.0 cargo set-version -p tor-hsclient 0.24.0 cargo set-version -p tor-hscrypto 0.24.0 cargo set-version -p tor-hsrproxy 0.24.0 cargo set-version -p tor-hsservice 0.24.0 cargo set-version -p tor-key-forge 0.24.0 cargo set-version -p tor-keymgr 0.24.0 cargo set-version -p tor-linkspec 0.24.0 cargo set-version -p tor-llcrypto 0.24.0 cargo set-version -p tor-log-ratelim 0.24.0 cargo set-version -p tor-memquota 0.24.0 cargo set-version -p tor-netdir 0.24.0 cargo set-version -p tor-netdoc 0.24.0 cargo set-version -p tor-persist 0.24.0 cargo set-version -p tor-proto 0.24.0 cargo set-version -p tor-protover 0.24.0 cargo set-version -p tor-ptmgr 0.24.0 cargo set-version -p tor-relay-crypto 0.24.0 cargo set-version -p tor-relay-selection 0.24.0 cargo set-version -p tor-rpcbase 0.24.0 cargo set-version -p tor-rtcompat 0.24.0 cargo set-version -p tor-rtmock 0.24.0 cargo set-version -p tor-socksproto 0.24.0 cargo set-version -p tor-units 0.24.0 cargo set-version -p arti-client 0.24.0 cargo set-version -p arti-relay 0.24.0 cargo set-version -p arti-rpc-client-core 0.24.0 cargo set-version -p arti-rpcserver 0.24.0
* | cargo: Run fixup-featuresIan Jackson2024-10-301-1/+1
|/ | | | | | | This is output from nailing-cargo -Eu run -p fixup-features Cargo.toml There are some formatting glitches which I'll fix in a moment.
* tor-socksproto: Require fewer features from dependenciesNick Mathewson2024-10-091-2/+2
|
* tor-socksproto: fix "check_doc_features" warningSteven Engler2024-10-011-0/+4
|
* tor-socksproto: Handle 0-byte reads (EOF) correctly (fmt)Ian Jackson2024-10-011-1/+3
|
* tor-socksproto: Handle 0-byte reads (EOF) correctlyIan Jackson2024-10-013-4/+24
| | | | | | | This restores the functionality of socks users: detect closed sockets. 0c595818f713916d94b7b0e4062f953fad7c9799 which we reverted as part of rebasing this branch onto main.
* fixup! tor-socksproto: Fix doc comment for new_preciseIan Jackson2024-10-011-6/+3
|
* tor-socksproto: Fix doc comment for ReadPrecisionIan Jackson2024-10-011-1/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2436#note_3081884
* tor-socksproto: Fix doc comment for new_preciseIan Jackson2024-10-011-1/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2436#note_3081885
* tor-socksproto: Code motion to tidy upIan Jackson2024-10-012-31/+25
|
* tor-socksproto: Deprecate old APIIan Jackson2024-10-014-6/+13
|
* tor-socksproto: Introduce handshake_for_tests method (fmt)Ian Jackson2024-10-013-5/+20
|
* tor-socksproto: Introduce handshake_for_tests methodIan Jackson2024-10-014-36/+44
|
* tor-socksproto: Introduce into_output_forbid_pipeliningIan Jackson2024-10-012-0/+26
|
* tor-socksproto tests: Run test cases via new API in various modesIan Jackson2024-10-011-4/+117
|
* tor-socksproto tests: Use crate::* rather than ad-hoc importsIan Jackson2024-10-011-7/+1
|
* tor-socksproto: Introduce new API (fmt)Ian Jackson2024-10-012-3/+4
|
* tor-socksproto: Introduce new APIIan Jackson2024-10-015-4/+444
|
* tor-socksproto: Add HasHandshakeOutputIan Jackson2024-10-013-1/+37
| | | | Our new API implementation will need this.
* Apply deferred rustfmt churnIan Jackson2024-10-014-24/+17
|
* tor-socksproto: Introduce HandshakeImpl::call_handshake_implIan Jackson2024-10-011-6/+27
| | | | This will support both the new and old API.
* tor-socksproto: Make NextStepImpl an enum (tidy)Ian Jackson2024-10-012-8/+4
| | | | | Remove redundant {} from construction of NextStepImpl::Finished. (We kept these in the previous commit to reduce the size of the diff there.)
* tor-socksproto: Make NextStepImpl an enumIan Jackson2024-10-013-32/+35
| | | | | | | | 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.
* tor-socksproto: Introduce NextStepImpl and do drain centrallyIan Jackson2024-10-013-39/+45
| | | | | | | | | | | | | 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.
* tor-socksproto: Move `handshake` to be a trait methodIan Jackson2024-10-016-41/+36
| | | | | | | | | | | 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.
* tor-socksproto: Adjust description of `handshake`Ian Jackson2024-10-012-4/+4
| | | | | | 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".
* tor-socksproto: Factor out reader constructionIan Jackson2024-10-013-30/+21
| | | | | | | | | | | | | 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.
* tor-socksproto: Factor out return value handlingIan Jackson2024-10-015-28/+128
| | | | | | | | | | | 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.
* tor-socksproto: Use .is_empty() in some testsIan Jackson2024-10-011-4/+4
| | | | | | | | | 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.
* Bump arti- and tor- crates to 0.23.0Nick Mathewson2024-09-301-3/+3
| | | | | | | | | | | | | | Per our policy, every one of these gets a minor bump. Generated with: ``` for crate in $(./maint/list_crates | grep '^\(tor\|arti\)-' ); do cargo set-version --bump minor -p $crate; done ``` (Note the use of `-` at the end end of the grep pattern to prevent matching the `arti` crate.)
* Minor bumps on non-tor/arti cratesNick Mathewson2024-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates are not in the tor/arti namespace, but we have given them MSRV bumps: ``` oneshot-fused-workaround slotmap-careful fslock-guard hashx equix caret fs-mistrust safelog test-temp-dir retry-error ``` We are counting this as a breaking change. Since all of these crates are at 0.x.x, we have indicated the breaking change with a minor version bump. This commit was generated with the following script: ``` BUMPS=" oneshot-fused-workaround slotmap-careful fslock-guard hashx equix caret fs-mistrust safelog test-temp-dir retry-error " for crate in $BUMPS; do cargo set-version --bump minor -p $crate; done ```
* Upgrade MSRV to 1.77Nick Mathewson2024-09-251-1/+1
| | | | This will allow us to upgrade to the latest version of rusqlite.
* Bump MSRV from 1.70 to 1.75.Wesley Aptekar-Cassels2024-09-161-1/+1
|
* tor-bytes: Rename Truncated to Incomplete, and restore old Truncated as ↵Ian Jackson2024-09-113-3/+9
| | | | | | | | | deprecated Incomplete is a better name. This lets us use Truncated for the old, deprecated, conflation of "Incomplete" with what is now "MissingData".
* tor-bytes: Add a Reader constructor for tor-socksproto's use caseIan Jackson2024-09-112-8/+8
| | | | | | | Here we add the constructor, and document it, and change the call sites. No functional change yet.
* tor-bytes: Add a deficit field to Error::TruncatedIan Jackson2024-09-103-3/+3
| | | | This will allow us to fix #1592, but it doesn't do so yet.
* socksproto: Add a const for suggested buffer length.Nick Mathewson2024-09-091-0/+6
| | | | | Ticket #1509 will probably get rid of this constant, but for now we may as well put it in one place.
* rpclib: Support opening a data stream.Nick Mathewson2024-09-091-1/+2
| | | | | | Requires #1523. Implements #1524.
* Bump all the unstable tor- and arti- crates to 0.22.0.Gabriela Moldovan2024-09-031-3/+3
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.22.0 done ```