Commit Graph

27023 Commits

Author SHA1 Message Date
David Goulet
254b23ab9d hs: Schedule mainloop event on dirinfo change
Due to a possible Guard subsystem recursion, when the HS client gets
notified that the directory information has changed, it must run it in a
seperate mainloop event to avoid such issue.

See the ticket for more information on the recursion. This also fixes a
fatal assert.

Fixes #40579

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-10 08:58:26 -05:00
David Goulet
9efb04bb3e hs: Fix multiple port label on single metric
Prometheus needs unique labels and so this bug was causing an onion
service with multiple ports to have multiple "port=" label for the
metrics requiring a port label.

Fixes #40581

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-08 13:56:54 -05:00
Tor CI Release
92b4e4d041 version: Bump version to 0.4.5.12-dev 2022-02-04 12:36:01 -05:00
Tor CI Release
774374ebf5 version: Bump version to 0.4.5.12 2022-02-04 11:09:12 -05:00
Tor CI Release
6a6332a683 fallbackdir: Update list generated on February 04, 2022 2022-02-04 11:05:21 -05:00
Tor CI Release
5ab4fa9fd8 Update geoip files to match ipfire location db, 2022/02/04. 2022-02-04 11:05:13 -05:00
Tor CI Release
cfe022d01d Update geoip files to match ipfire location db, 2021/12/15. 2022-02-04 10:56:29 -05:00
Tor CI Release
f03cab5dbb fallbackdir: Update list generated on December 15, 2021 2022-02-04 10:17:10 -05:00
David Goulet
3c73622f27 hs: Double quote the metrics label value
Fixes #40552

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-03 08:30:23 -05:00
David Goulet
986730e82c test: Remove HSv2 protover specific test
HSv2 is not advertised as a supported protocol version anymore.

This was introduced with the merge-forward of commit 72041c6306
which didn't fix the unit test.

Fixes #40549

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-01-19 13:36:23 -05:00
David Goulet
4ab4521c31 Merge branch 'maint-0.3.5' into maint-0.4.5 2022-01-18 13:15:38 -05:00
David Goulet
501d8bbd4c Merge branch 'tor-gitlab/mr/511' into maint-0.3.5 2022-01-18 13:15:33 -05:00
David Goulet
49c758af47 Merge branch 'maint-0.3.5' into maint-0.4.5 2022-01-18 13:15:29 -05:00
David Goulet
e523480691 Merge branch 'tor-gitlab/mr/510' into maint-0.3.5 2022-01-18 13:15:23 -05:00
David Goulet
aac5731f86 Merge branch 'maint-0.3.5' into maint-0.4.5 2022-01-18 13:12:13 -05:00
Jérôme Charaoui
d6c2da6630 Update new relay blogpost URL
This removes the '/blog/' URL component which relies on a 
redirection since the blog has been migrated to Lektor
2022-01-18 12:56:34 -05:00
David Goulet
b9c06718a8 main: Update a dead URL in a log notice
Change https://www.torproject.org/download/download#warning to
https://support.torproject.org/faq/staying-anonymous/

Closes #40544

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-01-18 12:51:52 -05:00
David Goulet
72041c6306 relay: Don't advertise HSv2 protocol version
We removed HSIntro=3 and HSDir=1 that are v2 specific. Since 0.3.5.17,
we do not support introducing or being a directory for onion service v2.

Closes #40509

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-01-18 12:39:06 -05:00
David Goulet
a7fe37f1fa protover: Fix merge forward from 035
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-05 10:42:54 -04:00
David Goulet
47adba879c Merge branch 'maint-0.3.5' into maint-0.4.5 2021-11-05 10:35:08 -04:00
Nick Mathewson
439e17180c Light edit to protover warnings. 2021-11-05 10:30:57 -04:00
David Goulet
f93cd5deb8 protover: Add a note on why LinkAuth is not recommended or required
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-05 10:16:08 -04:00
David Goulet
3d1a49908c protover: Move all hardcoded lists in one place
This also moves the warnings and add some theatrical effect around the
code so anyone modifying those list should notice the warnings signs and
read the comment accordingly.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-05 10:13:47 -04:00
Nick Mathewson
7c085490f5 Add scary warnings about changing the protover list.
Doing this in the wrong way has potential to cause serious havoc on
the network, so let's make it harder for future programmers to mess
it up.
2021-11-05 09:20:05 -04:00
David Goulet
6e8e1a4e6f relay: Don't allow DirPort on non-IPv4
Our code doesn't allow it and so this prevents an assert() crash if the
DirPort is for instance IPv6 only.

Fixes #40494

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-03 09:51:46 -04:00
Alexander Færøy
5c8deef9b6 Fix Windows build.
While trying to resolve our CI issues, the Windows build broke with an
unused function error:

   src/test/test_switch_id.c:37:1: error: ‘unprivileged_port_range_start’
   defined but not used [-Werror=unused-function]

We solve this by moving the `#if !defined(_WIN32)` test above the
`unprivileged_port_range_start()` function defintion such that it is
included in its body.

This is an unreviewed commit.

See: tor#40275
2021-10-29 16:52:18 +00:00
Alexander Færøy
31fa3cc1a0 Fix compilation on systems with older compilers.
This patch fixes a build error with GCC 7.x which doesn't seem to accept
const int's as constants in macro initialization.

See: tpo/core/tor#40410
2021-10-28 10:37:45 -04:00
David Goulet
97c976778a version: Missing version update in couple files
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-28 09:41:13 -04:00
David Goulet
fa438b6cf0 version: Missing version update in couple files
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-28 09:40:50 -04:00
David Goulet
446135aff0 version: Bump to 0.4.5.11
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-26 09:16:44 -04:00
David Goulet
9280f32fc0 version: Bump to 0.3.5.17
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-26 09:16:17 -04:00
David Goulet
1dab1c8ad5 Merge branch 'maint-0.3.5' into maint-0.4.5 2021-10-21 10:01:38 -04:00
David Goulet
66e8e0f71b fallbackdir: Regenerate the list for October 2021
Closes #40493

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-21 09:13:40 -04:00
Alexander Færøy
0135fb028c Merge remote-tracking branch 'tor-gitlab/mr/338' into maint-0.4.5 2021-10-21 12:35:26 +00:00
Alexander Færøy
5717b88bcb Merge branch 'maint-0.3.5' into maint-0.4.5 2021-10-20 21:47:17 +00:00
Alexander Færøy
7372739765 Announce URL to bridge status page when starting Tor as a bridge relay.
This patch makes Tor announce the relay specific bridge status page URL
when Tor is starting up before bootstrap occours.

See: tor#30477
2021-10-20 21:44:45 +00:00
Alexander Færøy
fdc7549b61 Merge branch 'maint-0.3.5' into maint-0.4.5 2021-10-20 17:36:06 +00:00
Alexander Færøy
5a043825d0 Remove unused function: dns_randfn_() in dns.c.
This patch unbreaks the current build after tor!369 landed.

See: https://bugs.torproject.org/tpo/core/tor/40371
2021-10-20 17:35:52 +00:00
Alexander Færøy
db112329a0 Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5 2021-10-20 17:35:35 +00:00
David Goulet
44e105c27f hs: Improve warning for bad service version
Now that we don't have version 2, it gives us:

  [warn] HiddenServiceVersion must be between 3 and 3, not 2.

This commit changes it to:

  [warn] HiddenServiceVersion must be 3, not 2.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19 09:51:24 -04:00
David Goulet
f9750249ac test: Don't run HSv2 Chutney test networks
Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19 09:51:24 -04:00
David Goulet
9a6c6e8ec5 test: Fix unit tests after disabling version 2
Some tests were removed because they were testing something not usable
anymore.

Some tests remains to make sure that things are indeed disabled.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19 09:51:24 -04:00
David Goulet
d0053fdfb5 hs: Improve warning for bad service version
Now that we don't have version 2, it gives us:

  [warn] HiddenServiceVersion must be between 3 and 3, not 2.

This commit changes it to:

  [warn] HiddenServiceVersion must be 3, not 2.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19 09:50:23 -04:00
David Goulet
48e6e0843b test: Don't run HSv2 Chutney test networks
Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19 09:50:23 -04:00
David Goulet
1589e6bf28 test: Fix unit tests after disabling version 2
Some tests were removed because they were testing something not usable
anymore.

Some tests remains to make sure that things are indeed disabled.

Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19 09:50:22 -04:00
David Goulet
fb0c949df6 hs-v2: Disable version 2 HSPOST and HSFETCH command
Part of #40476

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19 09:50:22 -04:00
David Goulet
7a15296c43 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-10-19 09:50:22 -04:00
David Goulet
e284b9f779 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-10-19 09:13:08 -04:00
David Goulet
471149b651 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-10-19 09:11:12 -04:00
David Goulet
ed4d6a0030 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-10-19 09:08:05 -04:00