Nick Mathewson
190f24e66d
CircMgr: Draft APIs used to implement onion service clients.
2023-01-24 12:32:21 -05:00
Nick Mathewson
1834579460
Merge branch 'onion-proto-apis' into 'main'
...
Draft APIs for onion services in tor-proto
See merge request tpo/core/arti!970
2023-01-24 17:28:16 +00:00
Nick Mathewson
ce293e4ce4
tor-proto: comment fixes and more TODO hs
2023-01-24 11:50:10 -05:00
Ian Jackson
92ba020534
Add missing docsrs attribute
2023-01-24 16:19:05 +00:00
Ian Jackson
15a543d738
netdoc builder: Add two TODOs, prompted by testing experience
2023-01-24 16:15:17 +00:00
Ian Jackson
be1cd7789d
netdoc builder test: Make a bigger dummy document and test reparsing
2023-01-24 16:15:17 +00:00
Ian Jackson
eb3b261595
netdoc builder: Implement object() and add one test case
2023-01-24 16:15:17 +00:00
Ian Jackson
4f0d17d96d
netdoc-builder: Initial test case (no object yet)
2023-01-24 16:15:17 +00:00
Ian Jackson
066eb12f50
netdoc-builder: Provide new() method
2023-01-24 16:15:17 +00:00
Ian Jackson
e989871a7b
netdoc-builder: Implement ItemArgument for more needed types
2023-01-24 16:15:17 +00:00
Ian Jackson
94fec1e12c
netdoc-builder: Remove some obsolete comments
2023-01-24 16:15:17 +00:00
Ian Jackson
16c4fee4b8
netdoc-builder: Move example into implementation doc comment
...
Not actually tested yet
2023-01-24 16:15:17 +00:00
Ian Jackson
8f725a19f8
netdoc-builder: Implement most of the internal general doc builder
2023-01-24 16:15:17 +00:00
Ian Jackson
22cf060426
netdoc-builder api: Clarify docs for object()
2023-01-24 16:15:17 +00:00
Ian Jackson
c7e816d263
netdoc-builder api: Introduce ItemArgument trait
2023-01-24 16:15:17 +00:00
Ian Jackson
eac7befc87
netdoc-builder api: Have .item() return ItemBuilder
...
This was a slip in the design doc.
2023-01-24 16:15:17 +00:00
Ian Jackson
8c8ff4948f
netdoc-builder api: Abolish `K` generic on ItemEncoder
...
We're going to eagerly encode the keyword, so this will be easy.
Removing the generic simplifies the API.
2023-01-24 16:15:17 +00:00
Ian Jackson
669a399c46
netdoc-builder api: Don't promise to check args_raw_string value
2023-01-24 16:15:17 +00:00
Ian Jackson
2bc7a371b4
netdoc-builder api: Make ItemEncoder methods consume and return self
...
This will actually make the pattern in the example work.
The mentioned `ItemArgument` trait will arrive soon.
2023-01-24 16:15:17 +00:00
Ian Jackson
5fccbce160
netdoc-builder api: Move internal API into actual code file (fmt)
2023-01-24 16:15:17 +00:00
Ian Jackson
e971d1ad59
netdoc-builder api: Move internal API into actual code file
...
Motion, plus the bare minimum needed to make it compile.
2023-01-24 16:15:17 +00:00
Ian Jackson
f735a128bb
tor-netdoc: tokenize: Provide BASE64_PEM_MAX_LINE
...
We'll use this in the netdoc builder, but it naturally lives here.
2023-01-24 16:15:17 +00:00
Ian Jackson
c8ac951cf5
tor-netdoc: tokenize: Rename to tag_keywords_ok, document, expose
...
Rename from _keyword_, since this actually checks the *multiple*
keywords that can appear in an object's BEGIN line.
Make this clear in the doc comment.
Expose it for use by the netdoc builder.
2023-01-24 16:15:17 +00:00
Ian Jackson
a8ab0a5f46
tor-netdoc: tokenize: crate-Expose object::BEGIN_STR etc.
...
The document builder wants these too.
2023-01-24 16:15:17 +00:00
Ian Jackson
5bd54f3701
tor-netdoc: Make AuthCertKwd pub(crate)
...
For now, this will be useful in a test.
2023-01-24 16:15:17 +00:00
Ian Jackson
043581fe0e
tor-bytes: impl Writeable for &impl Writeable
2023-01-24 16:15:17 +00:00
Ian Jackson
a4a4b19f21
tor-bytes: Implement conversion from EncodeError to Bug
2023-01-24 16:15:17 +00:00
eta
c31f451e0b
Merge branch 'bug736' into 'main'
...
Prop304: Add extended SOCKS result codes for onion services
See merge request tpo/core/arti!978
2023-01-24 15:05:19 +00:00
Nick Mathewson
fd8915155e
Merge branch 'ignore' into 'main'
...
Do not .gitignore crates/*/fuzz/corpus
See merge request tpo/core/arti!982
2023-01-20 18:47:20 +00:00
Ian Jackson
5c76bca692
tor-llcrypto: Tolerate some warnings (fmt)
2023-01-20 17:29:45 +00:00
Ian Jackson
4e6f5b7ff3
Do not .gitignore crates/*/fuzz/corpus
...
These are symlinks which are actually checked in. They should not be
ignored. (This caused trouble for some of my privsep tooling...)
2023-01-20 17:29:00 +00:00
Ian Jackson
bd21d23279
tor-llcrypto: Tolerate some warnings
...
Without this,
cargo +stable clippy -p tor-netdoc --all-features
produces warnings.
2023-01-20 16:37:31 +00:00
Nick Mathewson
131775bf36
Upgrade to latest rsa crate.
2023-01-20 08:06:30 -05:00
Nick Mathewson
02a1f9a3e4
Upgrade to latest async-broadcast
...
(We don't yet use the code that uses it, but we might as well have
our unused code be up-to-date.)
2023-01-20 08:06:30 -05:00
Nick Mathewson
707efc944d
upgrade to latest serial_test
2023-01-20 08:06:30 -05:00
Nick Mathewson
889206cde4
Complete our migration to base64ct.
...
This is in lieu of upgrading to the latest base64 crate, which has
a different API from the old one. Since we have to migrate either
way, we might as well use base64ct everywhere.
I don't think that most of these cases _require_ constant-time
base64, but it won't hurt.
2023-01-20 08:06:30 -05:00
Nick Mathewson
6cb0528cc1
Upgrade to latest rlimit crate.
2023-01-19 14:10:54 -05:00
Neel Chauhan
66a649f5f8
Prop304: Add extended SOCKS result codes for onion services
2023-01-18 18:39:00 -08:00
Michael van Straten
fa93f6674d
made TorClient::set_stream_prefs public
2023-01-18 18:20:59 +01:00
Nick Mathewson
12845d6e1e
tor-proto: Draft API to handle incoming BEGIN requests.
...
Onion services (and later, exits and caches) will need this.
2023-01-17 15:20:03 -05:00
Nick Mathewson
e8ed46006e
tor-proto: Expose support for doing onion service handshakes
...
This is a little tricky, but I think that we're not actually
exposing too much here. I expect we'll need to tweak this stuff
between now and our final version.
2023-01-17 15:20:03 -05:00
Nick Mathewson
99fdaa7c2e
tor-proto: Draft APIs for handling control messages
...
We will need these for onion services, to send and receive messages
of types not handled directly by the tor-proto crate.
2023-01-17 15:20:03 -05:00
Nick Mathewson
4fedd301cf
tor-proto: Rename "hs" experimental feature to "onion-common"
...
(For consistency with other crates)
2023-01-17 15:20:03 -05:00
Nick Mathewson
56cb2d2a10
Make a top-level API for connecting to onion services.
...
Fortunately, it adds very little to the arti-client API surface.
2023-01-12 09:28:58 -05:00
Nick Mathewson
7030cbe460
Merge branch 'onion-netdir-apis' into 'main'
...
Add onion service APIs to tor-netdir
See merge request tpo/core/arti!966
2023-01-11 16:08:18 +00:00
Nick Mathewson
de3f10f492
netdir: add network parameters related to onion services
...
These are available unconditionally, since they represent
comparatively little storage and processing effort.
See param-spec.txt section 8 for the original information here.
2023-01-11 09:10:08 -05:00
Nick Mathewson
136f70545d
tor-units: Add an IntegerMinutes.
2023-01-11 09:10:08 -05:00
Nick Mathewson
5b74ef7af9
Adjust onion service ring APIs in light of prop#342
...
* It is the NetDir's responsibility to tell the caller what the time
period is.
* There can be up to two secondary time periods.
* Each time period has a single SRV.
* Secondary time periods only apply for onion services, when they
publish.
* When publishing, the correct input is a time period.
2023-01-11 09:04:13 -05:00
Nick Mathewson
f24f8d295c
Sketch APIs for the onion service directory ring.
...
These are a bit complex internally, but the API they present is
pretty simple. I've left some discussion of points where the design
isn't totally fleshed out, and where we need to look harder at the
spec.
Part of #716 .
2023-01-11 09:04:13 -05:00
Nick Mathewson
2c41321710
Netdoc: Refactor SharedRandVal.
...
SharedRandVal now holds only the 32-byte random value itself; the
"number of commits" field is in SharedRandStatus.
This commit also makes the SharedRandVal be exactly 32 bytes, since
we've set it to that value in the spec.
2023-01-11 09:04:12 -05:00
Nick Mathewson
d7abced11f
hscrypto: Add several derives
...
The important addition here is the Copy derives, which affect API
design. I'm applying them to the types that are 32 byte or smaller.
2023-01-11 09:04:12 -05:00
Ian Jackson
d6800bae0c
Merge branch 'blind_privkey' into 'main'
...
llcrypto: Implement secret-key blinding.
Closes #719
See merge request tpo/core/arti!964
2023-01-09 18:06:00 +00:00
eta
cea6396513
Merge branch 'typos' into 'main'
...
Fix typos
See merge request tpo/core/arti!965
2023-01-09 14:44:00 +00:00
eta
371bcdc554
Merge branch 'arti-hyper-fixing-715' into 'main'
...
Temporary fix for #715 and #569
Closes #715
See merge request tpo/core/arti!958
2023-01-09 14:43:37 +00:00
Dimitris Apostolou
892c6eaadf
Fix typos
2023-01-07 20:35:54 +02:00
Michael van Straten
2e8c38d11d
Removed unnecessary "all()" cfg constraint
2023-01-07 13:00:40 +01:00
Michael van Straten
90a25fa21a
Added x86_64-apple-darwin to fallback to "tls-api-openssl"
2023-01-07 12:57:23 +01:00
Michael van Straten
0a04851636
fixed "broken_intra_doc_link"
2023-01-06 19:43:44 +01:00
Nick Mathewson
8472acf3ac
Merge branch 'onion-api-v0.2' into 'main'
...
Onion service APIs, part 1.
See merge request tpo/core/arti!959
2023-01-06 18:32:36 +00:00
Ian Jackson
0c2f800ab0
Merge branch 'sensitive' into 'main'
...
tor-proto: Remove some sensitive info from errors
See merge request tpo/core/arti!934
2023-01-06 18:07:26 +00:00
Nick Mathewson
7f6e3e19a3
Sketch a solution for arti#525
2023-01-06 13:03:50 -05:00
Nick Mathewson
91d9ffe0b6
Sketch out new required APIs in tor-cell
2023-01-06 13:03:50 -05:00
Nick Mathewson
9a54e01dd0
tor-cert: add a few hs TODOs
2023-01-06 13:03:50 -05:00
Nick Mathewson
eba937e54c
netdoc: Outline some basic types for encoding HsDescs.
2023-01-06 13:03:50 -05:00
Nick Mathewson
0203634ec5
Create a new tor-hscrypto crate.
...
This module has types and operations needed in multiple places
for an onion service implementation. There are a bunch of
TODO hs-crypto comments that we'll need to fill in.
2023-01-06 13:03:50 -05:00
Nick Mathewson
e650e07cd4
netdoc: note some changes we will have to make to srv
2023-01-06 13:03:50 -05:00
Nick Mathewson
7d38bbd829
llcrypto: fix a comment.
...
This described the wrong type of key.
2023-01-06 13:03:50 -05:00
Nick Mathewson
e7c87372e2
llcrypto: clarify meaning of "Identity".
...
The `Ed25519Identity` and `RsaIdentity` types are not precisely
always used as relay identifiers: they are more generally used as
_key_ identifiers.
This will become relevant as `RsaIdentity` is used for authority
keys (as in authorities' VoterInfo blocks), and as `Ed25519Identity`
is used as the identifier behind an onion service key.
2023-01-06 13:03:47 -05:00
Ian Jackson
98acafe9d1
tor-proto: rustfmt
...
Not sure why the tree didn't have this newline already. "Whatever".
2023-01-06 17:26:54 +00:00
Ian Jackson
0639b105c5
tor-proto: CreateFastWrap::decode_chanmsg: Do not report handshake
...
The debug impl prints the handshake challenge, which we should
probably treat as sensitive.
2023-01-06 17:26:54 +00:00
Ian Jackson
df2124e28f
tor-proto: impl Display for CreateResponse
...
Don't print the handshake value, but do print the display reason.
2023-01-06 17:26:54 +00:00
Ian Jackson
8c925499f8
tor-proto: When relay IDs mismatch, the IDs are sensitive in errors
2023-01-06 17:26:54 +00:00
Nick Mathewson
1e25a962a7
chanmgr: trace-level logs when launching connections.
...
Based on more temporary debugging code. Yet another part of #677 .
2023-01-06 17:19:00 +00:00
Nick Mathewson
71dfaa3125
ptmgr: Add more logs when looking/creating a PT.
...
These are also based on temporary logs that I added locally while I
was hunting bugs.
Also part of #677 .
2023-01-06 17:19:00 +00:00
Nick Mathewson
3eebe33678
ptmgr: Add more logging to IPC code.
...
This is based on logs that I added locally while I was trying to
debug some startup issues. Hopefully they'll make things easier the
next time there's something to debug.
Part of #677 .
2023-01-06 17:19:00 +00:00
eta
b525fccfb0
Merge branch 'ya-lint' into 'main'
...
tor-linkspec: Fix an unused lint
See merge request tpo/core/arti!935
2023-01-06 17:16:27 +00:00
eta
118050e54c
Merge branch 'test-lints' into 'main'
...
Add test lint blocks to all "mod test"
See merge request tpo/core/arti!937
2023-01-06 17:16:09 +00:00
eta
fbae20537c
Merge branch 'bug589a' into 'main'
...
Remove allow(unreachable_pub) from tor-guardmgr/src/lib.rs
Closes #589
See merge request tpo/core/arti!944
2023-01-06 17:14:03 +00:00
eta
d869676263
Merge branch 'socks-resolve-ip' into 'main'
...
resolve ip through socks by parsing them
Closes #714
See merge request tpo/core/arti!957
2023-01-06 17:08:25 +00:00
Nick Mathewson
306e72c566
llcrypto: Implement secret-key blinding.
...
Closes #719 .
Due to a difference between ed25519-dalek and ed25519-donna,
converting these secret keys directly to public keys does not work.
I've documented this in a "Limitations" section.
2023-01-06 12:02:49 -05:00
eta
246a5f1e56
Merge branch 'ctbytes' into 'main'
...
Add a new "CtByteArray" type, and use it in Id types.
See merge request tpo/core/arti!962
2023-01-06 16:41:29 +00:00
Nick Mathewson
9d3f19fd38
Add a new "CtByteArray" type, and use it in Id types.
...
This type provides a common implementation for types that are
implemented as arrays of bytes that should only be compared
with constant-time comparisons.
2023-01-05 12:34:14 -05:00
Michael van Straten
0d05a61381
Temporary fix for #715 and #569
2023-01-05 00:00:47 +01:00
Ian Jackson
a7035d08a1
Merge branch 'tor-rtmock-rfc3399' into 'main'
...
Use parse_rfc3339() in the tor-rtmock crate
See merge request tpo/core/arti!943
2023-01-04 14:32:13 +00:00
Ian Jackson
8f91bc5ef9
Merge branch 'tor-proto-use-rfc3339' into 'main'
...
Use parse_rfc3339() in the tor-proto crate
See merge request tpo/core/arti!942
2023-01-04 14:31:07 +00:00
Ian Jackson
0ac7dfbd9e
Merge branch 'tor-netdoc-rfc3399' into 'main'
...
Use parse_rfc3339() in the tor-netdoc crate
See merge request tpo/core/arti!941
2023-01-04 14:30:08 +00:00
trinity-1686a
29f1d9012d
resolve ip through socks by parsing them
2023-01-03 17:53:16 +01:00
Emil Engler
8579bc66a8
doc: consistent summary line for the READMEs
...
This commit introduces a consistency to the summary line of all
README.md files in each and every crate.
2022-12-20 14:31:47 +01:00
Neel Chauhan
e39e39ea27
Add semver.md for (into_)handshake()
2022-12-19 08:25:15 -08:00
Neel Chauhan
b649a1d86f
msg::{CreateFast/CreatedFast}: Rename accessor to (into_)body()
2022-12-18 21:00:24 -08:00
Neel Chauhan
23db2944cc
Remove allow(unreachable_pub) from tor-guardmgr/src/lib.rs
...
Closes #589
2022-12-16 13:23:57 -08:00
Neel Chauhan
11958c9241
Use parse_rfc3339() in the tor-rtmock crate
2022-12-16 13:07:49 -08:00
Neel Chauhan
a180f911bd
Use parse_rfc3339() in the tor-netdoc crate
2022-12-16 12:56:00 -08:00
Neel Chauhan
c171c0f834
Use parse_rfc3339() in the tor-proto crate
2022-12-16 12:53:50 -08:00
Ian Jackson
fa5a417fc9
Merge branch 'err-dyn-report' into 'main'
...
Error logging (ErrorReport, .report()) POC
See merge request tpo/core/arti!936
2022-12-15 15:02:17 +00:00
Ian Jackson
8a28cb2d14
tor-error: tests: Add a test case for Report and Bug wrapping
2022-12-15 14:37:08 +00:00
Ian Jackson
125a455bdc
test lint blocks: Add many many automatically
...
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
2022-12-12 18:00:30 +00:00
Ian Jackson
baf78361e8
test lint blocks: Do some semi-manually
...
This is the hunks from running the rune in maint/adhoc-add-lint-blocks
but which require some subsequent manual fixup: usually, deleting
now-superfluous outer allows, but in some cases manually putting back
lints that the adhoc script deleted.
2022-12-12 18:00:29 +00:00
Ian Jackson
ec7720ae91
test lint blocks: Standardise one in tor-socksproto
...
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.
2022-12-12 17:50:39 +00:00
coral
25f113b8b3
Tackling issue #663 (Use humantime in tests)
2022-12-12 17:41:22 +00:00
Ian Jackson
4181ccb8cc
tor-circmgr: Use ErrorReport on a logged error
...
To demonstrate what the use looks like.
2022-12-12 16:40:51 +00:00
Ian Jackson
b132536b32
tor-error: Provide ErrorReport extension trait with .report() method
2022-12-12 16:40:51 +00:00
Ian Jackson
bd46e2ae84
tor_error: Promote internal StdError alias to report
...
The std::error::Error repetition was getting rather repetitively
repetitious, and is about to get more so.
2022-12-12 16:40:51 +00:00
Ian Jackson
8fea4dd6d3
tor-proto: reactor tests: Use debug fmt on an error
...
In tests, debug fmt is usually appropriate.
Found while looking for a candidate for
https://gitlab.torproject.org/tpo/core/arti/-/issues/680
2022-12-12 16:40:51 +00:00
Ian Jackson
05ca80950e
tor-linkspec: Fix an unused lint
...
Otherwise:
cargo +stable clippy -p tor-proto --all-features --all-targets
Produces:
warning: unused import: `PtTargetAddr`
--> crates/tor-linkspec/src/traits.rs:9:28
|
9 | use crate::{ChannelMethod, PtTargetAddr, RelayIdRef, RelayIdType, RelayIdTypeIter};
| ^^^^^^^^^^^^
2022-12-12 15:08:31 +00:00
Ian Jackson
5611d5cb0c
Rename Sensitive::into_inner() from ::unwrap()
...
By analogy with similar methods on Mutex, Cell, BufReader, etc. etc.
Discussed here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/890#note_2856885
Make it a method, as per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/928
2022-12-12 11:52:34 +00:00
Dimitris Apostolou
7c1beb6171
Fix typos
2022-12-09 11:57:36 +02:00
Nick Mathewson
dc2c00e282
Merge branch 'doc-config-must' into 'main'
...
tor-config: Document how to reject compiled-out features
Closes #654
See merge request tpo/core/arti!929
2022-12-07 13:20:09 +00:00
Nick Mathewson
64ea12d4b9
Merge branch 'shewllexpand' into 'main'
...
tor-config: Update to shellexpand 3.x
See merge request tpo/core/arti!927
2022-12-07 13:19:39 +00:00
Ian Jackson
4e74104e70
Merge branch 'spelling-20221206' into 'main'
...
A few spelling fixes for bridgedescmgr code
See merge request tpo/core/arti!925
2022-12-06 18:25:43 +00:00
Ian Jackson
d88e890583
Merge branch 'persist_err_test' into 'main'
...
Test a couple more error cases in tor-persist, and lightly refactor
See merge request tpo/core/arti!930
2022-12-06 16:38:28 +00:00
Ian Jackson
fe5aeed41f
Merge branch 'safelog_tests' into 'main'
...
More unit tests for safelog crate
See merge request tpo/core/arti!928
2022-12-06 16:17:44 +00:00
Ian Jackson
2321d0ba0b
Merge branch 'faravahar-removal' into 'main'
...
dirauth: Remove Faravahar
See merge request tpo/core/arti!924
2022-12-06 16:02:22 +00:00
Nick Mathewson
764eecabab
Test a couple more error cases in tor-persist.
2022-12-06 10:55:26 -05:00
Ian Jackson
dc3c7651ca
tor-config: Document how to reject compiled-out features
...
Fixes #654
2022-12-06 15:51:43 +00:00
Ian Jackson
f3fa77be6f
tor-config: Add "particular situations" sections and mention list_builder
2022-12-06 15:51:31 +00:00
Nick Mathewson
3ab548eb1c
safelog: tests for accessors.
2022-12-06 10:31:40 -05:00
Nick Mathewson
417dda9547
safelog: tests for BoxSensitive.
2022-12-06 10:28:53 -05:00
Ian Jackson
ba338bdf37
tor-config: Update to shellexpand 3.x
...
This is the new upstream version (published by me, recently).
It has the same MSRV and one breaking change:
The caller who specifies a home dir function for substituting into
strings, must now supply a string, not Path. Previously shellexpand
would allow the caller to supply non-unicode data, and then simply not
substitute it. That was an infelicity in the shellexpand API.
Now this infelicity is pushed into our code. The overall behaviour of
Arti hasn't changed as a result. And it seems reasonable to me.
shellexpand 3.x also has a module for expanding Paths instead, in
response to requests for this filed as upstream tickets. We *could*
use that but I am not sanguine about that approach: the Pathness would
spread throughout much of our config and file handling code.
I think we should at the very least postpone trying to work with
invalid-unicode-paths as long as we can.
2022-12-06 15:15:22 +00:00
Ian Jackson
010ffd6ea6
tor-config: home dir handling: fmt pre-patch
2022-12-06 15:11:58 +00:00
Nick Mathewson
993b4202c7
safelog: more tests for Redacted.
2022-12-06 09:34:26 -05:00
Nick Mathewson
f204eebf11
arti-client: spelling fix.
2022-12-06 09:08:26 -05:00
Nick Mathewson
02d340e4b2
dirmgr: Spelling fixes and normali[sz]ations
2022-12-06 09:02:48 -05:00
David Goulet
5ea8c8eed0
dirauth: Remove Faravahar
...
See https://gitlab.torproject.org/tpo/core/tor/-/issues/40688
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-12-06 09:01:34 -05:00
David Goulet
43aa24b231
dirauth: New v3 identity key for moria1
...
We are rotating moria1's key due to a break-in few weeks ago. See
https://gitlab.torproject.org/tpo/core/tor/-/issues/40722 for more
details.
The original MR for C-tor (tor.git) done by Roger Dingledine, moria1's
operator, is here:
https://gitlab.torproject.org/tpo/core/tor/-/merge_requests/662
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-12-06 08:42:09 -05:00
eta
16305a6415
Merge branch 'optional-deps-static' into 'main'
...
make use of 1.60 weak dependancy features
Closes #434
See merge request tpo/core/arti!920
2022-12-05 15:21:55 +00:00
Nick Mathewson
e0aeda3071
Remove semver.md files now that 1.1.0 is released.
2022-11-30 17:10:29 -05:00
Nick Mathewson
40941c6079
Merge branch 'version_bump' into 'main'
...
Bump the minor version of every crate.
See merge request tpo/core/arti!918
2022-11-30 20:54:15 +00:00
trinity-1686a
39fffd8d03
make use of 1.60 opt dependancy features
2022-11-30 21:24:04 +01:00
Nick Mathewson
38bef96b99
Bump the minor version of every crate.
...
We made this job easy this time around: by incrementing our MSRV, we
have forced ourselves to do at least a minor bump everywhere.
2022-11-30 15:10:16 -05:00
Nick Mathewson
82f877ec79
Hang onto a PT object after it is launched
...
If we don't do this, then snowflake's stdin will get closed and
it will exit immediately.
Found while investigating #333 .
2022-11-30 14:44:14 -05:00
Nick Mathewson
903571353b
Merge branch 'renaming' into 'main'
...
Renaming a couple of items for arti 1.1.0
Closes #623
See merge request tpo/core/arti!916
2022-11-30 18:58:37 +00:00
Nick Mathewson
6bd0f92c15
Downgrade a "TODO pt-client" comment
2022-11-30 13:22:54 -05:00
Nick Mathewson
ed08cce1b5
Rename for_circuit_usage => as_relay_with_desc
2022-11-30 13:16:51 -05:00
Nick Mathewson
acc2de7b31
Rename TransportHelper => TransportImplHelper.
2022-11-30 13:05:46 -05:00
Ian Jackson
17ba4a1cc2
Merge branch 'redacted_test_serial' into 'main'
...
safelog: Apply #[serial] to test_redacted()
Closes #675
See merge request tpo/core/arti!914
2022-11-30 17:38:12 +00:00
eta
e13f2cf7d9
Merge branch 'ptmgr-todos' into 'main'
...
Dispose of ptmgr TODOs (and remove a dead variable)
See merge request tpo/core/arti!912
2022-11-30 17:37:47 +00:00
Nick Mathewson
a0e1b3d651
Merge branch 'bridge-addr-2' into 'main'
...
Separate BridgeAddr and PtTargetAddr
See merge request tpo/core/arti!904
2022-11-30 17:36:50 +00:00
eta
5c2847e1d0
Merge branch 'fix_pt_protocol' into 'main'
...
Resolve two bugs in our pt-socks implementation
Closes #676
See merge request tpo/core/arti!913
2022-11-30 17:25:31 +00:00
Ian Jackson
8157cf059e
Merge branch 'abolish-set-default-transport' into 'main'
...
Abolish ChanMgr::set_default_transport
See merge request tpo/core/arti!910
2022-11-30 17:05:36 +00:00
Nick Mathewson
4688ee9165
safelog: Apply #[serial] to test_redacted()
...
Closes #675 .
2022-11-30 12:00:17 -05:00
Nick Mathewson
e835bd4c4c
PT protocol: pt-spec conformance with password field
...
pt-spec says:
```
If the encoded argument list is less than 255 bytes in
length, the "PLEN" field must be set to "1" and the "PASSWD"
field must contain a single NUL character.
```
This is a very silly thing to say, but some PTs enforce it.
Fixes #676 .
2022-11-30 11:53:38 -05:00
Nick Mathewson
475d9af34a
connect_via_proxy: Actually send initial handshake.
...
Our previous code would make a TCP connection to the proxy, then
wait forever for it to say something. Whoops!
Part of a fix for #676 .
2022-11-30 11:53:27 -05:00
Ian Jackson
fa676ce577
ptmgr todo: Remove dead code allow
2022-11-30 16:42:40 +00:00
Ian Jackson
fe33112923
ptmgr: No need for state_dir in PtMgr
...
This is used exclusively by the reactor.
2022-11-30 16:42:18 +00:00
Ian Jackson
1521f63bf1
ptmgr todo: Tolerate exposing the Vec for now
...
We may want to change this later, but this API is in a low level
crate, so this isn't a blocker.
2022-11-30 16:40:45 +00:00
Ian Jackson
4afe128189
PT SOCKS tests: add a few more tests
2022-11-30 16:35:04 +00:00
Ian Jackson
596e67f588
PT SOCKS tests: test name that only fits in V4
2022-11-30 16:35:04 +00:00
Nick Mathewson
a5cdf88fdc
Merge branch 'pt-todo-highlevel' into 'main'
...
Dispose of all TODO pt-client in arti-*
See merge request tpo/core/arti!909
2022-11-30 16:22:46 +00:00
eta
f122b4b1ee
Merge branch 'no_empty_select' into 'main'
...
ptmgr: Do not construct an empty select_all future.
Closes #672 and #670
See merge request tpo/core/arti!907
2022-11-30 16:01:58 +00:00
Ian Jackson
ab74506dc9
Abolish ChanMgr::set_default_transport
...
The comment says
// TODO pt-client: It's not clear to me that we really need this method.
and empirically, deleting it, and its callee, is fine.
2022-11-30 16:00:31 +00:00
Ian Jackson
e068c5c2bc
Merge branch 'ptmgr-errs' into 'main'
...
ptmgr: error fixes
See merge request tpo/core/arti!906
2022-11-30 15:58:26 +00:00
Ian Jackson
e6d721c497
arti: transports parsing: Record this as a ticket
2022-11-30 15:56:16 +00:00
Ian Jackson
598f4e2e28
arti: BridgesConfig is evidently not too high up
...
Since apparently it was possible to write all the other code without
moving it.
2022-11-30 15:51:10 +00:00
Ian Jackson
e4ac39e638
bridge config: Add a TODO about a redundant clone
2022-11-30 15:49:34 +00:00
Ian Jackson
429d2c7cb7
bridge config: Rename accessors
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/904#note_2858480
2022-11-30 15:49:34 +00:00
Ian Jackson
117bee5808
bridge config: Use unreachable, not None.expect
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/904#note_2858479
2022-11-30 15:49:34 +00:00
Ian Jackson
bb6c98bdc1
BridgeAddr tests: dedupe slightly
2022-11-30 15:49:34 +00:00
Ian Jackson
199a6e0754
Separate BridgeAddr and PtTargetAddr
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/issues/668#note_2858220
This commit is difficult to split up.
The innards of BridgeAddr and PtTargetAddr are still a bit entangled.
2022-11-30 15:49:34 +00:00
Ian Jackson
a74ee097f5
arti: pt mgr spawns the task itself in new
2022-11-30 15:48:31 +00:00
Ian Jackson
455295457f
Merge branch 'redaction_fix' into 'main'
...
Fix a logic error in Redacted.
Closes #671
See merge request tpo/core/arti!905
2022-11-30 15:39:41 +00:00
Nick Mathewson
d853fdb5cb
ptmgr: Do not construct an empty select_all future.
...
Closes #670 .
Closes #672 .
2022-11-30 10:22:09 -05:00
Ian Jackson
1e63a89ce8
ptmgr: change error UnconfiguredTransportDueToConcurrentReconfiguration
...
Rename it from UnconfiguredTransport. Change descriptions, kind, and
retry. Add a TODO.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/901#note_2858455
2022-11-30 15:21:49 +00:00
Ian Jackson
d705454313
ptmgr: Clarify E::NotAFile
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/901#note_2858454
2022-11-30 15:21:39 +00:00
Ian Jackson
f19d8e0397
ptmgr: Fix kind for E::StatedirCreateFailed
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/901#note_2858456
2022-11-30 15:21:39 +00:00
Nick Mathewson
80d9248b50
Merge branch 'merge_ptreactor' into 'main'
...
Merge PtReactor, resolve a few of my comments.
See merge request tpo/core/arti!903
2022-11-30 15:21:13 +00:00
Nick Mathewson
f0084e3fd4
Fix a logic error in Redacted.
...
Previously it was redacting exactly when safelogging was _disabled_,
which obviously isn't correct.
Fixes #671 . Regression test included.
2022-11-30 09:07:33 -05:00
Nick Mathewson
dacb3eafda
ptmgr: report an error if PT transports don't match requested.
...
(I think this may be impossible now, since we check in ipc.rs, but
IMO it's best to check.)
2022-11-29 20:01:19 -05:00
Nick Mathewson
5f0f5f81b1
arti-client: Try to take ownership of state earlier.
...
There's no harm in doing this, since we'll try to take ownership of
the state soon as soon as we use it: We just want to try early, so
that we'll get it before we decide that we're using bridges.
Fixes bug #669 ; bug introduced by !889 .
2022-11-29 19:58:42 -05:00
Nick Mathewson
fdc49b1fed
Register transport in pt reactor even if it has no pending requests
2022-11-29 19:35:38 -05:00
Nick Mathewson
9765fdc2e6
ptmgr: Use anonymize_home when displaying paths in errors
2022-11-29 19:30:50 -05:00
Nick Mathewson
f6311c83f7
ptmgr: Use PluggableTransport::identity in logs.
...
This lets us avoid logging the user's path.
2022-11-29 19:20:44 -05:00
Nick Mathewson
bb0749cd42
Centralize the "find an identifier for the pt name" logic in one place.
2022-11-29 19:13:32 -05:00
Nick Mathewson
21e7e52ad5
Merge remote-tracking branch 'eta/ptreactor-v1' into merge_ptreactor
...
Resolved several conflicts while doing so; mostly with !893 and
!895 .
2022-11-29 18:55:49 -05:00
eta
9b4fc50625
tor-ptmgr: add PtReactor
...
This fleshes out the PtReactor that was previously a stub, making it
actually do reactor-ey things. Note that this is entirely untested, and
might not work at all. Hopefully it does, though.
2022-11-29 20:13:32 +00:00
Nick Mathewson
7ef9dde99c
Merge branch 'todos-chanmgr' into 'main'
...
chanmgr: resolve several remaining "TODO pt-client" issues
See merge request tpo/core/arti!897
2022-11-29 19:31:48 +00:00
Nick Mathewson
dc5551114c
Merge branch 'list-builder-lint' into 'main'
...
tor-basic-utils: list_builder: Use standard test lint block
See merge request tpo/core/arti!900
2022-11-29 19:25:07 +00:00
Ian Jackson
f3c8b0433b
tor-basic-utils: list_builder: Use standard test lint block
...
This gets rid of a spurious warning on nightly about the use of dbg!
2022-11-29 18:41:56 +00:00
Nick Mathewson
bdddb78828
Merge branch 'more-linkspec-tests' into 'main'
...
Add tests for a bunch of code in tor-linkspec
See merge request tpo/core/arti!867
2022-11-29 18:41:54 +00:00
Nick Mathewson
8cc09c2728
chanmgr: Distinguish failure to connect to proxy from other IO failures
2022-11-29 13:41:35 -05:00
Ian Jackson
c3bdb30025
Merge branch 'ptmgr-optional-dep-test' into 'main'
...
MultilineListBuilder etc.: add serde tests
See merge request tpo/core/arti!899
2022-11-29 18:37:43 +00:00
Ian Jackson
b36a23cfd3
Merge branch 'ptmgr-optional-dep' into 'main'
...
Support building without pluggable transports
Closes #649
See merge request tpo/core/arti!898
2022-11-29 18:26:30 +00:00
Ian Jackson
303fafe81b
Merge branch 'll-todo-fixes' into 'main'
...
Fix and resolve TODO pt-client comments in guardmgr, linkspec.
See merge request tpo/core/arti!896
2022-11-29 18:14:25 +00:00
Ian Jackson
cdc1e574f9
tor-config MultilineListBuilder: Test deserialisation
2022-11-29 17:53:04 +00:00
Ian Jackson
255f3b6bf6
tor-config MultilineListBuilder: Print line number starting at 1, not 0
2022-11-29 17:53:04 +00:00
Ian Jackson
ef07c2e99d
tor-config list_builder tests: Move Outer up a level
...
We're going to reuse this.
2022-11-29 17:53:04 +00:00
Ian Jackson
211a832f6d
Clarify internal error.
2022-11-29 17:22:16 +00:00
Ian Jackson
143b331ef7
arti-client: Make ptmgr actually optional
2022-11-29 16:32:14 +00:00
Ian Jackson
1bd606ab5c
guardmgr: Conditionalise DisplayRule::Redacted
...
This is unused in bridgeless configs. Fixes a compiler warning.
2022-11-29 16:32:14 +00:00
Ian Jackson
c92dcb5f50
arti, arti-client: Conditionalise various things on pt-client
2022-11-29 16:32:14 +00:00
Ian Jackson
d05d383fa5
arti cfg tests: Add some more debug output
2022-11-29 16:32:14 +00:00
Ian Jackson
71e81bf7b4
MultilineListBuilder: Use a manual implementation of Deserialize
...
The error message from `#[serde(untagged)]` would otherwise start to
appear when we try to deserialise unsupported PT configurations, when
compiled with bridge but not PT support.
2022-11-29 16:32:14 +00:00
Nick Mathewson
c6aa587dc8
chanmgr: remove a now-stale TODO.
2022-11-29 11:15:36 -05:00
Nick Mathewson
4fff9f9dda
chanmgr: Report Pt errors correctly.
...
We were panicking if the PtMgr gave us an error, which isn't so
good.
2022-11-29 11:10:26 -05:00
Nick Mathewson
6b12c5d1de
guardmgr: remove todo about bridge::config::Inner members
...
We've revised this a few times; now it seems plausible.
2022-11-29 11:03:44 -05:00
Nick Mathewson
0c0f3d1faf
guardmgr: Remove now-unneeded #[allow(unnecessary_wraps)]
2022-11-29 11:00:27 -05:00
Nick Mathewson
69744ef8f3
Remove deprecated aliases in tor-linkspec.
2022-11-29 10:56:59 -05:00
Nick Mathewson
75cba2ce80
ptmgr: Refine RetryTime for ChildSpawnFailed.
2022-11-29 10:44:09 -05:00
Nick Mathewson
29ea66ecb9
ptmgr: Rename ClientTransportFailed, document, and correct its RetryTime.
2022-11-29 10:42:26 -05:00
Nick Mathewson
d9dc30bc13
ptmgr: Replace StdioUnavailable with a PtError.
2022-11-29 10:36:51 -05:00