torproject / nyx Goto Github PK
View Code? Open in Web Editor NEWCommand-line monitor for Tor.
Home Page: https://nyx.torproject.org/
License: GNU General Public License v3.0
Command-line monitor for Tor.
Home Page: https://nyx.torproject.org/
License: GNU General Public License v3.0
Nyx seems to be showing me the “real" uptime of my relay, that is the time since I started it. However, since I have a dynamic address, the effective uptime (the value I see on Onionoo and in Tor logs) is not equivalent to that value. Is there any way I can see that instead?
I got a tor node up and running of my pi right, I installed nyx, launched it on my control port and was met with this stack trace
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self,_args,**self.kwargs)
File "/home/---/.local/lib/python3.9/site-packages/nyx/__init__.py", line 745, in halt_panels
panel.join()
File "/usr/lib/python3.9/threading.py", line 1028, in join
raise RuntimeError("cannot join thread before it is started")
RuntimeError: cannot join thread before it is started
Traceback (most recent call last):
File "/usr/bin/nyx", line 33, in <module>
sys.exit(load_entry_point('nyx==2.1.0', 'console_scripts', 'nyx')())
File "/home/---/.local/lib/python3.9/site-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/lib/python3/dist-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/home/---/.local/lib/python3.9/site-packages/nyx/starter.py", line 128, in main
nyx.curses/start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
File "/home/---/.local/lib/python3.9/site-packages/nyx/curses.py", line 219, in start
curses.wrapper(_wrapper)
File "/usr/lib/python3/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/home/---/.local/lib/python3.9/site-packages/nyx/curses.py", line 217, in _wrapper
function()
File "/home/---/.local/lib/python3.9/site-packages/nyx/__init__.py", line 194, draw_loop
interface = nyx_interface()
File "/home/---/.local/lib/python3.9/site-packages/nyx/__init__.py", line 256, in nyx_interface
interface() # constructor sets NYX_INTERFACE
File "/home/---/.local/lib/python3.9/site-packages/nyx/__init__.py", line 601, in __init__
first_page_panels.append(nyx.panel.log.LogPanel())
File "/home/---/.local/lib/python3.9/site-packages/nyx/panel/log.py", line 110, in __init__
log_location = nyx.log.log_file_path(tor_controller())
File "/home/---/.local/lib/python3.9/site-packages/nyx/log.py", line 88, in log_file_path
if entry_comp[1] == 'file':
IndexError: list index out of range
I was about to blow my brains out then I made this change to the log.py
file
- if entry_comp[1] == 'file':
+ if entry_comp[0] == 'file':
then it worked perfectly fine with no issues, curses were a little screwed up for whatever reason but I'm not complaining.
I'm running nyx 2.1.0 from the debian repositories (installed tor-arm & nyx). Reply with any other requested information. Also if the stack trace looks a little funny I copied it by hand 👍
My current invocation is:
sudo -u debian-tor nyx -s /run/tor/control
Nyx should take -u debian-tor
as both a CLI & nyxrc option, and drop privs to minimum necessary so it's not running escalated.
Alternatively, the man page should give instructions on e.g. what chgrp
to set on the socket (or torrc config lines, or whatever) so that it can run as the current user w/out sudo
.
Hi,
Running Tor 0.4.5.1-alpha here. I've installed Nyx with Python's pip3 installer.
Tor currently has around 2300 inbound and 2300 outbound connections (checked with netstat -p).
When I run nyx I don't see any inbound connections at all:
Connections (2412 outbound, 1 control)
When I switch the resolver to netstat I get this:
Connections (5130 outbound, 1 control)
I also tried shutting down the relay and restarting it but that didn't fix the issue.
Tor is build with:
./configure --disable-module-dirauth --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/man --libdir=/usr/lib64 --docdir=/usr/doc/tor-0.4.5.1-alpha --with-tor-user=tor --with-tor-group=tor --build=x86_64-slackware-linux
I have tried the package, port, and pip installs of nyx version 2.1.0 on the armv7 arch version of OpenBSD 6.8, and have gotten the same error every time. Upon loading the script, the following stacktrace appears and the user is dumped back to the shell:
borgi$ nyx
Traceback (most recent call last):
File "/usr/local/bin/nyx", line 11, in <module>
load_entry_point('nyx==2.1.0', 'console_scripts', 'nyx')()
File "/usr/local/lib/python3.8/site-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/local/lib/python3.8/site-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/usr/local/lib/python3.8/site-packages/nyx/starter.py", line 90, in main
controller = init_controller(
File "/usr/local/lib/python3.8/site-packages/nyx/__init__.py", line 325, in init_controller
TOR_CONTROLLER = stem.connection.connect(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/stem/connection.py", line 291, in connect
return _connect_auth(control_connection, password, password_prompt, chroot_path, controller)
File "/usr/local/lib/python3.8/site-packages/stem/connection.py", line 375, in _connect_auth
return controller(control_socket, is_authenticated = True)
File "/usr/local/lib/python3.8/site-packages/stem/control.py", line 1057, in __init__
super(Controller, self).__init__(control_socket, is_authenticated)
File "/usr/local/lib/python3.8/site-packages/stem/control.py", line 585, in __init__
self._post_authentication()
File "/usr/local/lib/python3.8/site-packages/stem/control.py", line 3902, in _post_authentication
owning_pid = self.get_conf('__OwningControllerProcess', None)
File "/usr/local/lib/python3.8/site-packages/stem/control.py", line 2170, in get_conf
entries = self.get_conf_map(param, default, multiple)
File "/usr/local/lib/python3.8/site-packages/stem/control.py", line 2273, in get_conf_map
for key in reply:
RuntimeError: dictionary keys changed during iteration
borgi$
My apologies if this is an error that should be reported somewhere else; if so, please let me know the appropriate group or forum to report it on and I will take it there. Thank you for your time and assistance on this matter!
Migrated from ticket 18547.
Many releases ago Nyx showed hostnames on the connection panel, but dropped this because it leaked our connections to our DNS provider. We can still get this information, but it must be on every relay or none at all.
Turns out Onionoo already supports exactly what we want! In particular here's the query we want.
Note that Onionoo supports gzip compression and we want to take advantage since it drops the size of our replies from 1.5 MB to 432.6 KB.
For this we want a new Daemon subclass in tracker.py. This class would have a single relay_details(fingerprint) method that returns a struct with these attributes. If we meet the following two constraints then it calls Onionoo to update our cache...
Note that we might not want all of these geoip fields (we'll need to fiddle with the panel to see what is nice to have).
Nyx seems to have a memory leak. If it runs for a long time it will consume my whole swap. This time it ran 2 days only and needs 3GB swap and 1GB RAM of and won't close until the swap is freed or you press ctrl+c multiple times.
Migrated from ticket 28334.
Nyx 2.0.4 at Linux.
The first problem exist with all options: if I select some option, then press Enter
(so, start editing it), and then press ESC
, all old values for the option are erased (value becomes none
). This behavior confuses users, because normally ESC
should keep old version of values. To my opinion, if I really need to make it none
I should manually remove old values (or press ctrl+u
) and then press Enter
.
The second problem exist with options which have very long list of values. For example, you can consider torrc
with a long list of SocksPort
options or a long list of values for ExcludeNodes
option. If you select such option in configuration editor (press Enter
), only the first part of values' list will be shown. Other lengthy part of values list will not be printed and will not be accessible for editing (it is considered as non-existing). I guess it is related to the problem of line splitting (#28297). Since the first part of accessible values may end at any character (when end of line is reached), if I don't do anything, but just print Enter
, I may get an error
Unacceptable option value: Invalid SocksPort configuration (press any key)
As nyx
gives to Tor wrong option values, there are many warnings in a log file of tor
itself, e.g.:
Controller gave us config lines that didn't validate: Invalid SocksPort configuration
Thus, if you accidentally press Enter
on any option with too long list of values, you get trapped in inescapable situation: ESC
will erase all old values, Enter
will change them too (possibly with some errors). It is impossible to preserve status quo.
Always when I open nyx I see glichty text, like instead of No nyxrc loaded, No yxcr loaeda or lke this.
The worst is that there is stuff in the graphs (0;7[0;), seem to be color definers. Only happens on start. The first line is someting completely screwed up. Doesn't happen, if I try with zsh, only when using login shells (eg. tty 2...).
Hi,
Fedora is testing rebuilding its packages with Python 3.11, which is expected to be released in Fedora 37 (~ 1 year), and we have found this error when running the nyx tests.
See original bug report: https://bugzilla.redhat.com/show_bug.cgi?id=2021902
+ /usr/bin/python3 run_tests.py
Traceback (most recent call last):
File "/builddir/build/BUILD/nyx-2.1.0/run_tests.py", line 80, in <module>
main()
^^^^^^
File "/usr/lib/python3.11/site-packages/stem/util/conf.py", line 288, in wrapped
if 'config' in inspect.getargspec(func).args:
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
Removed from the inspect module:
getargspec
function, deprecated since Python 3.0; use inspect.signature()
or inspect.getfullargspec()
instead.https://bugs.python.org/issue45320
https://docs.python.org/3.11/whatsnew/3.11.html
I'm curious if a relay with nyx would have the same /var/lib/tor directory as one without nyx? So my question is does nyx interact with this directory at all? Thanks!
Migrated from ticket 32552.
Every single time I try to connect to for from Nyx I get
Traceback (most recent call last):
File "/bin/nyx", line 11, in <module>
load_entry_point('nyx==2.1.0', 'console_scripts', 'nyx')()
File "/usr/lib/python3.8/site-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/lib/python3.8/site-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/usr/lib/python3.8/site-packages/nyx/starter.py", line 90, in main
controller = init_controller(
File "/usr/lib/python3.8/site-packages/nyx/__init__.py", line 325, in init_controller
TOR_CONTROLLER = stem.connection.connect(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 291, in connect
return _connect_auth(control_connection, password, password_prompt, chroot_path, controller)
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 404, in _connect_auth
return _connect_auth(control_socket, password, password_prompt, chroot_path, controller)
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 375, in _connect_auth
return controller(control_socket, is_authenticated = True)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 1057, in __init__
super(Controller, self).__init__(control_socket, is_authenticated)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 585, in __init__
self._post_authentication()
File "/usr/lib/python3.8/site-packages/stem/control.py", line 3902, in _post_authentication
owning_pid = self.get_conf('__OwningControllerProcess', None)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 2170, in get_conf
entries = self.get_conf_map(param, default, multiple)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 2273, in get_conf_map
for key in reply:
RuntimeError: dictionary keys changed during iteration
Using Arch Linux on a headless server, python 3.8.0b4. Tried both cookie and password authentication methods. Controlport is 9051, inaccessible from outside (firewall set up to allow any internal connections to any port)
Migrated from ticket 31792.
I do run 2 relays at the same ip address at different ports
The stem example shows (corrrect):
mr-fox ~ # for p in 9051 29051 ; do python /usr/share/doc/stem-1.7.1/_static/example/relay_connections.py --ctrlport $p; done
0.4.1.6 uptime: 02:15:02 flags: Fast, Running, Stable, V2Dir, Valid
+------------------------------+------+------+
| Type | IPv4 | IPv6 |
+------------------------------+------+------+
| Inbound to our ORPort | 3119 | 3 |
| Inbound to our ControlPort | 1 | 0 |
| Outbound to a relay | 3758 | 0 |
| Outbound uncategorized | 16 | 0 |
+------------------------------+------+------+
| Total | 6894 | 3 |
+------------------------------+------+------+
0.4.1.6 uptime: 02:02:58 flags: Fast, Running, Stable, V2Dir, Valid
+------------------------------+------+------+
| Type | IPv4 | IPv6 |
+------------------------------+------+------+
| Inbound to our ORPort | 2117 | 3 |
| Inbound to our ControlPort | 1 | 0 |
| Outbound to a relay | 3702 | 0 |
| Outbound uncategorized | 16 | 0 |
+------------------------------+------+------+
| Total | 5836 | 3 |
+------------------------------+------+------+
A call of nyx, eg.:
sudo -u tor /bin/bash -c "/usr/bin/nyx -i 9051"
however shows about 7500 connections (Alt+S -> Connections) which seems to be the sum of boths.
Netstat etc how that the command line values are right, Nyx is wrong.
Migrated from ticket 18708.
I've been impressed at how much Nyx users miss. Hell, I've met longtime users that didn't even know you could press left/right for additional pages. They thought Nyx had just one!
To be fair Nyx's discoverability sucks. I've tried to keep the most important information simple so it can be displayed on a single line...
m: menu, p: pause, h: page help, q: quit
But maybe we should show a one-time popup to first time Nyx users that explains how Nyx works. We could then persist a 'shown' flag in their home directory to suppress future popups.
The connection tab of my relay is just empty. On the traffic page nyx shows the following error message:
[NYX_NOTICE] BUG: Unexpected exception from ConnectionTracker: "getpwnam(): name not found: 'tor'"
My relay is running in a docker container, ControlPort is correctly forwarded from the container and everything else except the connections tab also works.
Our website tries to fall back when JS is unavailable, but our FAQ is entirely missing without JS.
Without JS we can't toggle the visibility of items, but the information should be available in some form.
Hi there. Is there a way to increase the maximum allowed characters in the config tab? Seems like the max is currently 85 and the pasted value is getting cut off.
Migrated from ticket 27517.
I did not find out why I see stem's debug output with ./run_nyx from a fresh clone:
nyx_fresh$ ./run_nyx -d nyx.log
TRACE:stem:Nyx 2.0.4-dev Debug Dump
Stem Version: 1.6.0
Python Version: 2.7.15
Platform: Linux (debian buster/sid )
--------------------------------------------------------------------------------
Nyx Configuration (/home/user/.nyx/config):
[file doesn't exist]
--------------------------------------------------------------------------------
Saving a debug log to nyx.log, please check it for sensitive information before sharing it.
NOTICE:stem:No nyxrc loaded, using defaults. You can customize nyx by placing a configuration file at /home/user/.nyx/config (see https://nyx.torproject.org/nyxrc.sample for its options).
TRACE:stem:config entry 'tor_chroot' not found, defaulting to ''
TRACE:stem:Sent to tor: PROTOCOLINFO 1
TRACE:stem:Received from tor:
250-PROTOCOLINFO 1
250-AUTH METHODS=COOKIE,SAFECOOKIE,HASHEDPASSWORD COOKIEFILE="/var/run/tor/control.authcookie"
250-VERSION Tor="0.3.5.0-alpha-dev"
250 OK
Tor controller password:
Title. Has been working good for a month, now I'm getting "segmentation fault". happens through SSH as well. Have removed and reinstalled.
nyx version 2.1.0 (released January 12, 2019)
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Tor version 0.4.5.10.
User interface reads the tor version as "obsolete":
nyx - lada (Linux 4.19.0-17-amd64) Tor 0.2.9.8 (obsolete)
Migrated from ticket 18540.
Probably the most common annoying visual bug I've seen is broken curses ACS support. This causes us to show 'mwqqqqqqqqqqqqq' for window borders...
We can sidestep this by showing ASCII pipes instead ('+--------+'), but to do that we need to be able to detect when ACS is broken. Thus far I'm not sure how to do this - tips welcome...
I'm running nyx, but I had a browser process in the background before I launched it. Every so often the browser process prints stuff to its stdout, which clutters up my nyx screen in weird ways.
In normal unix terminal applications, I would type "control l", aka Ctrl-L, and it would refresh my screen, to get rid of the random stuff printed on my screen that nyx didn't intend to be there.
Does nyx support that? Should it?
The behavior I want is essentially as though I pressed right arrow and then left arrow (plus redrawing the top part too, if that doesn't also happen when I shift nyx pages)
Right now the --interface
option only supports connecting to ipv4 addresses - it would be nice if I could connect over ipv6 as well.
The use case is that I'm deploying Tor on https://fly.io and they connect applications together over ipv6:
https://fly.io/docs/reference/privatenetwork/
To avoid running Nyx / the control protocol over the public internet I'd like to deploy Nyx in a container which I ssh into, and that container connects to my Tor instance over ipv6.
Thanks,
Migrated from ticket 14979.
Vidalia allows that, and that's one thing we at Tails will be missing when we remove it. The main use case is debugging potentially buggy or malicious exit nodes. For example, you get an unexpected HTTPS or SSH warning, write down the info about your exit node, and close that circuit to get a fresh one and confirm your suspicions.
Latest git master of both Stem and Nyx gives me this error:
Traceback (most recent call last):
File "/usr/local/bin/nyx", line 11, in <module>
load_entry_point('nyx==2.1.0.dev0', 'console_scripts', 'nyx')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2693, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2324, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2330, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python3.6/dist-packages/nyx-2.1.0.dev0-py3.6.egg/nyx/__init__.py", line 779, in <module>
import nyx.panel.log
File "/usr/local/lib/python3.6/dist-packages/nyx-2.1.0.dev0-py3.6.egg/nyx/panel/log.py", line 69, in <module>
NYX_LOGGER = log.LogBuffer(log.Runlevel.DEBUG, yield_records = True)
AttributeError: module 'stem.util.log' has no attribute 'LogBuffer'
Stem: d1174a83c2dcb7b855d8fc986be3ab8f8d88d68c
Nyx: 796089d
Just restarted my tor relay node and went to use nyx to check its status. Running 2.1.0-r2 (latest available on Gentoo). Getting:
kevinc@rackserv ~ $ nyx Traceback (most recent call last): File "/usr/lib/python-exec/python3.9/nyx", line 33, in <module> sys.exit(load_entry_point('nyx==2.1.0', 'console_scripts', 'nyx')()) File "/usr/lib/python-exec/python3.9/nyx", line 25, in importlib_load_entry_point return next(matches).load() File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load module = import_module(match.group('module')) File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 850, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/usr/lib/python3.9/site-packages/nyx/__init__.py", line 767, in <module> import nyx.panel.log File "/usr/lib/python3.9/site-packages/nyx/panel/log.py", line 69, in <module> NYX_LOGGER = log.LogBuffer(log.Runlevel.DEBUG, yield_records = True) AttributeError: module 'stem.util.log' has no attribute 'LogBuffer'
All help would be appreciated.
Hi,
Upon attempting to use nyx on a Slackware system the graphs remain empty. I assume it is an dependency issue that was not caught at install time. I resolved all the dependency issues it showed during the installation by compiling Python with SQLITE support and it seems that the program is fully working, with the only exception being the graphs.
Traffic does seem to be captured as I am able to see connections.
Any idea what else I might need to install?
I also installed nyx on an openSUSE system, where immediately upon launching pretty graphs were generated.
Thanks!
Georg
Picture of expected output (also moving): https://hugz.io/6w739c/Screenshot_20210610_103207.png
Picture of observed output (no reaction): https://hugz.io/4yy54p/Screenshot_20210610_103300.png
~/.nyx/config
color_override cyan
result
Traceback (most recent call last):
File "/usr/bin/nyx", line 11, in <module>
load_entry_point('nyx==2.1.0', 'console_scripts', 'nyx')()
File "/usr/lib/python3/dist-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/lib/python3/dist-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/usr/lib/python3/dist-packages/nyx/starter.py", line 128, in main
nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
File "/usr/lib/python3/dist-packages/nyx/curses.py", line 219, in start
curses.wrapper(_wrapper)
File "/usr/lib/python3.8/curses/__init__.py", line 105, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/python3/dist-packages/nyx/curses.py", line 217, in _wrapper
function()
File "/usr/lib/python3/dist-packages/nyx/__init__.py", line 221, in draw_loop
nyx.menu.show_menu()
File "/usr/lib/python3/dist-packages/nyx/menu.py", line 210, in show_menu
selection_x = _draw_top_menubar(menu, cursor.selection)
File "/usr/lib/python3/dist-packages/nyx/menu.py", line 296, in _draw_top_menubar
nyx.curses.draw(_render, height = 1, background = RED)
File "/usr/lib/python3/dist-packages/nyx/curses.py", line 758, in draw
curses_subwindow.bkgd(' ', curses_attr(background, HIGHLIGHT))
File "/usr/lib/python3/dist-packages/nyx/curses.py", line 440, in curses_attr
encoded |= _color_attr()[override if override else attr]
KeyError: 'cyan'
free(): invalid next size (fast)
$ nyx --version
nyx version 2.1.0 (released January 12, 2019)
Events (TOR/NYX NOTICE-ERR, ADDRMAP, CONF_CHANGED, GUARD, NETWORK_LIVENESS, SIGNAL, STATUS_CLIENT, STATUS_GENERAL):
logged_events NOTICE, WARN, ERR, NYX_NOTICE, NYX_WARNING, NYX_ERROR, ADDRMAP, CONF_CHANGED, GUARD, NETWORK_LIVENESS, SIGNAL, STATUS_CLIENT
Your --log argument had the following events tor doesn't recognize: WARN, ERR, NYX_NOTICE, NYX_WARNING, NYX_ERROR, ADDRMAP, CONF_CHANGED, GUARD, NETWORK_LIVENESS, SIGNAL, STATUS_CLIENT
They're 9 years out of date.
https://nyx.torproject.org/#download
links to
http://brewformulas.org/Nyx
for Mac OS X.
This domain causes a DNS error.
Namely:
It already has --log
as logged_events
.
Steps I used to get it working on Debian
CookieAuthFileGroupReadable 1
to /etc/tor/torrc
After I logged back in and tor was successfully restarted I was able to use Nyx without sudo
Different OS with the same issue #37
https://nyx.torproject.org/#configuration says graph_bound
is default max_local
and options are global_max
, local_max
, tight
So… which is it, max_local or local_max? And to double check: max_global or global_max?
PR #27
Is it possible, that nyx shows me A LOT of connections that are + 2.1d old? All 2.1d. Why do I have so many inbound connections?
Tor uses ~8% cpu and ~500MB RAM.
I only have an average of 190KB/s! My relay has the Fast flag.
~/.nyx/config:
unicode_support true
acs_support true
Nyx log:
12:32:48 [NYX_NOTICE] Unused configuration entry: unicode_support
12:32:48 [NYX_NOTICE] Unused configuration entry: acs_support
When run nyx
on macOS CLI, I was able to view the first 2 reports (connection details, node circuit infos, configs), then nyx
crashes with error abort trap: 6
. is this a sign of TOR attacks? Also there was no connection details. I know there was explanations but this is fyi. TKS!
Also I just noticed that on the first report, it read 'Relaying disabled', is this normal in your opinion?
Hi! Looking at the documentation there seems to be no mention of the dependency python3-distutils when installing nyx on Ubuntu 18.04 OS.
When installing on 18.04 one encounters an error which may look like this:
File "/usr/bin/nyx", line 11, in load_entry_point('nyx==2.0.4', 'console_scripts', 'nyx')() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 480, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2693, in load_entry_point return ep.load() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2324, in load return self.resolve() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2330, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/usr/lib/python3/dist-packages/nyx/init.py", line 46, in import distutils.spawn ModuleNotFoundError: No module named 'distutils.spawn'
It would be helpful to add a small note regarding dependency on either the Github repo or at nyx.torproject.org.
I suggest a short note like this under the FAQ section at nyx.torproject.org, and specifically under the question "Does Nyx have any dependencies?":
Ubuntu 18.04 dependency:
python3-distutils
Hello everybody,
I have a questing using nyx to monitor my tor service;
/usr/lib/systemd/system/tor.service
This service is run with sudo, when I attempt to run nyx, I get error.
❯ nyx
Unable to connect to tor. Maybe it's running without a ControlPort?
Editing /etc/tor/torrc, by adding
ControlPort 9051
CookieAuthentication 1
Then restart tor service with sudo systemctl restart tor and attempt to start nyx.
New error:
❯ nyx
We were unable to read tor's authentication cookie...
Path: /var/run/tor/control/var/run/tor/control.authcookie
Issue: Authentication failed: '/var/run/tor/control/var/run/tor/control.authcookie' doesn't exist
The paths above seem to be concatenated, but they do exist.
❯ ls /var/run/tor
control= control.authcookie socks= tor.pid
Running sudo nyx works but, but expect this is not a good idea:
nyx - PC_NAME (Linux 5.xx.x-x-default) Tor 0.4.4.6 (recommended)
Relaying Disabled, Control Socket: /var/run/tor/control GroupWritable RelaxDirModeCheck
cpu: 4.4% tor, 1.7% nyx mem: 38 MB (0.2%) pid: 1578 uptime: 1-06:56:35
page 1 / 5 - m: menu, p: pause, h: page help, q: quit
Bandwidth (limit: 1 GB/s, burst: 1 GB/s):
Download (1.9 MB/sec - avg: 60.7 KB/sec): Upload (61.4 KB/sec - avg: 2.2 KB/sec):
2 MB 76 KB
2 MB 50 KB
808 KB 25 KB
0 B 0 B
5s 10 15 20 25 30 35 5s 10 15 20 25 30 35
Events (TOR/NYX NOTICE-ERR):
│ 18:16:56 [NYX_NOTICE] Nyx is currently running with root permissions. This isn't a good idea, nor
│ should it be necessary.
│ 18:16:56 [NYX_NOTICE] No nyx configuration loaded, using defaults. You can customize nyx by placing
│ a configuration file at /root/.nyx/config (see https://nyx.torproject.org/nyxrc.sample for its
│ options).
│ 18:16:56 [NOTICE] New control connection opened. [2 duplicates hidden]
│ 17:23:38 [NOTICE] Average packaged cell fullness: 23.064%. TLS write overhead: 4% [2 duplicates
│ hidden]
│ 17:23:38 [NOTICE] 162405 (microdescriptor fetch)
│ 17:23:38 [NOTICE] 1125220 (consensus network-status fetch)
─┘ 17:23:38 [NOTICE] While not bootstrapping, fetched this many bytes: [2 duplicates hidden]
Whether it'd be in the interest of the dev team, end-users, both, or neither, I've managed to get Nyx to run on Windows, thus filling a potential user demographic considering how https://nyx.torproject.org/#download states the upstream project doesn't support Windows.
The details, patch-files, and installation notes are at https://github.com/DandelionSprout/NyxForWindows, and takes the form of 2 files to overwrite a couple files from the Python pip version with, and is not a full fork or redistribution of the entire program.
I've done my utmost to ensure compliance with GPL-3.0, as verbose as that licence is.
Migrated from ticket 5186.
Nyx should show the targets of individual streams. For example, currently nyx might show a new stream like this (spaces removed):
127.0.0.1:42051 --> 127.0.0.1:9050 UNKNOWN 0.0s (SOCKS)
Of course the destination is 127.0.0.1:9050
. That's just our socksport, and it provides no new information to the nyx user. The destination should be shown as the target of the stream.
Once the stream is attached to a circuit, this binding should be shown explicitly. Note that this is not entirely trivial to do: for example, sometimes streams are reattached to different circuits (e.g. if a particular circuit does not work).
It might also be useful to indicate the status of a particular stream, e.g. "SENTRESOLVE", "SUCCEEDED", etc.
Is there perhaps any way to view one’s consensus weight (preferably both the raw value and the fraction)?
The "avg/total" stats above the graph get cut off as your terminal narrows -- empirically, for me at least, they start getting chopped when the terminal is narrower than ~ 120 characters. At the resolution I normally run, good old 80 characters wide, they're not visible at all.
The old code (arm) would display these stats below the graph when it couldn't display them above. At Damian's request, I am filing a bug to politely request something like the old behavior -- or, of course, any alternative where the stats are shown for narrower terminals like mine. Thank you!
Migrated from ticket 18694.
Nyx can probably run in Cygwin, but native Windows support requires...
Maybe some other gotchas too. Windows is adding a *nyx commandline which might be interesting to keep an eye on.
Migrated from ticket 30465.
Running system:
FreeBSD hostname 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64
Packages:
tor-0.3.5.8
nyx-2.1.0
py36-stem-1.7.1
When I run Nyx and press the "m" key for the menu, I get the following error:
Traceback (most recent call last):
File "/usr/local/bin/nyx", line 11, in <module>
load_entry_point('nyx==2.1.0', 'console_scripts', 'nyx')()
File "/usr/local/lib/python3.6/site-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/local/lib/python3.6/site-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/usr/local/lib/python3.6/site-packages/nyx/starter.py", line 128, in main
nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 219, in start
curses.wrapper(_wrapper)
File "/usr/local/lib/python3.6/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 217, in _wrapper
function()
File "/usr/local/lib/python3.6/site-packages/nyx/__init__.py", line 221, in draw_loop
nyx.menu.show_menu()
File "/usr/local/lib/python3.6/site-packages/nyx/menu.py", line 210, in show_menu
selection_x = _draw_top_menubar(menu, cursor.selection)
File "/usr/local/lib/python3.6/site-packages/nyx/menu.py", line 296, in _draw_top_menubar
nyx.curses.draw(_render, height = 1, background = RED)
File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 758, in draw
curses_subwindow.bkgd(' ', curses_attr(background, HIGHLIGHT))
File "/usr/local/lib/python3.6/site-packages/nyx/curses.py", line 440, in curses_attr
encoded |= _color_attr()[override if override else attr]
KeyError: 'none'
This backtrace was reported in Fedora 33 with these package versions:
nyx-2.1.0-6.fc33
python-stem-1.8.0-8.fc33
python3-3.9.0-1.fc33.x86_64
socket.py:243:_send:stem.SocketClosed
Traceback (most recent call last):
File "/usr/bin/nyx", line 33, in <module>
sys.exit(load_entry_point('nyx==2.1.0', 'console_scripts', 'nyx')())
File "/usr/lib/python3.9/site-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/lib/python3.9/site-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/usr/lib/python3.9/site-packages/nyx/starter.py", line 128, in main
nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
File "/usr/lib/python3.9/site-packages/nyx/curses.py", line 219, in start
curses.wrapper(_wrapper)
File "/usr/lib64/python3.9/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/python3.9/site-packages/nyx/curses.py", line 217, in _wrapper
function()
File "/usr/lib/python3.9/site-packages/nyx/__init__.py", line 221, in draw_loop
nyx.menu.show_menu()
File "/usr/lib/python3.9/site-packages/nyx/menu.py", line 212, in show_menu
cursor.handle_key(nyx.curses.key_input())
File "/usr/lib/python3.9/site-packages/nyx/menu.py", line 171, in handle_key
self.selection.select()
File "/usr/lib/python3.9/site-packages/nyx/menu.py", line 70, in select
self._callback()
File "/usr/lib/python3.9/site-packages/stem/control.py", line 3823, in signal
response = self.msg('SIGNAL %s' % signal)
File "/usr/lib/python3.9/site-packages/stem/control.py", line 662, in msg
self._socket.send(message)
File "/usr/lib/python3.9/site-packages/stem/socket.py", line 460, in send
self._send(message, lambda s, sf, msg: send_message(sf, msg))
File "/usr/lib/python3.9/site-packages/stem/socket.py", line 243, in _send
raise stem.SocketClosed()
stem.SocketClosed
Local variables in innermost frame:
self: <stem.socket.ControlPort object at 0x7ff44fcc0eb0>
message: 'SIGNAL RELOAD'
handler: <function ControlSocket.send.<locals>.<lambda> at 0x7ff44fc8cb80>
I run Tor Browser Alpha, and set it to use Snowflake. Then I run "nyx -i 9151". It shows me some circuits that start at the Snowflake bridge, but it also shows me some direct connections to random relays.
Woah! Is Tor broken? Is it connecting to these other relays as Directory Guards, and using my snowflake bridge for the 3-hop circuits? What's going on?
Then I close ricochet, which is not using Tor Browser's socksport or its controlport, and the other outbound connections on my nyx dashboard go away.
Tor can know what are my outbound connections, by "getinfo orconn-status". This is a case where using netstat picks up extraneous connections, and alarms me by telling me my Tor is using them when it isn't.
Related to issue #9 here, but it is on the client side, and it looks like a security issue until you figure out what's going on, so I'm going to file it as its own ticket and let atagar figure out how he wants to move forward.
Thanks!
> user@hostname:~$ sudo -u debian-tor nyx
Python's sqlite3 module is unavailable. Unfortunately some platforms
don't bundle this with the interpreter. Please let us know at...
https://trac.torproject.org/projects/tor/wiki/doc/nyx/bugs
I think this error happened because of heavy load on the host so probably not a problem with nyx.
But maybe the link should get removed or updated to the appropriate location because https://trac.torproject.org/projects/tor/wiki/doc/nyx/bugs leads to an empty page.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.