commit c7a2ed2bcbf34c967832fd9c4b9b9eafcb3d675c Author: Damian Johnson atagar@torproject.org Date: Tue Jul 12 09:58:38 2011 -0700
Adding option to drop connection ip addresses
Providing an option to scrub the ip addresses of tor relays from the connection panel, requested by ioerror. --- armrc.sample | 4 ++++ src/cli/connections/connEntry.py | 3 +++ src/cli/connections/connPanel.py | 8 +++++++- 3 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/armrc.sample b/armrc.sample index c893bf9..23092d7 100644 --- a/armrc.sample +++ b/armrc.sample @@ -211,6 +211,9 @@ features.graph.bw.accounting.isTimeLong false # if true, the uptime of the initial connections when we start are marked # with a '+' (these uptimes are estimates since arm can only track a # connection's duration while it runs) +# showIps +# shows ip addresses for other tor relays, dropping this information if +# false # showExitPort # shows port related information of exit connections we relay if true # showColumn.* @@ -221,6 +224,7 @@ features.connection.order 0, 2, 1 features.connection.refreshRate 5 features.connection.resolveApps true features.connection.markInitialConnections true +features.connection.showIps true features.connection.showExitPort true features.connection.showColumn.fingerprint true features.connection.showColumn.nickname true diff --git a/src/cli/connections/connEntry.py b/src/cli/connections/connEntry.py index 05e2a45..5feafdb 100644 --- a/src/cli/connections/connEntry.py +++ b/src/cli/connections/connEntry.py @@ -34,6 +34,7 @@ LABEL_MIN_PADDING = 2 # min space between listing label and following data SCRUBBED_IP_VAL = 255 ** 4
CONFIG = {"features.connection.markInitialConnections": True, + "features.connection.showIps": True, "features.connection.showExitPort": True, "features.connection.showColumn.fingerprint": True, "features.connection.showColumn.nickname": True, @@ -344,6 +345,8 @@ class ConnectionLine(entries.ConnectionPanelLine): connection or exit traffic. """
+ if not CONFIG["features.connection.showIps"]: return True + # This is used to scrub private information from the interface. Relaying # etiquette (and wiretapping laws) say these are bad things to look at so # DON'T CHANGE THIS UNLESS YOU HAVE A DAMN GOOD REASON! diff --git a/src/cli/connections/connPanel.py b/src/cli/connections/connPanel.py index 161d6f6..ae50674 100644 --- a/src/cli/connections/connPanel.py +++ b/src/cli/connections/connPanel.py @@ -14,7 +14,8 @@ from util import connections, enum, panel, torTools, uiTools
DEFAULT_CONFIG = {"features.connection.resolveApps": True, "features.connection.listingType": 0, - "features.connection.refreshRate": 5} + "features.connection.refreshRate": 5, + "features.connection.showIps": True}
# height of the detail panel content, not counting top and bottom border DETAILS_HEIGHT = 7 @@ -43,6 +44,11 @@ class ConnectionPanel(panel.Panel, threading.Thread): "features.connection.listingType": (0, len(Listing.values()) - 1), "features.connection.refreshRate": 1})
+ # defaults our listing selection to fingerprints if ip address + # displaying is disabled + if not self._config["features.connection.showIps"] and self._config["features.connection.listingType"] == 0: + self._config["features.connection.listingType"] = 2 + sortFields = entries.SortAttr.values() customOrdering = config.getIntCSV("features.connection.order", None, 3, 0, len(sortFields))
tor-commits@lists.torproject.org