Commit Graph

9726 Commits

Author SHA1 Message Date
George Kadianakis
f280c171e2 Merge branch 'mr/233' 2020-12-08 16:54:18 +02:00
Nick Mathewson
558aaf1c32 Command-line arguments: be better at detecting absent optional args.
Previously, "--list-fingerprint --quiet" was an error.  Now, the
handler for optional arguments to "--list-fingerprint" can tell that
"--quiet" is a flag, not an argument.

This only affects flags that take an _optional_ argument, so you can
still put your torrc file in a location starting with "-".

Closes #40223.
2020-12-08 16:53:57 +02:00
David Goulet
2d0a7f2e89 Merge branch 'maint-0.4.5' 2020-12-08 09:15:06 -05:00
David Goulet
c618c4f279 configure: Fix the --enable-static-tor switch
The "-static" compile flag was set globally which means that all autoconf test
were attempting to be built statically and lead to failures of detecting
OpenSSL libraries and others.

This commit adds this flag only to the "tor" binary build.

There is also a fix on where to find libevent.a since it is using libtool, it
is in .libs/.

At this commit, there are still warnings being emitted that informs the user
that the built binary must still be linked dynamically with glibc.

Fixes #40111

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-08 09:14:49 -05:00
Nick Mathewson
b50fcdc2e7 Changes file for #40213 / !227 2020-12-02 10:32:39 -05:00
Nick Mathewson
94fc207d42 Remove changes files for things that went out in 0.4.5.2-alpha or earlier 2020-11-23 14:15:31 -05:00
Alexander Færøy
9bc0306b8c Merge branch 'maint-0.4.5' 2020-11-19 17:44:00 +00:00
Alexander Færøy
b274e46309 Merge branch 'maint-0.4.4' into maint-0.4.5 2020-11-19 17:44:00 +00:00
Alexander Færøy
77bb4b0838 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-11-19 17:43:59 +00:00
Alexander Færøy
2e7cbd7a9c Merge remote-tracking branch 'tor-gitlab/mr/196' into maint-0.4.3 2020-11-19 17:43:44 +00:00
Alexander Færøy
6ce2550468 Merge branch 'maint-0.4.5' 2020-11-19 17:41:05 +00:00
Nick Mathewson
ad4a68bf35 Mention bug number in changes file. 2020-11-19 10:46:29 -05:00
Nick Mathewson
c4e0b28ecb Merge remote-tracking branch 'tor-gitlab/mr/214' into master 2020-11-19 10:42:04 -05:00
David Goulet
ea52705e4b config: Bridge line with a transport must have a ClientTransportPlugin
Fixes #25528

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-18 11:31:37 -05:00
George Kadianakis
34feedea60 Merge remote-tracking branch 'tor-gitlab/mr/216' 2020-11-18 12:37:02 +02:00
David Goulet
16351d655d sendme: Turn log warning into debug
When sending the stream level SENDME, it is possible the cirucit was marked
for close or any other failures that can occur. These events can occur
naturally.

Fixes #40142

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-17 13:23:34 -05:00
David Goulet
0921fdf633 Merge branch 'maint-0.4.5' into master 2020-11-17 12:25:56 -05:00
David Goulet
07006785fd Merge branch 'tor-gitlab/mr/203' into maint-0.4.5 2020-11-17 12:25:48 -05:00
Neel Chauhan
1588767e65 Allow listing ed25519 fingerprints on the command line 2020-11-17 11:23:08 -05:00
Nick Mathewson
3900b19379 Merge branch 'maint-0.4.5' into master 2020-11-17 10:53:39 -05:00
David Goulet
7c06707750 Merge branch 'tor-gitlab/mr/182' into master 2020-11-17 10:36:05 -05:00
David Goulet
d04a27bed2 config: Really ignore non ORPorts when removing duplicates
The function in charge of removing duplicate ORPorts from our configured ports
was skipping all non ORPorts port but only for the outer loop thus resulting
in comparing an ORPort with a non-ORPort which lead to problems.

For example, tor configured with the following would fail:

  ORPort auto
  DirPort auto

Both end up being the same configuration except that one is a OR listener and
one is a Dir listener. Thus because of the missing check in the inner loop,
they looked exactly the same and thus one is removed.

Fixes #40195

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-17 09:40:16 -05:00
Nick Mathewson
6c61011781 Merge remote-tracking branch 'tor-gitlab/mr/184' into master 2020-11-17 08:22:44 -05:00
Nick Mathewson
b13f32ee97 Merge branch 'ticket40071_045_01_squashed' into master 2020-11-17 07:58:37 -05:00
David Goulet
9aaac94cc3 changes: Add file for #40071
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-17 07:58:26 -05:00
Guinness
4382e977f7
Add the compiler name, version and libs used to compile
This changes the behaviour of `tor --version` in such a way.
```console
src/app/tor --version
Tor version 0.4.5.1-alpha-dev (git-46ccde66a97d7985).
Tor is running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1h, Zlib 1.2.11, Liblzma 5.2.4, Libzstd 1.4.5 and Glibc 2.31 as libc.
Tor compiled with GCC version 10.2.0
```

Fixes #32102
2020-11-17 10:43:00 +01:00
Nick Mathewson
c79957581e Merge branch 'maint-0.4.4' into master 2020-11-16 22:42:23 -05:00
Nick Mathewson
9001732394 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-11-16 22:42:22 -05:00
Nick Mathewson
7c0778ef7e Merge branch 'maint-0.3.5' into maint-0.4.3 2020-11-16 22:42:22 -05:00
Nick Mathewson
fcae26adf7 Merge remote-tracking branch 'tor-gitlab/mr/195' into maint-0.3.5 2020-11-16 22:42:15 -05:00
David Goulet
d425dbf04a port: Don't ignore ports of a different family
Commit c3a0f75796 added this feature for ORPort
that we ignore any port that is not the family of our default address when
parsing the port. So if port_parse_config() was called with an IPv4 default
address, all IPv6 address would be ignored.

That makes sense for ORPort since we call twice port_parse_config() for
0.0.0.0 and [::] but for the rest of the ports, it is not good since a
perfectly valid configuration can be:

  SocksPort 9050
  SocksPort [::1]:9050

Any non-ORPort only binds by default to an IPv4 except the ORPort that binds
to both IPv4 and IPv6 by default.

The fix here is to always parse all ports within port_parse_config() and then,
specifically for ORPort, remove the duplicates or superseding ones. The
warning is only emitted when a port supersedes another.

A unit tests is added to make sure SocksPort of different family always exists
together.

Fixes #40183

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-13 08:38:22 -05:00
Neel Chauhan
46ccde66a9 Use connection_or_change_state() in v3 handshaking state change 2020-11-12 12:06:34 -05:00
Nick Mathewson
ffa7b15950 Deliberately close OR connections if proxies leave extra data
We already did this, but we did it by accident, which is pretty
risky: if we hadn't, then our code would have treated extra data in
the inbuf as having been transmitted as TLS-authenticated data.

Closes ticket 40017; Found by opara.
2020-11-12 11:07:33 -05:00
Nick Mathewson
f2168d28f7 Fake the current time when we're loading TEST_DESCRIPTORS.
Fixes bug 40187; bugfix on 0.4.5.1-alpha.
2020-11-12 09:28:27 -05:00
Nick Mathewson
7d8290f0ac Merge remote-tracking branch 'tor-gitlab/mr/183' into master 2020-11-12 08:47:05 -05:00
Nick Mathewson
9306ac5aa8 changes file for bug 40172. 2020-11-10 17:29:37 -05:00
Nick Mathewson
ec0f000445 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-11-09 16:17:42 -05:00
Nick Mathewson
0b2c64effd Merge branch 'maint-0.3.5' into maint-0.4.3 2020-11-09 16:13:42 -05:00
Nick Mathewson
52e439c13e Merge remote-tracking branch 'tor-gitlab/mr/189' into maint-0.3.5 2020-11-09 16:13:24 -05:00
Alexander Færøy
faa96f9a8e Merge remote-tracking branch 'tor-gitlab/mr/193' 2020-11-09 14:15:07 +00:00
Alexander Færøy
5e65a746aa Merge remote-tracking branch 'tor-gitlab/mr/190' 2020-11-09 14:12:45 +00:00
Nick Mathewson
4154158d79 Make config/parse_tcp_proxy_line work in the presence of DNS hijacking
We can use our existing mocking functionality to do this: We have
been in this position before.

Fixes part of #40179; bugfix on 0.4.3.1-alpha.
2020-11-05 09:47:32 -05:00
Nick Mathewson
31a6a101a0 Handle a change in the implementation of hashlib in Python 3.9
Previously, hashlib.shake_256 was a class (if present); now it can
also be a function.  This change invalidated our old
compatibility/workaround code, and made one of our tests fail.

Fixes bug 40179; bugfix on 0.3.1.6-rc when the workaround code was
added.
2020-11-05 09:34:36 -05:00
George Kadianakis
dd119b277b Merge remote-tracking branch 'tor-gitlab/mr/185' into master 2020-11-03 16:06:12 +02:00
David Goulet
486ddde2c4 configure: Check STAP_PROBEV macro when building with USDT tracing
It turns out that STAP_PROBEV() is not available on FreeBSD thus having
sdt/sdt.h is not enough. Look for it now at configure time.

Closes #40174

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-03 09:05:53 -05:00
George Kadianakis
4f5a116618 Merge remote-tracking branch 'tor-gitlab/mr/187' into master 2020-11-03 13:04:09 +02:00
George Kadianakis
f2da7b05b0 Add changes file for v3 metrics.
Closes ticket #23126.
2020-11-03 11:12:17 +02:00
David Goulet
474369e3fa Merge branch 'tor-gitlab/mr/186' 2020-11-02 13:14:02 -05:00
David Goulet
8b240fbe40 Merge branch 'tor-gitlab/mr/188' 2020-11-02 13:09:15 -05:00
Nick Mathewson
7a75a1064f Fix another duplicate typedef.
Fixes #40177; bugfix on 0.4.5.1-alpha.
2020-11-02 07:15:10 -05:00