[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [nyx/master] Notify when connection information is unavailable
commit e042022c117ad817d2ac8e974241c53d5c3448b9
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Wed Jan 9 10:41:26 2019 -0800
Notify when connection information is unavailable
Provide a notice explaining why connection information is unavailable
when the user's system lacks /proc content. Ususally Mac and BSD users.
https://trac.torproject.org/projects/tor/ticket/24958
---
nyx/tracker.py | 9 ++++-----
web/changelog/index.html | 1 +
web/index.html | 21 +++++++++++++++++++++
3 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/nyx/tracker.py b/nyx/tracker.py
index b0ea9bb..f6880d2 100644
--- a/nyx/tracker.py
+++ b/nyx/tracker.py
@@ -510,13 +510,12 @@ class ConnectionTracker(Daemon):
# resolution. Otherwise connection resolution by inference is the only game
# in town.
- self._resolvers = []
+ self._resolvers = [CustomResolver.INFERENCE] if stem.util.proc.is_available() else []
if tor_controller().get_conf('DisableDebuggerAttachment', None) == '0':
- self._resolvers = connection.system_resolvers()
-
- if stem.util.proc.is_available():
- self._resolvers = [CustomResolver.INFERENCE] + self._resolvers
+ self._resolvers = self._resolvers + connection.system_resolvers()
+ elif not self._resolvers:
+ stem.util.log.notice("Tor connection information is unavailable. This is fine, but if you would like to have it please see https://nyx.torproject.org/#no_connections")
stem.util.log.info('Operating System: %s, Connection Resolvers: %s' % (os.uname()[0], ', '.join(self._resolvers)))
diff --git a/web/changelog/index.html b/web/changelog/index.html
index 0ba98c2..d49533e 100644
--- a/web/changelog/index.html
+++ b/web/changelog/index.html
@@ -77,6 +77,7 @@
<li>Blank debug path caused us to crash (<a href="https://trac.torproject.org/projects/tor/ticket/27350">ticket</a>)</li>
<li>Nyxrc <i>password</i> option for the controller credential (<a href="https://trac.torproject.org/projects/tor/ticket/28295">ticket</a>)</li>
<li>Accept shorthand '--interface' arugments with a colon but no address (<a href="https://trac.torproject.org/projects/tor/ticket/28965">ticket</a>)</li>
+ <li>Notification when connection information is unavailable (<a href="https://trac.torproject.org/projects/tor/ticket/24958">ticket</a>)</li>
</ul>
</li>
diff --git a/web/index.html b/web/index.html
index 0ec396e..33332c2 100644
--- a/web/index.html
+++ b/web/index.html
@@ -280,6 +280,27 @@ E: Unable to locate package nyx</pre>
</div>
</li>
+ <li id="no_connections">
+ <span>Why can't I see Tor's connections?</span>
+ <div class="answer">
+ <p>Nyx can provide you with information about <a href="images/features/connections.png">tor's active connections</a>. This information is retrieved from your system's <b>/proc</b> content or tools such as <i>netstat</i> and <i>lsof</i>.</p>
+
+ <p>Unfortunately Tor inadvertently breaks the tools Nyx falls back to through a featurure called <a href="https://www.torproject.org/docs/tor-manual.html.en#DisableDebuggerAttachment"><b>DisableDebuggerAttachment</b></a>, which makes tor's process memory only readable by root.</p>
+
+ <p>This leaves you with three options...</p>
+
+ <ol>
+ <li><p>Use Nyx without connection data. <b>Nyx does not require connection information</b>, and aside a sparse connection list you probably won't even notice.</p></li>
+ <li><p>Run Nyx as root. <b>This is not recommended.</b></p></li>
+ <li><p>Turn off <a href="https://www.torproject.org/docs/tor-manual.html.en#DisableDebuggerAttachment"><b>DisableDebuggerAttachment</b></a> by adding the following to your <a href="https://www.torproject.org/docs/faq.html.en#torrc">torrc</a> and restarting tor...</p>
+ <pre>DisableDebuggerAttachment 0</pre>
+ </li>
+ </ol>
+
+ <p>Don't fret overly much about this decision. Nothing at play here is important - connection data is unimportant <b>and</b> DisableDebuggerAttachment's <a href="https://trac.torproject.org/projects/tor/ticket/3313">security benefit</a> is insignificant. Either decision is fine.</p>
+ </div>
+ </li>
+
<li id="missing_relay_details">
<span>Why are connections missing relay details?</span>
<div class="answer">
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits