Ian Jackson
85cf744e9e
Move ApplicationConfig to arti crate
...
Code motion and import fixups.
2022-03-21 12:39:50 +00:00
Ian Jackson
6986a433aa
socks: abolish config accessors
...
Making these fields pub(crate) is quite reasonable and does away with
the need for accessors.
2022-03-21 12:39:50 +00:00
Ian Jackson
77b425ea0c
Move ProxyConfig to arti crate
...
We put this in cfg.rs, rather than (say) socks.rs, because it has
config relating to both socks.rs and dns.rs.
Code motion and import fixups.
2022-03-21 12:39:50 +00:00
Nick Mathewson
98105da708
Merge branch 'move-log' into 'main'
...
Combine logging config and implementation in arti lib crate
See merge request tpo/core/arti!421
2022-03-21 12:14:06 +00:00
Ian Jackson
f7c9910a43
Tidy up filt_from_opt_str
...
This was clumsy. Now it is brought together it can be simplified.
2022-03-21 11:44:21 +00:00
Ian Jackson
75a7c91161
Abolish logging filter option accessors
...
This de-duplicates the code that was in those accessors, and is now in
filt_from_opt_str.
Code motion and direct field access.
2022-03-21 11:44:21 +00:00
Ian Jackson
7e64f65d76
Abolish easy accessors for logging config
...
There are no longer needed, because the code that uses this
configuration now lives in the same module as the configuration
itself.
2022-03-21 11:44:21 +00:00
Ian Jackson
32d3076a82
Move logging configuration from arti_config::options to arti::logging
...
Code motion and import fixups.
2022-03-21 11:44:21 +00:00
Ian Jackson
b51fccb70e
Rename arti::trace module to arti::logging
...
We are going to move LoggingConfig here. We should follow the
already-public name IMO.
2022-03-21 11:42:44 +00:00
Ian Jackson
8aea5c9e43
Move ArtiConfig to new arti::cfg module
...
Code motion and import fixups.
2022-03-21 11:42:33 +00:00
Nick Mathewson
ff05ed61d7
Merge branch 'accessors' into 'main'
...
Abolish some accessors in drmgr
See merge request tpo/core/arti!423
2022-03-18 21:14:14 +00:00
Ian Jackson
25dab822f1
Add semver note
2022-03-18 16:49:25 -04:00
Ian Jackson
d651a894de
dirmgr: Authority: Abolish v3ident accessor
...
This makes this information crate-private. The crate can reasonably
just access it.
2022-03-18 16:49:25 -04:00
Ian Jackson
d1a9ed62f7
dirmgr: Authority: Move a method used only for testing
2022-03-18 16:49:25 -04:00
Ian Jackson
23cac566e1
dirmgr: Authority: Abolish two unused accessors
2022-03-18 16:49:25 -04:00
Ian Jackson
9c5480480a
dirmgr: NetworkConfig: Abolish accessors
...
Using accessors for crate-only fields is otiose.
2022-03-18 16:49:25 -04:00
Ian Jackson
a6d4109414
dirmgr: NetworkConfig: Rename fallbacks struct field
...
Rename this to be named the same as its accessor, and use the rename
feature of builder and serde. (The shorter name is nicer in the code
IMO.)
2022-03-18 16:49:25 -04:00
Nick Mathewson
2aa5f45bc8
UdpSocket: remove support for connect().
...
Currently, Arti doesn't need this. But once it does, it will be
way better to have a separate type for connected sockets, rather
than having to error-check every time somebody gives us a socket.
Part of #410
2022-03-18 15:39:40 -04:00
Nick Mathewson
0fdbe701c5
Merge branch 'anyhow' into 'main'
...
Actually throw an anyhow
See merge request tpo/core/arti!422
2022-03-18 16:32:16 +00:00
Ian Jackson
5a2f1b89f3
Actually throw an anyhow
...
Prompted by a compiler warning which I weirdly can't seem to reproduce?
2022-03-18 15:52:28 +00:00
Ian Jackson
981e6d7f01
Merge branch 'circ_path_api' into 'main'
...
ClientCirc: add functions to return the circuit's actual path
Closes #415
See merge request tpo/core/arti!419
2022-03-18 12:38:29 +00:00
Nick Mathewson
cb29921e16
Expand documentation for isolation traits
...
These aren't complete yet; I'm just making this commit to capture
the notes we took on a pad when we were discussing these APIs.
Part of #414 .
2022-03-17 13:49:32 -04:00
Nick Mathewson
9b7663b4ba
Merge branch 'md_allocation' into 'main'
...
Use less space in hashtables for microdescriptors
Closes #386
See merge request tpo/core/arti!415
2022-03-17 16:45:38 +00:00
Nick Mathewson
d39557b851
Define accessors for circuit hops.
...
Closes #415
2022-03-17 12:36:57 -04:00
Ian Jackson
0c0133dcc6
Run rustfmt
2022-03-17 16:22:15 +00:00
Ian Jackson
3e8655a54c
Merge branch 'set_iso_group_redux' into 'main'
...
Alternative API for set_isolation_group().
See merge request tpo/core/arti!418
2022-03-17 16:06:37 +00:00
Nick Mathewson
764930b9cd
tor-proto: Remember peer information in circuit and channel
...
Each channel now remembers an OwnedChanTarget.
Each circuit now remembers a vector of OwnedChanTarget to represent
the path that it was constructed for.
Part of #415 .
2022-03-17 12:03:34 -04:00
Ian Jackson
955e3a3e40
GetMicrodescsState: Abolish separate n_missing field in
2022-03-17 15:49:31 +00:00
Ian Jackson
3a1e599d5a
GetMicrodescsState: Break out with_mdreceiver_for_missing
2022-03-17 15:49:29 +00:00
Ian Jackson
1c6f4aaa9b
GetMicrodescsState: Dedupe slightly
2022-03-17 15:29:10 +00:00
Nick Mathewson
567995a7ca
ClientCirc: Move n_hops into a new Path type.
...
This will help with #415
2022-03-17 10:34:06 -04:00
Nick Mathewson
85a20ae4ec
Alternative API for set_isolation_group().
...
Instead of requiring a `Box<dyn Isolation>`, it now takes either a
`Box<dyn Isolation>`, or an arbitrary `T` that implements
`Isolation`.
This API still allows the user to pass in a `Box<dyn Isolation>` if
that's what they have, but it doesn't require them to Box the
isolation on their own.
Part of #414 .
2022-03-17 09:07:08 -04:00
Nick Mathewson
2c5d985227
Update semver_status.md for isolation changes
2022-03-17 08:50:30 -04:00
Nick Mathewson
2818a3cb35
Merge branch 'test-isolation' into 'main'
...
new api for isolation
See merge request tpo/core/arti!377
2022-03-17 12:46:13 +00:00
Ian Jackson
40bede587c
Merge branch 'config-partials-transparent' into 'main'
...
Absolish builders for CircMgrConfig and DirMgrConfig
See merge request tpo/core/arti!417
2022-03-17 12:30:46 +00:00
eta
dd967e66b9
Merge branch 'always-ims' into 'main'
...
dirmgr: Always send if-modified-since on consensus documents.
Closes #403
See merge request tpo/core/arti!412
2022-03-16 21:32:48 +00:00
Ian Jackson
a5ea3533c5
semver notes.
2022-03-16 19:38:12 +00:00
trinity-1686a
575792b583
replace TODOs with documentation
2022-03-16 20:33:36 +01:00
Ian Jackson
a020f82de2
DirMgrConfig: abolish builder; make it transparent and exhaustive
...
See rationale in the comment.
2022-03-16 19:31:10 +00:00
Ian Jackson
ab352881e3
Add rationale for CircMgrConfig transparency and trait
2022-03-16 19:31:08 +00:00
Ian Jackson
82aa4b902a
Provide define_accessor_trait and use it to generate CircMgrConfig
2022-03-16 19:31:05 +00:00
Ian Jackson
8bde40fdd3
Make CircMgrConfig transparent (and make it a trait)
...
See commentary for the rationale.
2022-03-16 19:30:59 +00:00
Ian Jackson
8d54c0f073
Change type of TorClientConfig::override_net_params
...
Now we use NetParams. That implies making its constructor public,
which I think it fine.
This is related to #413 but is far from completing that ticket.
2022-03-16 19:30:59 +00:00
Ian Jackson
d0c71b3872
Actually honour preemptive circuits configuration
...
This handwritten conversion function omitted a field. There was
nothing to spot this mistake.
IMO this shows why these particular types ought not to use builders,
but instead, should cause API breaks when things change.
Adding this line here to explicitly fix the bug, although we are about
to abolish this function completely almost right away.
2022-03-16 19:22:13 +00:00
Nick Mathewson
e6fe205be3
Merge branch 'typos' into 'main'
...
Fix typo
See merge request tpo/core/arti!416
2022-03-16 19:11:50 +00:00
trinity-1686a
8a2b8eb9b8
add isolation to dns requests
2022-03-16 19:50:24 +01:00
Dimitris Apostolou
7353fd4397
Fix typo
2022-03-16 20:25:46 +02:00
trinity-1686a
7c606048f2
accept boxed isolation in StreamPref::set_isolation_group
2022-03-16 19:24:23 +01:00
trinity-1686a
4eb90b72c0
add trait to help test isolation related code
2022-03-16 19:24:23 +01:00
trinity-1686a
0b7c71a888
add tests on Isolation and fix conditional compilation issues
...
it seems I added conditional compilation without noticing it??
and there was some errors when choosing a prefered runtime depending on
feature flags
2022-03-16 19:24:23 +01:00