Nick Mathewson
e4baf164dd
Small cleanups and tweaks to same_subnet code.
2021-08-05 15:16:03 -04:00
Nick Mathewson
3bc0a03848
Merge remote-tracking branch 'origin/mr/45'
2021-08-05 14:59:34 -04:00
Felipe Lema
161d5312bd
fix clippy::redundant_slicing
2021-08-05 01:21:48 -04:00
Felipe Lema
49cf119e18
use loop + `read` + slice-of-result
...
Loop into several reads because we want to short-circuit if case we're
reading too many bytes.
Added handling of allocation of `result` so we can use the "next window
buffer" for `read`. This way we can read on steps and short-circuit when
needed.
2021-08-05 00:34:40 -04:00
Nick Mathewson
ac962a7665
Remove spurious "exit 0"
2021-08-04 16:04:24 -04:00
Nick Mathewson
7c9373a32f
Add my "fuzz everything" script that I like to run overnight
2021-08-04 15:59:36 -04:00
Nick Mathewson
ec6ec3f1d8
Update arti-corpora submodule.
2021-08-04 15:57:02 -04:00
rls
c813eb1a10
Add symlinks to arti-corpora
2021-08-04 15:52:24 -04:00
Felipe Lema
5277c747d5
read from stream in a single go (not looping)
2021-08-03 16:08:53 -04:00
Felipe Lema
dcfcf09956
don't use intermediate buffer, but read directly into `result`
2021-08-03 16:08:53 -04:00
Nick Mathewson
87edb38920
Small fixes on top of typo fixes
2021-08-03 09:01:46 -04:00
Nick Mathewson
6e04a3b0f7
Merge remote-tracking branch 'origin/mr/48'
2021-08-03 08:49:25 -04:00
Smitty
3100a6a6ae
Support EnforceDistinctSubnets
...
Relays on the same IPv4 /16 or IPv6 /32 are treated as being in the same
family.
2021-08-01 19:01:06 -04:00
rls
297ca28170
Revert spelling change; "recognised" is valid
2021-07-31 18:21:18 +02:00
rls
51d91508f7
Fix typos and other spelling mistakes
2021-07-31 18:02:35 +02:00
Nick Mathewson
19e0558bcd
Fix some CI warnings.
2021-07-31 18:01:25 +02:00
Nick Mathewson
4374ba4738
Fix some CI warnings.
2021-07-30 17:38:54 -04:00
rls
0587e97c7b
Change output type in DirResponse to Vec<u8>
...
Previously the DirResponse contained a String for the output.
By changing it to a Vec<u8> the caller has to parse the Vec<u8> and deal with potential failures.
With this change `fetch_multiple`'s
`useful_responses` should also contain non-UTF-8 responses.
This will case an Err to be returned in the `download_attempt` function if the
DirResponse does not contain valid UTF-8.
2021-07-30 22:41:33 +02:00
Nick Mathewson
af90626ab8
Add a note about the other (current) daemon task.
2021-07-30 15:24:43 -04:00
Nick Mathewson
7fda771f45
Whenever the consensus changes, inform the circmgr about new params
...
Closes #144
2021-07-30 15:16:43 -04:00
Nick Mathewson
cc6302deda
Give DirMgr the ability to notify subscribers about events.
...
This is not 100% what we'll want long term:
- We might want more kinds of events
- We'll probably want to generate them in a more reliable way
- We might want some of this mechanism to be in a crate other than
DirMgr.
But for now, let's use this as a start and get experience with it.
2021-07-30 12:53:54 -04:00
Nick Mathewson
95e8f67a4a
Disable a warning from Rust 1.54
2021-07-29 10:49:40 -04:00
Nick Mathewson
6dbdfdcc84
Add a kludge to make resolve requests work.
...
Apparently "a circuit supporting no target ports" is not truly an
exit circuit. We should add a better fix here, however.
2021-07-27 13:53:56 -04:00
Nick Mathewson
4ccc4cecfe
Now that we support RESOLVE*, log what SOCKS command we are seeing
2021-07-27 13:49:57 -04:00
Nick Mathewson
9c8dcecf20
socksproto: Allow port 0 for RESOLVE and RESOLVE_PTR.
2021-07-27 13:48:24 -04:00
Nick Mathewson
962b01ca4e
Do not try to resolve .onion addresses.
2021-07-27 13:19:32 -04:00
Nick Mathewson
be05441cfb
tor-client: rename circ function to a more descriptive name
2021-07-27 13:18:44 -04:00
Nick Mathewson
b40b5d9412
tor_proto: Use iterators and functions to simplify resolve functions.
2021-07-27 13:13:27 -04:00
Nick Mathewson
64daf41a9b
ResolvedVal: Rename answers() to into_answers().
2021-07-27 13:00:25 -04:00
Nick Mathewson
26f00ed396
tor-proto: Tweak documentation for resolve/resolve_ptr
2021-07-27 12:58:33 -04:00
Nick Mathewson
a6a0189449
Merge remote-tracking branch 'origin/mr/39'
2021-07-27 10:38:20 -04:00
Nick Mathewson
a28e088240
Add OSX instructions to CONTRIBUTING.md
...
Closes #151 .
2021-07-23 15:00:35 -04:00
Yuan Lyu
2dfe4b69a0
Add support for RESOLVE and RESOLVE_PTR
2021-07-22 20:51:28 -04:00
dagger
d160c88cc5
[f] fix pareto test not compile issue
...
Signed-off-by: dagger <0xdagger@gmail.com>
2021-07-22 09:11:12 +07:00
Nick Mathewson
3f6b22fa14
adjust WANT_FROM_OTHER_CRATES
2021-07-21 13:11:24 -04:00
Nick Mathewson
a2ca2222b8
Merge remote-tracking branch 'origin/mr/42'
2021-07-21 09:42:16 -04:00
Nick Mathewson
9f61a392be
Use cargo audit with "-D warnings".
2021-07-21 09:33:32 -04:00
Nick Mathewson
c2a0a572b0
Merge remote-tracking branch 'origin/mr/41'
2021-07-21 09:32:26 -04:00
Nick Mathewson
c9841f5b1a
Fix a ocumentation link issue.
2021-07-21 09:19:57 -04:00
Daniel Eades
ed14a7fcf2
address some possibly slightly controversial lints
2021-07-21 07:27:26 +01:00
Daniel Eades
d23256074e
address a bunch of hopefully uncontroversial lints
2021-07-20 22:59:59 +01:00
Trinity Pointard
c6fef98a83
attempt to add cargo audit to CI
2021-07-20 23:39:23 +02:00
Trinity Pointard
594b65fff6
switch to maintained crates for memmap and tmpdir
...
They don't have actual documented security issues but it makes
`cargo audit` complain
https://rustsec.org/advisories/RUSTSEC-2018-0017
https://rustsec.org/advisories/RUSTSEC-2020-0077
2021-07-20 23:35:17 +02:00
Nick Mathewson
888296cca6
Temporarily disable build.rs tests as unreliable :/
2021-07-20 13:46:32 -04:00
Nick Mathewson
bd355d14f3
tor-circmgr: Improve coverage on build.rs.
...
The good news is that this tests the succeeding and failing cases,
and even managed to expose an off-by-one error in our hop counting.
The bad news is that these tests have shown even more ways in which
our wait_for code is unreliable, and forced me to slow it down even
harder.
2021-07-19 14:30:42 -04:00
Nick Mathewson
6bf1f9723a
Fix an actual off-by-one error!
...
This was in deciding when to report a circuit as completed.
2021-07-19 13:49:55 -04:00
Nick Mathewson
37fe255fda
Try refactoring build.rs for testability.
...
I'm adding a local "Buildable" trait here so I can swap out Circuits
for something else. This also lets me refactor Builder<> to be
parameterized on TimeoutEstimator again, and lets us get rid of the
first_hop() accessor on paths.
2021-07-19 12:25:26 -04:00
Nick Mathewson
1821532dd8
Add a test for double_timeout.
...
There is something wrong here, though. I had to rewrite wait_for() a
lot back in the main branch to get this test working right. See
arti#149 for details on that issue.
2021-07-19 12:25:26 -04:00
Nick Mathewson
61d8e5175c
tor-circbuild: use SleepProvider::now() instead of Instant::now()
...
This should make time mockable for testing purposes.
2021-07-19 12:25:26 -04:00
Nick Mathewson
94db617682
Add the ability to reconfigure a running ParetoEstimator
2021-07-19 12:25:26 -04:00