Commit Graph

38198 Commits

Author SHA1 Message Date
David Goulet
4a7824b9ae Merge branch 'maint-0.4.7' 2022-10-26 14:12:51 -04:00
David Goulet
e19cf2dac6 Merge branch 'maint-0.4.5' into maint-0.4.7 2022-10-26 14:12:51 -04:00
David Goulet
b113b08722 Merge branch 'maint-0.4.7' 2022-10-26 14:07:49 -04:00
David Goulet
b20f72943e Merge branch 'tor-gitlab/mr/629' into maint-0.4.7 2022-10-26 14:06:33 -04:00
David Goulet
f501564b40 relay: Reduce the minimum circuit cell in queue limit
With congestion control, the flow control window is much lower than the
initial 1000.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 14:05:28 -04:00
David Goulet
a2c034d8f5 dos: Apply circuit creation defenses if circ max queue cell reached
This adds two consensus parameters to control the outbound max circuit
queue cell size limit and how many times it is allowed to reach that
limit for a single client IP.

Closes #40680

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 14:05:28 -04:00
David Goulet
40aab72031 Merge branch 'tor-gitlab/mr/628' 2022-10-26 14:00:57 -04:00
Roger Dingledine
2033cc7b5e clean up comment a bit 2022-10-25 02:55:13 -04:00
Roger Dingledine
e6899dcdf4 fix typo in #40673's changes file 2022-10-20 19:46:27 -04:00
David Goulet
938070f5c4 dirauth: Change dizum IP address
Closes #40687

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-18 10:35:54 -04:00
David Goulet
e86833ade6 Merge branch 'maint-0.4.5' into maint-0.4.7 2022-10-14 09:12:23 -04:00
David Goulet
28413e7560 Merge branch 'maint-0.4.7' 2022-10-14 09:12:23 -04:00
Alexander Færøy
eecd137c1b Strip "__.SYMDEF*" before re-archiving in combine_libs on macOS and iOS.
This patch changes how combine_libs works on Darwin like platforms to
make sure we don't include any `__.SYMDEF` and `__.SYMDEF SORTED`
symbols on the archive before we repack and run ${RANLIB} on the
archive.

See: tpo/core/tor#40683.
2022-10-14 12:12:46 +02:00
Nick Mathewson
e531d4d1b9 Fix a completely wrong calculation in mach monotime_init_internal()
Bug 1: We were purporting to calculate milliseconds per tick, when we
*should* have been computing ticks per millisecond.

Bug 2: Instead of computing either one of those, we were _actually_
computing femtoseconds per tick.

These two bugs covered for one another on x86 hardware, where 1 tick
== 1 nanosecond.  But on M1 OSX, 1 tick is about 41 nanoseconds,
causing surprising results.

Fixes bug 40684; bugfix on 0.3.3.1-alpha.
2022-10-13 13:40:10 -04:00
David Goulet
5080a4ff67 Merge branch 'maint-0.4.7' 2022-10-12 15:52:04 -04:00
David Goulet
c8d8fa0d36 relay: Add number of rejected connections to MetricsPort
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-12 09:25:19 -04:00
David Goulet
d543db5ac0 relay: Add connection stats to MetricsPort
This adds the number of created and opened connections to the
MetricsPort for a relay for each connection type and direction.

Output looks like:

  # HELP tor_relay_connections Connections metrics of this relay
  # TYPE tor_relay_connections counter
  tor_relay_connections{type="OR listener",direction="initiated",state="created"} 0
  tor_relay_connections{type="OR listener",direction="received",state="created"} 0
  tor_relay_connections{type="OR listener",direction="initiated",state="opened"} 0
  tor_relay_connections{type="OR listener",direction="received",state="opened"} 0
  tor_relay_connections{type="OR",direction="initiated",state="created"} 5
  tor_relay_connections{type="OR",direction="received",state="created"} 0
  tor_relay_connections{type="OR",direction="initiated",state="opened"} 5
  tor_relay_connections{type="OR",direction="received",state="opened"} 0
  tor_relay_connections{type="Exit",direction="initiated",state="created"} 0
  tor_relay_connections{type="Exit",direction="received",state="created"} 0
  tor_relay_connections{type="Exit",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Exit",direction="received",state="opened"} 0
  tor_relay_connections{type="Socks listener",direction="initiated",state="created"} 0
  tor_relay_connections{type="Socks listener",direction="received",state="created"} 0
  tor_relay_connections{type="Socks listener",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Socks listener",direction="received",state="opened"} 0
  tor_relay_connections{type="Socks",direction="initiated",state="created"} 0
  tor_relay_connections{type="Socks",direction="received",state="created"} 0
  tor_relay_connections{type="Socks",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Socks",direction="received",state="opened"} 0
  tor_relay_connections{type="Directory listener",direction="initiated",state="created"} 0
  tor_relay_connections{type="Directory listener",direction="received",state="created"} 0
  tor_relay_connections{type="Directory listener",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Directory listener",direction="received",state="opened"} 0
  tor_relay_connections{type="Directory",direction="initiated",state="created"} 0
  tor_relay_connections{type="Directory",direction="received",state="created"} 0
  tor_relay_connections{type="Directory",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Directory",direction="received",state="opened"} 0
  tor_relay_connections{type="Control listener",direction="initiated",state="created"} 0
  tor_relay_connections{type="Control listener",direction="received",state="created"} 0
  tor_relay_connections{type="Control listener",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Control listener",direction="received",state="opened"} 0
  tor_relay_connections{type="Control",direction="initiated",state="created"} 0
  tor_relay_connections{type="Control",direction="received",state="created"} 0
  tor_relay_connections{type="Control",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Control",direction="received",state="opened"} 0
  tor_relay_connections{type="Transparent pf/netfilter listener",direction="initiated",state="created"} 0
  tor_relay_connections{type="Transparent pf/netfilter listener",direction="received",state="created"} 0
  tor_relay_connections{type="Transparent pf/netfilter listener",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Transparent pf/netfilter listener",direction="received",state="opened"} 0
  tor_relay_connections{type="Transparent natd listener",direction="initiated",state="created"} 0
  tor_relay_connections{type="Transparent natd listener",direction="received",state="created"} 0
  tor_relay_connections{type="Transparent natd listener",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Transparent natd listener",direction="received",state="opened"} 0
  tor_relay_connections{type="DNS listener",direction="initiated",state="created"} 0
  tor_relay_connections{type="DNS listener",direction="received",state="created"} 0
  tor_relay_connections{type="DNS listener",direction="initiated",state="opened"} 0
  tor_relay_connections{type="DNS listener",direction="received",state="opened"} 0
  tor_relay_connections{type="Extended OR",direction="initiated",state="created"} 0
  tor_relay_connections{type="Extended OR",direction="received",state="created"} 0
  tor_relay_connections{type="Extended OR",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Extended OR",direction="received",state="opened"} 0
  tor_relay_connections{type="Extended OR listener",direction="initiated",state="created"} 0
  tor_relay_connections{type="Extended OR listener",direction="received",state="created"} 0
  tor_relay_connections{type="Extended OR listener",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Extended OR listener",direction="received",state="opened"} 0
  tor_relay_connections{type="HTTP tunnel listener",direction="initiated",state="created"} 0
  tor_relay_connections{type="HTTP tunnel listener",direction="received",state="created"} 0
  tor_relay_connections{type="HTTP tunnel listener",direction="initiated",state="opened"} 0
  tor_relay_connections{type="HTTP tunnel listener",direction="received",state="opened"} 0
  tor_relay_connections{type="Metrics listener",direction="initiated",state="created"} 0
  tor_relay_connections{type="Metrics listener",direction="received",state="created"} 1
  tor_relay_connections{type="Metrics listener",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Metrics listener",direction="received",state="opened"} 1
  tor_relay_connections{type="Metrics",direction="initiated",state="created"} 0
  tor_relay_connections{type="Metrics",direction="received",state="created"} 0
  tor_relay_connections{type="Metrics",direction="initiated",state="opened"} 0
  tor_relay_connections{type="Metrics",direction="received",state="opened"} 0

Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-12 09:25:19 -04:00
David Goulet
5603baf257 conn: Keep stats of opened and closed connections
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-12 09:25:19 -04:00
David Goulet
4692cf8688 Merge branch 'maint-0.4.7' 2022-10-11 10:09:37 -04:00
Andy
d09414858e Properly compute cell-drop overload fraction
Patch to address #40673. An additional check has been added to
onion_pending_add() in order to ensure that we avoid counting create
cells from clients.

In the cpuworker.c assign_onionskin_to_cpuworker
method if total_pending_tasks >= max_pending_tasks
and channel_is_client(circ->p_chan) returns false then
rep_hist_note_circuit_handshake_dropped() will be called and
rep_hist_note_circuit_handshake_assigned() will not be called. This
causes relays to run into errors due to the fact that the number of
dropped packets exceeds the total number of assigned packets.

To avoid this situation a check has been added to
onion_pending_add() to ensure that these erroneous calls to
rep_hist_note_circuit_handshake_dropped() are not made.

See the #40673 ticket for the conversation with armadev about this issue.
2022-10-06 00:46:29 -04:00
Andy
01b0954b23 Update doc/man/tor.1.txt 2022-09-28 19:57:26 +00:00
Nick Mathewson
5afaf1856f Merge remote-tracking branch 'tor-gitlab/mr/614' 2022-09-26 12:46:04 -04:00
pseudonymisaTor
5f04e1e062 remove unused DEFAULT_CLIENT_NICKNAME 2022-09-22 08:18:12 +00:00
David Goulet
982c50401c doc: Add git merge detail in release document
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-08-12 11:04:30 -04:00
David Goulet
470d8ebc61 Merge branch 'maint-0.4.7' 2022-08-12 10:55:08 -04:00
Tor CI Release
2dff82dc72 version: Bump version to 0.4.7.10-dev 2022-08-12 10:55:03 -04:00
David Goulet
42f72dc10c Merge branch 'maint-0.4.6' into maint-0.4.7 2022-08-12 10:54:47 -04:00
Tor CI Release
83965eca26 version: Bump version to 0.4.6.12-dev 2022-08-12 10:54:41 -04:00
David Goulet
0915eb6862 Merge branch 'maint-0.4.5' into maint-0.4.6 2022-08-12 10:54:31 -04:00
Tor CI Release
d52a5f2181 version: Bump version to 0.4.5.14-dev 2022-08-12 10:54:19 -04:00
David Goulet
aa28535f67 Merge branch 'maint-0.4.7' 2022-08-12 10:20:06 -04:00
Tor CI Release
f732a91a73 version: Bump version to 0.4.7.10 2022-08-12 10:19:37 -04:00
David Goulet
d32ae7cb56 Merge branch 'maint-0.4.7' 2022-08-12 10:17:40 -04:00
David Goulet
9a9ddc2657 Merge branch 'maint-0.4.6' into maint-0.4.7 2022-08-12 10:17:36 -04:00
Tor CI Release
111b2d3a9f version: Bump version to 0.4.6.12 2022-08-12 10:17:03 -04:00
David Goulet
f9e657caeb Merge branch 'maint-0.4.7' 2022-08-12 10:14:38 -04:00
David Goulet
5de3b0db75 Merge branch 'maint-0.4.6' into maint-0.4.7 2022-08-12 10:14:38 -04:00
David Goulet
b86b593c04 Merge branch 'maint-0.4.5' into maint-0.4.6 2022-08-12 10:14:32 -04:00
Tor CI Release
ecb194b9da version: Bump version to 0.4.5.14 2022-08-12 10:12:06 -04:00
David Goulet
0cc27ecfdc Merge branch 'maint-0.4.7' 2022-08-12 09:56:54 -04:00
David Goulet
c4ff6a4f55 Merge branch 'maint-0.4.6' into maint-0.4.7 2022-08-12 09:56:54 -04:00
David Goulet
8244eefcd3 Merge branch 'maint-0.4.5' into maint-0.4.6 2022-08-12 09:56:54 -04:00
David Goulet
bb88086c72 geoip: Update geoip files with August 9th, 2022 database
Fixes #40658

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-08-12 09:56:50 -04:00
David Goulet
cc704373cb doc: Improve ReleasingTor.md and fix announcement ML
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-08-11 11:31:29 -04:00
David Goulet
275d790ac1 scripts: Remove 0.4.6.x as it is EOL
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-08-11 11:27:18 -04:00
David Goulet
bbc29f4a11 release: Update ChangeLog/ReleaseNotes with latest releases
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-08-11 11:19:19 -04:00
David Goulet
fbfda1b661 Merge branch 'maint-0.4.7' 2022-08-11 11:15:17 -04:00
Tor CI Release
1506eca5aa version: Bump version to 0.4.7.9-dev 2022-08-11 11:15:05 -04:00
David Goulet
bbc4ec7950 Merge branch 'maint-0.4.6' into maint-0.4.7 2022-08-11 11:14:52 -04:00
Tor CI Release
8e868600dd version: Bump version to 0.4.6.11-dev 2022-08-11 11:14:44 -04:00