aboutsummaryrefslogtreecommitdiff
path: root/src/feature
AgeCommit message (Collapse)Author
2022-04-14Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-04-14Merge branch 'tor-gitlab/mr/491' into maint-0.4.5David Goulet
2022-04-14Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-04-14Merge branch 'tor-gitlab/mr/497' into maint-0.4.5David Goulet
2022-03-29rephist: Introduce a fraction and period for overload onionskinDavid Goulet
This code was heavily reused from the previous DNS timeout work done in ticket #40491 that was removed afterall from our code. Closes #40560 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-10Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-03-10hs: Schedule mainloop event on dirinfo changeDavid Goulet
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-09Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-03-08hs: Fix multiple port label on single metricDavid Goulet
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-02-03Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-02-03hs: Double quote the metrics label valueDavid Goulet
Fixes #40552 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-01-18Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-01-18Merge branch 'maint-0.3.5' into maint-0.4.5David Goulet
2022-01-18Update new relay blogpost URLJérôme Charaoui
This removes the '/blog/' URL component which relies on a redirection since the blog has been migrated to Lektor
2021-12-13relay: Don't make DNS timeout trigger an overloadDavid Goulet
Tor has configure libevent to attempt up to 3 times a DNS query for a maximum of 5 seconds each. Once that 5 seconds has elapsed, it consider the query "Timed Out" but tor only gets a timeout if all 3 attempts have failed. For example, using Unbound, it has a much higher threshold of timeout. It is well defined in https://www.nlnetlabs.nl/documentation/unbound/info-timeout/ and has some complexity to it. But the gist is that if it times out, it will be much more than 5 seconds. And so the Tor DNS timeouts are more of a "UX issue" rather than a "network issue". For this reason, we are removing this metric from the overload general signal. See https://gitlab.torproject.org/tpo/network-health/team/-/issues/139 for more information. Fixes #40527 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-12-06Limit the number of elements in a consdiff hash line.Nick Mathewson
This avoids performing and then freeing a lot of small mallocs() if the hash line has too many elements. Fixes one case of bug 40472; resolves OSS-Fuzz 38363. Bugfix on 0.3.1.1-alpha when the consdiff parsing code was introduced.
2021-11-15Do not count controller-selected paths towards path bias.Nick Mathewson
As a side effect, this fixes a "Bug" warning. Closes #40515. Bugfix on 0.2.4.10-alpha.
2021-11-05Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2021-11-05protover: Fix merge forward from 035David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-05Merge branch 'maint-0.3.5' into maint-0.4.5David Goulet
2021-11-05protover: Move all hardcoded lists in one placeDavid Goulet
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-05Add scary warnings about changing the protover list.Nick Mathewson
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-03Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-03relay: Don't allow DirPort on non-IPv4David Goulet
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-10-28Fix compilation on systems with older compilers.Alexander Færøy
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-21Merge branch 'maint-0.4.5' into maint-0.4.6Alexander Færøy
2021-10-21Merge remote-tracking branch 'tor-gitlab/mr/338' into maint-0.4.5Alexander Færøy
2021-10-20Merge branch 'maint-0.3.5' into maint-0.4.5Alexander Færøy
2021-10-20Announce URL to bridge status page when starting Tor as a bridge relay.Alexander Færøy
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-20Merge branch 'maint-0.4.5' into maint-0.4.6Alexander Færøy
2021-10-20Merge branch 'maint-0.3.5' into maint-0.4.5Alexander Færøy
2021-10-20Remove unused function: dns_randfn_() in dns.c.Alexander Færøy
This patch unbreaks the current build after tor!369 landed. See: https://bugs.torproject.org/tpo/core/tor/40371
2021-10-20Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5Alexander Færøy
2021-10-20relay: Overload state on DNS timeout is now X% over Y secsDavid Goulet
With this commit, we will only report a general overload state if we've seen more than X% of DNS timeout errors over Y seconds. Previous behavior was to report when a single timeout occured which is really too small of a threshold. The value X is a consensus parameters called "overload_dns_timeout_scale_percent" which is a scaled percentage (factor of 1000) so we can represent decimal points for X like 0.5% for instance. Its default is 1000 which ends up being 1%. The value Y is a consensus parameters called "overload_dns_timeout_period_secs" which is the time period for which will gather DNS errors and once over, we assess if that X% has been reached ultimately triggering a general overload signal. Closes #40491 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19hs: Fix merge conflicts after merging forward 40476David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19hs: Improve warning for bad service versionDavid Goulet
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-19hs: Improve warning for bad service versionDavid Goulet
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-19hs-v2: Disable version 2 HSPOST and HSFETCH commandDavid Goulet
Part of #40476 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19hs-v2: Disable version 2 directoryDavid Goulet
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-19Merge branch 'ticket40476_045_01' into ticket40476_046_01David Goulet
2021-10-19hs: Improve warning for bad service versionDavid Goulet
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-19hs-v2: Disable version 2 HSPOST and HSFETCH commandDavid Goulet
Part of #40476 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19hs-v2: Disable version 2 directoryDavid Goulet
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-19hs-v2: Disable version 2 introduction pointDavid Goulet
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-19hs-v2: Disable version 2 serviceDavid Goulet
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-06Merge branch 'tor-gitlab/mr/392' into maint-0.4.5David Goulet
2021-10-06Merge branch 'tor-gitlab/mr/393' into maint-0.4.5David Goulet
2021-10-06Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2021-09-30hs-v2: Disable version 2 HSPOST and HSFETCH commandDavid Goulet
Part of #40476 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-09-30hs-v2: Disable version 2 directoryDavid Goulet
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>