summaryrefslogtreecommitdiff
path: root/src/feature/relay
AgeCommit message (Collapse)Author
2022-03-16dns: Remove reachable BUG()David Goulet
Fixes #40587 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-16Merge branch 'tor-gitlab/mr/490'David Goulet
2022-03-15relay: Reconfigure libevent options only on DNS params changeDavid Goulet
Related #40312 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-15relay: On new consensus, reconfigure DNS nameserversDavid Goulet
This applies only for relays. Previous commit adds two new consensus parameters that dictate how libevent is configured with DNS resolution. And so, with a new consensus, we now look at those values in case they ever change. Without this, Exit relay would have to HUP or restart to apply any new Exit DNS consensus parameters. Related to #40312 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-15relay: Lower DNS Exit-side timeoutDavid Goulet
Introduces two new consensus parameter: exit_dns_timeout: Number of seconds before libevent should consider the DNS request a timeout. exit_dns_num_attempts: Number of attempts that libeven should retry a previously failing query before calling it a timeout. Closes #40312 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-15rephist: 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-02-25Fix typosDimitris Apostolou
2022-02-22Handle other places that use onion handshake type valuesMike Perry
We want ntor and ntorv3 to use the same queues and stats.
2022-02-22Extend info argument updates for non-ntorv3 casesMike Perry
2022-02-22Use protover to signal support for ntor3 + congestion control.Nick Mathewson
2022-02-22Implement core of ntor3 negotiation.Nick Mathewson
There are a lot of TODOs about what to send, whom to send it to, and etc.
2022-02-14dns: Do not trigger overload general on DNS timeoutDavid Goulet
This was missed in #40527 when the DNS timeout overload general signal was removed. Closes #40564 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-01-19relay: Fix memory leak on BUG() code pathDavid Goulet
Introduced in bf10206e9e23ac0ded2cc9727666696ea25d5636 which is not released yet thus no changes file. Found by Coverity with cid #1495786. Fixes #40532 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-01-18Merge branch 'maint-0.4.6'David Goulet
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-15Fix compiler warnings from ubuntu/jammyDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-12-13relay: Change DNS timeout label on MetricsPortDavid Goulet
Change it from "timeout" to "tor_timeout" in order to indicate that the DNS timeout is one from tor's DNS threshold and not the DNS server itself. Fixes #40527 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-03Merge branch 'maint-0.4.6'David Goulet
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-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-20relay: Comment out a unused variable for nowDavid Goulet
We keep it around until libevent is fixed, it should be used again. In the meantime, avoid the compiler to complain of this unused variable. https://gitlab.torproject.org/dgoulet/tor/-/jobs/43358#L1522 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-20relay: Avoid duplicate MetricsPort DNS errorDavid Goulet
We don't output per-type DNS errors anymore so avoid looping over the DNS query type and output each errors for them. Before this commit, it created 3x the same message because we had A, AAAA and PTR type records. Fix on previous commit e7abab878241592e Signed-off-by: David Goulet <dgoulet@torproject.org>
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-20relay: For metrics, don't report DNS errors by query typeDavid Goulet
This is due to the libevent bug https://github.com/libevent/libevent/issues/1219 that fails to return back the DNS record type on error. And so, the MetricsPort now only reports the errors as a global counter and not a per record type. Closes #40490 Signed-off-by: David Goulet <dgoulet@torproject.org>
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-08-26Add spaces between the "and" when logging the "Your server has not managed ↵Neel Chauhan
to confirm reachability for its" on dual-stack relays
2021-06-28Merge remote-tracking branch 'tor-gitlab/mr/385'George Kadianakis
2021-06-14Merge remote-tracking branch 'tor-gitlab/mr/338'Nick Mathewson
2021-05-12rephist: Add a counter for the onioniskins statsDavid Goulet
Current counters are reset every heartbeat. This commit adds two counters for the assigned and dropped onionskins that are not reset so they can be exported onto the MetricsPort. Closes #40387 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12metrics: One relay metrics was not using metrics_format_label()David Goulet
This resulted in the labels not being surrounded by double quotes and thus Prometheus not liking it. Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12relay: Add TCP port exhaustion metricsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12relay: Add DNS metricsDavid Goulet
Emit on the MetricsPort all the DNS statistics we have that is the total number of queries seen and errors per record type. Related to #40367 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12dns: Gather DNS request statisticsDavid Goulet
We now keep track of all errors and total number of request seen. This is so we can expose those values to the MetricsPort to help Exit operators monitor the DNS requests and failures. Related to #40367. Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12relay: Add the global connection limit metricsDavid Goulet
This emits two events (read and write) of the total number that the global connection limit was reached. Related to #40367 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12relay: Add number of open and max sockets metricsDavid Goulet
With this commit, a relay will emit metrics that give the total number of sockets and total number of opened sockets. Related to #40367 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12relay: Add the onionskins processing metricsDavid Goulet
With this commit, a relay now emits metrics event on the MetricsPort related to how many onionskins were handled (processed or dropped) for each handshake type. Related to #40367 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12relay: Add the OOM invocation metricsDavid Goulet
With this commit, a relay now emits metrics event on the MetricsPort related to the OOM invocation for: - DNS cache - GeoIP database - Cell queues - HSDir caches Everytime the OOM is invoked, the number of bytes is added to the metrics counter for that specific type of invocation. Related to #40367 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12relay: Code and objects to initialize metrics storeDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-12relay: Groundwork for relay metrics supportDavid Goulet
The basic functions for the relay subsystem to expose metrics onto the MetricsPort. Part of #40367 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-11Ignore MAX_BANDWIDTH_CHANGE_FREQ on testing networks.Nick Mathewson
Part of the ever-growing 40337 fix.
2021-05-10Remove 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-05-10Merge remote-tracking branch 'tor-gitlab/mr/369'Alexander Færøy