- 21 Oct, 2019 1 commit
-
-
Roger Dingledine authored
Relays now respect their AccountingMax bandwidth again. When relays entered "soft" hibernation (which typically starts when we've hit 90% of our AccountingMax), we had stopped checking whether we should enter hard hibernation. Soft hibernation refuses new connections and new circuits, but the existing circuits can continue, meaning that relays could have exceeded their configured AccountingMax. This commit rolls back some of the cpu-saving fixes, where we tried to avoid calling so many of our events while we're off the network. That's because PERIODIC_EVENT_FLAG_NEED_NET checks net_is_disabled(), which returns true even if we're only in soft hibernation. Fixes bug 32108; bugfix on 0.4.0.1-alpha.
-
- 16 Jan, 2019 2 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
-
- 17 Dec, 2018 2 commits
-
-
This patch changes the slow process_t tests to use run_main_loop_until_done() instead of do_main_loop() since do_main_loop() initializes a lot of subsystem callbacks that we don't need to run in our tests. See: https://bugs.torproject.org/28179
-
This patch makes the managed proxy subsystem use the process_t data structure such that we can get events from the PT process while Tor is running and not just when the PT process is being configured. See: https://bugs.torproject.org/28179
-
- 13 Dec, 2018 1 commit
-
-
Nick Mathewson authored
When the clock jumps, and we have a record of last user activity, adjust that record. This way if I'm inactive for 10 minutes and then the laptop is sleeping for an hour, I'll still count as having been inactive for 10 minutes. Previously, we treat every jump as if it were activity, which is ridiculous, and would prevent a Tor instance with a jumpy clock from ever going dormant.
-
- 04 Dec, 2018 1 commit
-
-
Nick Mathewson authored
Rather than initializing the "Dormant" status to "off" and the "last activity" count to "now", initialize them based on our state file: stay dormant if we were dormant, or remember the amount of time we've spent inactive.
-
- 28 Nov, 2018 1 commit
-
-
teor authored
Instead of checking NS_EXPIRY_SLOP, use networkstatus_consensus_reasonably_live(). Preparation for 28591.
-
- 26 Nov, 2018 3 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
The DormantClientTimeout option controls how long Tor will wait before going dormant. It also provides a way to disable the feature by setting DormantClientTimeout to e.g. "50 years". The DormantTimeoutDisabledByIdleStreams option controls whether open but inactive streams count as "client activity". To implement it, I had to make it so that reading or writing on a client stream *always* counts as activity. Closes ticket 28429.
-
- 17 Nov, 2018 1 commit
-
-
rl1987 authored
-
- 15 Nov, 2018 15 commits
-
-
Nick Mathewson authored
Otherwise, if we're dormant, and we set ORPort, nothing makes us become non-dormant.
-
Nick Mathewson authored
Also rename "...flush_and_disable()" to "...schedule_and_disable()"
-
Nick Mathewson authored
-
Nick Mathewson authored
This event makes us become dormant if we have seen no activity in a long time. Note that being any kind of a server, or running an onion service, always counts as being active. Note that right now, just having an open stream that Tor did not open on its own (for a directory request) counts as "being active", so if you have an idle ssh connection, that will keep Tor from becoming dormant. Many of the features here should become configurable; I'd like feedback on which.
-
Nick Mathewson authored
This patch implements all of 28337, except for the part where we turn off the role if we've been idle for a long time.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
This is part of 28422, so we don't have to call consider_hibernation() once per second when we're dormant. This commit does not remove delayed shutdown from hibernate.c: it uses it as a backup shutdown mechanism, in case the regular shutdown timer mechanism fails for some reason.
-
Nick Mathewson authored
(There was nothing else in second_elapsed_callbck() that couldn't go here.)
-
Nick Mathewson authored
Part of making extra-dormant mode work; closes ticket 28421.
-
Nick Mathewson authored
-
Nick Mathewson authored
The previous "ALL" role was the OR of a bunch of other roles, which is a mistake: it's better if "ALL" means "all". The "NET_PARTICIPANT" role refers to the anything that is actively building circuits, downloading directory information, and participating in the Tor network. For now, it is set to !net_is_disabled(), but we're going to use it to implement a new "extra dormant mode". Closes ticket 28336.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
- 14 Nov, 2018 1 commit
-
-
Nick Mathewson authored
-
- 11 Nov, 2018 1 commit
-
-
rl1987 authored
-
- 16 Oct, 2018 1 commit
-
-
Nick Mathewson authored
-
- 27 Sep, 2018 3 commits
-
-
Nick Mathewson authored
Various places in our code try to activate these events or check their status, so we should make sure they're initialized as early as possible. Fixes bug 27861; bugfix on 0.3.5.1-alpha.
-
Nick Mathewson authored
This commit just moves the code to two separate files. The geoip code still has a few needless dependencies on core/* and features/*.
-
Nick Mathewson authored
It differs from the rest of the rephist code in that it's actually necessary for Tor to operate, so it should probably go somewhere else. I'm not sure where yet, so I'll leave it in the same directory, but give it its own file.
-
- 25 Sep, 2018 5 commits
-
-
Nick Mathewson authored
Make them only include the headers that they needed, and sort their headers while we're at it.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
This is preparation for having a routermode.h as well
-
Nick Mathewson authored
-
- 22 Sep, 2018 1 commit
-
-
Nick Mathewson authored
Fixes a stem test failure; bugfix on c7ce6b98. Bug not in any released Tor.
-
- 21 Sep, 2018 1 commit
-
-
Nick Mathewson authored
-