trinity-1686a
ca99e9f635
add feature annotation to fields made visible through visible::StructFields
2022-08-24 18:22:41 +02:00
trinity-1686a
426a59b2ba
add feature annotation not added by doc_auto_cfg
2022-08-24 18:22:41 +02:00
trinity-1686a
7f939fa480
enable doc_auto_cfg feature on every crate when documenting for docs.rs
2022-08-24 18:22:41 +02:00
Nick Mathewson
187c6b48df
Merge branch 'no_root' into 'main'
...
arti: Do not allow running as root.
See merge request tpo/core/arti!688
2022-08-24 15:21:57 +00:00
Nick Mathewson
25c287636b
arti: Do not allow running as root.
...
This can be overridden with `application.allow_running_as_root`.
Part of #523 .
2022-08-24 10:57:03 -04:00
Nick Mathewson
51eb0e6ca2
Merge branch 'test-old-config' into 'main'
...
Test oldest example configuration file
See merge request tpo/core/arti!684
2022-08-23 14:43:30 +00:00
Ian Jackson
ee2580face
tor-config: resolve_option_general: Add semver note
2022-08-23 14:21:13 +01:00
Ian Jackson
0c747b8069
tor-config: resolve_option_general: Add TODO about example
2022-08-23 14:20:49 +01:00
Nick Mathewson
32c14d37bf
Fix syntax in doc comment.
2022-08-23 12:59:41 +00:00
Ian Jackson
298f6f508c
arti cfg: Write down future plans
...
Mostly cribbed from
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/684#note_2829937
2022-08-23 13:55:48 +01:00
Ian Jackson
457c17adb0
tor-config: Provide resolve_option_general, for T: !Default etc.
...
At one point in this MR I thought I was going to want this for
arti::cfg::ListenConfig (which we don't want to be Default).
In fact ListenConfig is being handled specially, but having written
this function it seemed sensible to keep it. Since resolve_option
becomes a wrapper for it, the existing tests exercise it.
2022-08-22 16:26:38 +01:00
Ian Jackson
086cf3701a
arti cfg: Test parsing of the oldest config file we still support
2022-08-22 16:26:22 +01:00
Ian Jackson
a1cc2578b3
arti cfg: Fix docs about ARTI_EXAMPLE_CONFIG
...
The defaults are now
2022-08-22 16:26:22 +01:00
Ian Jackson
46d9dadd02
Merge branch 'channel' into 'main'
...
Channel padding
See merge request tpo/core/arti!657
2022-08-17 10:26:25 +00:00
Ian Jackson
d4ce701fa4
channel padding: Only do anything with link protocol 5
...
Or rather, if we *didn't* negotiate 4, which is too old.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2828354
2022-08-17 10:54:41 +01:00
Ian Jackson
08a7257fe9
channel padding: Properly advertise link protocol 5
...
We already actually send and negotiate the padding, since !657 ,
but we ought to negotiate a protocol version where that's not a
violation!
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2828354
2022-08-17 10:54:41 +01:00
Ian Jackson
a0b0eca93e
tor-netdoc: if_ito: Add expansion of acronym
2022-08-17 10:54:41 +01:00
Ian Jackson
8339558ba8
channel padding: Move initial config of ChannelPaddingInstructions
...
Making ChannelPaddingInstructions::default() accurately reflect the
initial state of the reactor's padding timer simplifies the code
somewhat.
(When padding is wanted, parameters are computed and inserted
explicitly, so the only change is that if we start out dormant, we
defer setting the timer parameters until necessary.)
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827249
2022-08-17 10:54:41 +01:00
Ian Jackson
8a484a26e6
channel padding: Parameters: default_padding replaces Default impl
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827249
2022-08-17 10:54:41 +01:00
Ian Jackson
3aed28acd4
channel usage: Rename CU::UserTraffic from CU::Exit
...
As suggested in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827246
2022-08-17 10:54:41 +01:00
Ian Jackson
24e2c717f0
chanmgr padding: Correct docs for padding_parameters*
...
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827242
These texts were out of date; one of them still mentioned
`all_zeroes`.
2022-08-17 10:54:41 +01:00
Nick Mathewson
cbd759163a
Improve comment for ChannelUsage::Exit
2022-08-17 10:54:41 +01:00
Nick Mathewson
d44c860355
Fix typo in comment
2022-08-17 10:54:41 +01:00
Ian Jackson
c97ea4fce0
tor-chanmgr tests: Fix a minimal-versions failure (actually)
2022-08-17 10:54:41 +01:00
Ian Jackson
a892a3ee62
tor-chanmgr tests: Fix a minimal-versions failure
2022-08-17 10:54:41 +01:00
Ian Jackson
074d08bee8
arti: Fix a minimal-versions failure
2022-08-17 10:54:41 +01:00
Ian Jackson
d9338293c8
Add semver notes
2022-08-17 10:54:41 +01:00
Ian Jackson
4111c63bd4
channel reactor: Add some commented-out debug for padding
2022-08-17 10:54:41 +01:00
Ian Jackson
46885ac14b
channel padding: Correctly always send the timer parameters
...
Fixes "chanmgr configuration: Avoid sending needless initial update(s)"
2022-08-17 10:54:41 +01:00
Ian Jackson
496563e7cf
channel padding: Abolish ARTI_EXPERIMENTAL_CHANNEL_PADDING env var
...
This was for testing and is no longer needed.
2022-08-17 10:54:41 +01:00
Ian Jackson
299f302f35
channel engage_padding_activities: swap docs to tor0proto
...
This allow us to make a working cross-reference.
2022-08-17 10:54:41 +01:00
Ian Jackson
88dc816770
channel fake_channel_details: Use precise cfg
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826169
2022-08-17 10:54:41 +01:00
Ian Jackson
97363ba250
tor-netdir: testnet: construct_custom_netdir_with_params: Fix doc
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826168
2022-08-17 10:54:41 +01:00
Ian Jackson
52848a41c6
ChannelPaddingInstructions: Update and expand docs
2022-08-17 10:54:41 +01:00
Ian Jackson
2a4fd97229
ChannelPaddingInstructions: Rename `params` field to `insns`
2022-08-17 10:54:41 +01:00
Ian Jackson
949e5395e0
Rename ChannelsParams types to ChannelPaddingInstructions (fmt)
...
Run rustfmt; no other changes.
2022-08-17 10:54:41 +01:00
Ian Jackson
94dd3361e2
Rename ChannelsParams types to ChannelPaddingInstructions
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826167
This makes some lines too long; I will run rustfmt in a separate
commit for clarity.
2022-08-17 10:54:41 +01:00
Ian Jackson
d1a709f46d
chanmgr: Fix typo
...
Reported here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826166
2022-08-17 10:54:41 +01:00
Ian Jackson
590e174d3a
chanmgr parameterize: Correct doc comment
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826164
2022-08-17 10:54:41 +01:00
Ian Jackson
2404357282
Rename PaddingParameters::all_zeroes constructor to disabled
2022-08-17 10:54:41 +01:00
Ian Jackson
bb2ae00217
chamgr NetParamsExtract: Replace direct nf_ito access
...
It turns out that the TryFrom was infallible, which wasn't obvious
with the previous code structure.
2022-08-17 10:54:41 +01:00
Ian Jackson
03d8a09c0e
Channel: Make mutable() and engage_padding_activities infallible
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826151
This gets rid of quite some Bug error paths.
2022-08-17 10:54:41 +01:00
Ian Jackson
5db974ef72
Move ChannelUsage from tor_proto to tor_chanmgr
...
Replace Channel::note_usage with Channel::engage_padding_activities,
which unconditionally causes the channel to (start to) do netflow
padding things.
The condition now lives in chanmgr.
Addresses
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826094
2022-08-17 10:54:41 +01:00
Ian Jackson
49dad4bd13
tor-chanmgr: Expand docs for map::Inner dormancy field
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826093
2022-08-17 10:54:41 +01:00
Ian Jackson
4cf418f421
tor-cell: PaddingNegotiate::default_reduced
...
Get rid of unneeded constructor.
We never need to use hardcoded reduced padding parameters during
negotiation cell construction. If we are using reduced padding
parameters, the layers which decide this have netparams to use.
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826092
2022-08-17 10:54:41 +01:00
Ian Jackson
14c6e17797
tor-cell: PaddingNegotiate::start: take IntegerMilliseconds
2022-08-17 10:54:41 +01:00
Ian Jackson
18827b7fd0
chanmgr padding_parameters: Use Option
...
The network consensus parameters use (0,0) to mean "no padding"
(which is not the same as (0,0) means in a PADDING_NEGOTIATE cell).
Representing "no padding" this way is actually quite convoluted and
un-Rustic. Ensure that we convert (0,0) to None, and do the primary
logic in Option.
2022-08-17 10:54:41 +01:00
Ian Jackson
bdaee82187
tor-cell: PaddingNegotiate: give better spec xrefs
2022-08-17 10:54:41 +01:00
Ian Jackson
6fdaca8eb9
channel: Clarify (and in some places replace) "frontend" terminology
2022-08-17 10:54:41 +01:00
Ian Jackson
481bf0bbe9
tor-proto channel padding: Document PADDING_NEGOTIATE overwriting
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2825979
2022-08-17 10:54:41 +01:00