Commit Graph

37740 Commits

Author SHA1 Message Date
Mike Perry
322f213210 Turn cell queue watermark limits into consensus params.
This allows us to have quicker reaction to blocked orconns as
a congestion signal.
2021-10-04 10:45:46 -04:00
Mike Perry
e9038dc5f2 Add a max cwnd consensus parameter and clamp. 2021-10-04 10:45:46 -04:00
Mike Perry
6dae9903b1 Turn orconn watermarks into consensus parameters.
Tuning these may reduce memory usage and latency.
2021-10-04 10:45:46 -04:00
Mike Perry
98be8634fa Turn CircEWMA tick len into consensus parameter.
This will assist tuning of CircEWMA in Shadow and Live.
2021-10-04 10:45:46 -04:00
Mike Perry
5e17f8acab Support time-based half-closed connection handling.
Since we no longer use stream SENDMEs for congestion control, we must now use
time to decide when data should stop arriving on a half-closed stream.
2021-10-04 10:45:46 -04:00
David Goulet
bd0aabe20f oom: Consider edge connections as well
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-04 10:45:46 -04:00
Mike Perry
58aca27265 MAKEFILE: Add flow control files to makefile 2021-10-04 10:45:46 -04:00
Mike Perry
0422eb26a7 Prop#324: Hook up flow control 2021-10-04 10:45:46 -04:00
Mike Perry
a89a71cd7b Prop#324: Stream flow control functions 2021-10-04 10:45:46 -04:00
David Goulet
0b376a9e82 trace: Add congestion control BDP update tracepoints
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-04 10:45:46 -04:00
David Goulet
896c16c3b1 Add lttng trace support.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-04 10:45:46 -04:00
David Goulet
819b69244a Support rate limiting of edge connections reads.
We only need to rate limit reading on edges for flow control, as per the rate
that comes in the XON from the other side. When we rate limit reading from the
edge source to this rate, we will only deliver that fast to the other side,
thus satisfying its rate request.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-04 10:45:46 -04:00
Mike Perry
ca7f5c05a6 Prop#324: Add fields to edge connection. 2021-10-04 10:45:46 -04:00
David Goulet
ef7a64e3b8 hs-v2: Disable version 2 HSPOST and HSFETCH command
Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-30 11:18:08 -04:00
David Goulet
59bae7cbee hs-v2: Disable version 2 directory
Relay do not accept both stores and lookups of version 2 descriptor.
This effectively disable version 2 HSDir supports for relays.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-30 10:46:17 -04:00
David Goulet
ff3ac02702 hs-v2: Disable version 2 introduction point
Upon receiving a v2 introduction request, the relay will close the
circuit and send back a tor protocol error.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-30 10:40:19 -04:00
David Goulet
765bdb9c33 hs-v2: Disable version 2 service
The minimum service version is raised from 2 to 3 which effectively
disable loading or creating an onion service v2.

As for ADD_ONION, for version 2, a 551 error is returned:

  "551 Failed to add Onion Service"

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-30 10:38:08 -04:00
David Goulet
13b2b1108f hs-v2: Disable SOCKS connection for v2 addresses
This effectively turns off the ability of tor to use HSv2 as a client by
invalidating the v2 onion hostname passed through a SOCKS request.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-30 10:26:37 -04:00
Mike Perry
33d8974f4d Export the n_ewma function for flow control use. 2021-09-28 21:39:36 +00:00
Mike Perry
8f9cf1ec43 Export a global notion of monotime clock stall/jump.
Monotime clock functionality is a global property, and flow control
also needs to know if it can trust the clock.
2021-09-28 21:39:36 +00:00
Mike Perry
6868f30ced Add trunnel definitions for xon/xoff cells. 2021-09-28 21:26:10 +00:00
Simon South
1a10948260 test: Add sandbox unit tests 2021-09-28 11:06:52 -04:00
Simon South
3bc3a10895 configure.ac: Define ENABLE_COVERAGE macro
Allow conditional compilation based on whether the "--enable-coverage"
configure option was specified.
2021-09-28 11:06:52 -04:00
Simon South
fbf2e7e921 sandbox: Allow use with fragile hardening
When building with --enable-fragile-hardening, add or relax Linux
seccomp rules to allow AddressSanitizer to execute normally if the
process terminates with the sandbox active.

Further resolves issue 11477.
2021-09-28 11:06:50 -04:00
Simon South
352677556e configure.ac: Define ENABLE_FRAGILE_HARDENING macro
Allow conditional compilation based on whether the
"--enable-fragile-hardening" configure option was specified.
2021-09-27 12:13:47 -04:00
Neel Chauhan
b7992d4f79 bwauth: Add AuthDirDontVoteOnDirAuthBandwidth option to avoid giving weights to dirauths 2021-09-27 08:58:00 -07:00
Roger Dingledine
ecb91e75e4 one more pass over the changelog 2021-09-17 11:01:37 -04:00
Nick Mathewson
0877eee18c Run format_changelog. 2021-09-17 10:50:40 -04:00
Nick Mathewson
46094d1ec0 Edit changelog with a few grammar and simplicity fixes. 2021-09-17 10:50:23 -04:00
David Goulet
927f9a12a6 Bump version to 0.4.7.1-alpha
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-17 09:42:45 -04:00
David Goulet
9a7fe5d131 changelog: ChangeLog for 0.4.7.1-alpha release
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-17 09:42:45 -04:00
Nick Mathewson
2c10cc3080 Merge remote-tracking branches 'tor-gitlab/mr/439' and 'tor-gitlab/mr/441' 2021-09-16 08:53:28 -04:00
skaluzka
515ccc4a42
Update Tor's man 1 page
Add few missing periods, convert tabs to spaces.
No new significant content added.

Signed-off-by: skaluzka <skaluzka@protonmail.com>
2021-09-15 19:17:41 +02:00
Neel Chauhan
17ceeb7f92 tor.1 man page: Add mention of fingerprint-ed25519, and clarify differences 2021-09-14 11:10:11 -07:00
David Goulet
f728e09ebe Merge branch 'maint-0.4.5' into maint-0.4.6 2021-09-13 13:34:48 -04:00
David Goulet
7440a38846 Merge branch 'maint-0.4.6' 2021-09-13 13:34:48 -04:00
David Goulet
0dbb2f53b9 Merge branch 'maint-0.3.5' into maint-0.4.5 2021-09-13 13:34:44 -04:00
Guinness
bd68668ac0
Fix changes file 2021-09-13 19:02:23 +02:00
Alexander Færøy
fcef8e3f75 Only check for bindable ports if we are unsure if it will fail.
We currently assume that the only way for Tor to listen on ports in the
privileged port range (1 to 1023), on Linux, is if we are granted the
NET_BIND_SERVICE capability. Today on Linux, it's possible to specify
the beginning of the unprivileged port range using a sysctl
configuration option. Docker (and thus the CI service Tor uses) recently
changed this sysctl value to 0, which causes our tests to fail as they
assume that we should NOT be able to bind to a privileged port *without*
the NET_BIND_SERVICE capability.

In this patch, we read the value of the sysctl value via the /proc/sys/
filesystem iff it's present, otherwise we assume the default
unprivileged port range begins at port 1024.

See: tor#40275
2021-09-13 18:33:27 +02:00
Alexander Færøy
12b64845ae Use Debian bullseye for our hardened build. 2021-09-13 18:13:10 +02:00
Alexander Færøy
84d6f977e7 Force amd64 for CI builds. 2021-09-13 18:08:49 +02:00
Daniel Pinto
7a06b8713d Fix compilation error when __NR_time is not defined. #40465 2021-09-09 23:55:49 +01:00
David Goulet
86f880d756 man: Detail onion service DDoS mitigation measure
Move the options into the DDoS section with a series of explanations.

Closes #40456

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-09 14:30:52 -04:00
Guinness
83a11f8a76
Fix the line length in the patch 2021-09-09 13:59:33 +02:00
skaluzka
eac7bdce91
Clear asciidoc-helper.sh syntax
Remove all unnecessary ";" characters at the end of several lines.
Align all indentations to 4 spaces.
Update console messages related to XML_CATALOG_FILES and
.bashrc file.

Signed-off-by: skaluzka <skaluzka@protonmail.com>
2021-09-08 22:32:46 +02:00
skaluzka
82168e5e8b
Align and fix indentations in several maint scripts
Use 4 spaces indentations, convert tabs to spaces.
No real code changes.
2021-09-07 23:44:44 +02:00
Nick Mathewson
677b0c9f6d Merge remote-tracking branch 'tor-gitlab/mr/426' 2021-09-07 07:51:07 -04:00
David Goulet
fe6898157c Merge branch 'tor-gitlab/mr/424' 2021-08-31 11:08:18 -04:00
skaluzka
e5b234e358
Improve fname_is_c func in pratracker/includes.py
Use tuples for bname.startswith and fname.endswith in "fname_is_c"
function.
2021-08-29 22:10:44 +02:00
Neel Chauhan
8ead53330c Add spaces between the "and" when logging the "Your server has not managed to confirm reachability for its" on dual-stack relays 2021-08-26 13:40:53 -07:00