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
eta
bca7250524
Merge branch 'ansi-term' into 'main'
...
Tolerate RUSTSEC-2021-0139 (ansi_term unmaintained)
See merge request tpo/core/arti!683
2022-08-22 15:18:22 +00:00
Ian Jackson
eb93e05552
maint/cargo_audit: Tolerate RUSTSEC-2021-0139 (ansi_term unmaintained)
2022-08-22 10:37:00 +01:00
Ian Jackson
ff962e5109
maint/cargo_audit: Honour $CARGO
...
This makes it easier to for me to test this script. (I would like to
do this to all of them but it's easier on a case-by-case basis.)
2022-08-22 10:36:53 +01:00
Nick Mathewson
83eefe1e21
Merge branch 'format-python-script' into 'main'
...
Format python script in maint
See merge request tpo/core/arti!678
2022-08-17 12:45:02 +00: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
12c5af9b7a
doc/Compatibility.md: tick the box for link protocol 5
...
We do this now. As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2828364
2022-08-17 10:54:41 +01: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
Ian Jackson
1104235ee5
chanmgr: padding: Split IEFI into named function
...
Roughly as suggested in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826160
IMO this is less clear, because of the way it splits the logic up.
2022-08-17 10:54:41 +01:00
Ian Jackson
58fb118480
chanmgr: NetParamsExtract: extend docs for nf_ito
2022-08-17 10:54:41 +01:00
Ian Jackson
84d8c32543
chanmgr: Get rid of final Result relating to netdir/netparams
...
No functional change. (The error tyep was Void.)
2022-08-17 10:54:41 +01:00
Ian Jackson
48fc5d3c39
chanmgr: Use NetDirProvider::params and Arc<dyn..Netparameters>
...
This gets rid of many Result(). Many parameters are renamed.
Test cases of the now-impossible branch are removed.
Deleting the match from padding_parameters will come in a moment.
I've split off that commit since it has much whitespace noise.
for now, change the error type to Void.
2022-08-17 10:54:41 +01:00
Ian Jackson
3497d8723b
chanmgr: Add a TODO for renaming NetDirExtract
2022-08-17 10:54:41 +01:00
Ian Jackson
36e3529e34
chanmgr ChannelUsage: Fix and clarify docs
2022-08-17 10:54:41 +01:00
Ian Jackson
e4cd01732f
chanmgr set_dormancy: Remove obsolete comment
2022-08-17 10:54:41 +01:00