Nick Mathewson
41be40694d
Tweak "handshake" docs.
...
Per a suggestion from Diziet, clarify that the socks handshake code
only wants you to drain your buffers when it tells you to.
2022-10-03 12:52:38 -04:00
Nick Mathewson
235bda1210
Add a SocksReply type to capture address/port information.
...
I don't expect us to need this information much, but we may as well
hang on to it.
2022-10-03 12:52:38 -04:00
Nick Mathewson
f12202d707
Make sure that socks4 auth doesn't have any 0 bytes.
...
Try to do it in constant time, to avoid even the smell of
side-channel attacks.
2022-10-03 12:52:38 -04:00
Nick Mathewson
3ae062911b
Tests for socks client handshake.
...
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.
2022-10-03 12:52:38 -04:00
Nick Mathewson
cb4e32ddc7
Bug fix: report empty SOCKS4 auth as "no auth".
...
Previously we would report it as authenticating using the empty
string.
2022-10-03 12:52:38 -04:00
Nick Mathewson
dc55272602
Fuzzer code for socks client implementation.
2022-10-03 12:52:38 -04:00
Nick Mathewson
6ed2e0c377
Script to list current version of every crate.
2022-10-03 11:23:30 -04:00
Reylaba
6a6931e2c3
Use hostname-validator crate for hostname validation
2022-10-03 16:47:03 +02:00
Nick Mathewson
f2658437ff
Oops: propagate bumps to Cargo.lock.
2022-10-03 10:15:37 -04:00
Nick Mathewson
c1e70b7af4
Bump patchlevels of binary crates.
...
Since these don't expose any Runtime-based APIs, they don't have
a breaking change.
2022-10-03 10:07:19 -04:00
Nick Mathewson
102e3c221d
Bump minor version of tor-rtcompat and most of its dependents
...
(Since the APIs for the `Schedule::sleep*` functions changed, this
is a breaking change in tor-rtcompat. Therefore, the Runtime trait
in tor-rtcompat is now a different trait. Therefore, anything that
uses the Runtime trait in its APIs has also broken.)
2022-10-03 10:01:46 -04:00
Nick Mathewson
388e0cbab5
Bump crates that have had backward compatible API changes.
2022-10-03 09:52:34 -04:00
Nick Mathewson
f5389b53e9
Bump crates that have had no API changes.
2022-10-03 09:47:09 -04:00
Nick Mathewson
cfcde455a0
Merge branch 'changelog-typos-2022-10' into 'main'
...
CHANGELOG: fix some typos
See merge request tpo/core/arti!751
2022-10-03 13:38:22 +00:00
eta
f5ca21b4ff
CHANGELOG: fix some typos
2022-10-03 14:15:05 +01:00
Nick Mathewson
a506f020b2
changed_crates: output crates in toposort order.
2022-10-03 08:47:07 -04:00
Nick Mathewson
4ca7221d53
Finish filling in the changelog for 1.0.1
2022-10-03 08:40:33 -04:00
Nick Mathewson
e630b2641e
Merge branch 'upgrade-20220930' into 'main'
...
Upgrade various things in preparation for monday release
See merge request tpo/core/arti!750
2022-09-30 19:48:26 +00:00
Nick Mathewson
4b61d778bd
Update README.md files.
2022-09-30 15:19:48 -04:00
Nick Mathewson
627a8f09bd
Run cargo update in preparation for upcoming release.
2022-09-30 15:19:39 -04:00
Nick Mathewson
66ddbee1a4
Upgrade dependencies in preparation for upcoming release
2022-09-30 15:19:32 -04:00
Nick Mathewson
3f5a524597
Start a changelog for Arti 1.0.1
2022-09-30 15:04:02 -04:00
Ian Jackson
5be8830b3f
pt: bridge parsing: Add an IPv6 test case
2022-09-30 17:08:14 +01:00
Ian Jackson
47aae0c27a
pt: impl Display for Bridge and test it
2022-09-30 17:08:14 +01:00
Ian Jackson
0c9b54c2f0
pt: Provide accessors for PtTarget
2022-09-30 17:08:14 +01:00
Ian Jackson
0dfa69510e
implement FromStr for Bridge, and test it
2022-09-30 17:08:14 +01:00
Ian Jackson
4b28c0e120
tor-guardmgr: Introduce pt-client feature
...
guardmgr needs to know how to parse Bridge lines into Bridge structs
so it needs to know about PTs specifically
2022-09-30 17:08:14 +01:00
Ian Jackson
c41ea6e07b
pt: Make some more types Eq
...
I wanted this for testing. I think it's reasonable to promise this.
2022-09-30 17:08:14 +01:00
Ian Jackson
7bbf7ac161
pt: Provide constructors for PtTarget
...
Make PtTargetSettings be Default.
No longer wrap it in Arc. We want to be able to update it here during
construction. If we want to save memory with copies of the same
bridge line, we should do this for the whole Bridge I think.
2022-09-30 17:08:14 +01:00
Ian Jackson
98f92d870e
tor-error::internal: Remove a redundant suppression
...
Spotted this in passing.
2022-09-30 17:08:14 +01:00
Nick Mathewson
1565ea36a0
Merge branch 'from_bool_fix' into 'main'
...
Work around a new nightly clippy warning
See merge request tpo/core/arti!749
2022-09-30 14:14:32 +00:00
Nick Mathewson
6a04188d59
Work around a new nightly clippy warning
...
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.
2022-09-30 09:00:42 -04:00
Ian Jackson
94329cf8fb
Merge branch 'bridge-apis-are-experimental' into 'main'
...
Mark all bridge and pt features as experimental for now.
Closes #588
See merge request tpo/core/arti!748
2022-09-29 15:32:13 +00:00
Nick Mathewson
b146dacf1d
Mark all bridge and pt features as experimental for now.
...
Also, document the features.
Closes #588 .
2022-09-29 10:59:19 -04:00
Nick Mathewson
af99979689
Implement client-side SOCKS handshake
2022-09-28 09:29:56 -04:00
Ian Jackson
c9b6cf2e2e
Merge branch 'pt-name' into 'main'
...
pt: Introduce PtTransportName
See merge request tpo/core/arti!743
2022-09-27 16:52:04 +00:00
Nick Mathewson
d06dcefd7b
Make "SocksRequest::new" public.
...
Also, have it enforce more correctness properties.
2022-09-27 12:38:48 -04:00
Nick Mathewson
4b992cbd89
New ErrorKind::LocalProtocolFailed.
...
This type is by analogy to `RemoteProtocolFailed`; we'll use it for
cases when the Socks proxy refuses to talk to us.
2022-09-27 12:30:20 -04:00
Ian Jackson
278425321d
pt: Reject a pluggable transport named Bridge
...
https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/91
2022-09-27 17:30:00 +01:00
Ian Jackson
102a663907
Remove docsrs thing which is in wrong place?
2022-09-27 17:30:00 +01:00
Ian Jackson
9b55cc012e
pt: Try to fix docsrs problem
2022-09-27 17:29:38 +01:00
Ian Jackson
3e5be3ddd6
pt: Use PtTransportName in PtTarget
2022-09-27 17:29:38 +01:00
Ian Jackson
fdfbdf082a
pt: Use PtTransportName in TransportId
2022-09-27 17:29:38 +01:00
Ian Jackson
0dab3e0c08
pt: PtTransportName: Provide TryFrom, into_inner, AsRef
...
This seems a minimal API for such a thing.
2022-09-27 17:29:38 +01:00
Ian Jackson
9980338a9d
pt: tor-linkspec: Shorten some names with use
...
This repetition was getting repetitive.
2022-09-27 17:29:38 +01:00
Nick Mathewson
b08073c2d4
socksproto: Rename SocksHandshake to SocksProxyHandshake.
...
Retain "SocksHandshake" as a deprecated synonym.
Also, make an (on-by-default) feature for SocksProxyHandshake.
(There is about to be a SocksClientHandshake as well.)
2022-09-27 08:28:47 -04:00
Ian Jackson
bee40d3954
pt: Introduce PtTransportName
...
The config parsing wants this. Also there are some anomalies in the
types here that ought to be tidied up.
2022-09-27 12:44:23 +01:00
Ian Jackson
85dfe9d1ec
Merge branch 'always_safelog_on_console' into 'main'
...
Enforce SafeLogging on the console.
Closes #553
See merge request tpo/core/arti!742
2022-09-26 16:33:58 +00:00
Nick Mathewson
1b53544ee8
Merge branch 'pt-client-api-part-2' into 'main'
...
Remaining bridge-and-pt APIs
Closes #543
See merge request tpo/core/arti!741
2022-09-26 15:46:44 +00:00
Nick Mathewson
8ddc1a4b36
Enforce SafeLogging on the console.
...
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 .
2022-09-26 11:36:18 -04:00