tor-commits
Threads by month
- ----- 2025 -----
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
May 2011
- 15 participants
- 1011 discussions

09 May '11
commit 80e57af50fe06ac76733ee99644c5efe797b2b8c
Author: Sebastian Hahn <sebastian(a)torproject.org>
Date: Tue Apr 26 03:01:25 2011 +0200
Appease clang - and my tortured mind
This possible div by 0 warning from clang's analyzer was quite fun to
track down. Turns out the current behaviour is safe.
---
src/or/circuitbuild.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 0e033a5..2189e0e 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -559,7 +559,9 @@ circuit_build_times_create_histogram(circuit_build_times_t *cbt,
* Return the Pareto start-of-curve parameter Xm.
*
* Because we are not a true Pareto curve, we compute this as the
- * weighted average of the N=3 most frequent build time bins.
+ * weighted average of the N most frequent build time bins. N is either
+ * 1 if we don't have enough circuit build time data collected, or
+ * determined by the consensus parameter cbtnummodes (default 3).
*/
static build_time_t
circuit_build_times_get_xm(circuit_build_times_t *cbt)
@@ -572,6 +574,9 @@ circuit_build_times_get_xm(circuit_build_times_t *cbt)
int n=0;
int num_modes = circuit_build_times_default_num_xm_modes();
+ tor_assert(nbins > 0);
+ tor_assert(num_modes > 0);
+
// Only use one mode if < 1000 buildtimes. Not enough data
// for multiple.
if (cbt->total_build_times < CBT_NCIRCUITS_TO_OBSERVE)
@@ -579,6 +584,7 @@ circuit_build_times_get_xm(circuit_build_times_t *cbt)
nth_max_bin = (build_time_t*)tor_malloc_zero(num_modes*sizeof(build_time_t));
+ /* Determine the N most common build times */
for (i = 0; i < nbins; i++) {
if (histogram[i] >= histogram[nth_max_bin[0]]) {
nth_max_bin[0] = i;
@@ -600,6 +606,10 @@ circuit_build_times_get_xm(circuit_build_times_t *cbt)
histogram[nth_max_bin[n]]);
}
+ /* The following assert is safe, because we don't get called when we
+ * haven't observed at least CBT_MIN_MIN_CIRCUITS_TO_OBSERVE circuits. */
+ tor_assert(bin_counts > 0);
+
ret /= bin_counts;
tor_free(histogram);
tor_free(nth_max_bin);
1
0
commit 532c13693e97565fe50a8a788d669d3ec94ad822
Author: Sebastian Hahn <sebastian(a)torproject.org>
Date: Tue Apr 26 02:16:24 2011 +0200
Fix a docstring
---
src/or/control.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/or/control.c b/src/or/control.c
index 9f7739a..28780d2 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -3875,7 +3875,7 @@ static int bootstrap_problems = 0;
* information and initial circuits.
*
* <b>status</b> is the new status, that is, what task we will be doing
- * next. <b>percent</b> is zero if we just started this task, else it
+ * next. <b>progress</b> is zero if we just started this task, else it
* represents progress on the task. */
void
control_event_bootstrap(bootstrap_status_t status, int progress)
1
0

09 May '11
commit a2c89f6f8261a892cc02aee5325fc0ffff7671d9
Author: Damian Johnson <atagar(a)torproject.org>
Date: Mon May 9 09:56:27 2011 -0700
Moving menus fromt he controller to panels
Moving all of the option menus from a huge if/else block in the controller to
the panels they're being used for. This included a couple minor changes to the
panel api to better accommodate them.
---
src/cli/configPanel.py | 15 ++-
src/cli/connections/connPanel.py | 39 ++++++-
src/cli/controller.py | 242 ++------------------------------------
src/cli/graphing/graphPanel.py | 36 ++++++-
src/cli/logPanel.py | 59 +++++++++-
src/cli/popups.py | 97 +++++++++++++++-
src/cli/torrcPanel.py | 6 +-
src/util/panel.py | 27 ++++
8 files changed, 272 insertions(+), 249 deletions(-)
diff --git a/src/cli/configPanel.py b/src/cli/configPanel.py
index 6aaafc2..31a78ab 100644
--- a/src/cli/configPanel.py
+++ b/src/cli/configPanel.py
@@ -247,6 +247,7 @@ class ConfigPanel(panel.Panel):
def handleKey(self, key):
self.valsLock.acquire()
+ isKeystrokeConsumed = True
if uiTools.isScrollKey(key):
pageHeight = self.getPreferredSize()[0] - 1
detailPanelHeight = self._config["features.config.selectionDetails.height"]
@@ -270,8 +271,10 @@ class ConfigPanel(panel.Panel):
# converts labels back to enums
resultEnums = [getFieldFromLabel(label) for label in results]
self.setSortOrder(resultEnums)
+ else: isKeystrokeConsumed = False
self.valsLock.release()
+ return isKeystrokeConsumed
def getHelp(self):
options = []
@@ -288,10 +291,6 @@ class ConfigPanel(panel.Panel):
def draw(self, width, height):
self.valsLock.acquire()
- # draws the top label
- configType = "Tor" if self.configType == State.TOR else "Arm"
- hiddenMsg = "press 'a' to hide most options" if self.showAll else "press 'a' to show all options"
-
# panel with details for the current selection
detailPanelHeight = self._config["features.config.selectionDetails.height"]
isScrollbarVisible = False
@@ -311,8 +310,12 @@ class ConfigPanel(panel.Panel):
self._drawSelectionPanel(cursorSelection, width, detailPanelHeight, isScrollbarVisible)
- titleLabel = "%s Configuration (%s):" % (configType, hiddenMsg)
- self.addstr(0, 0, titleLabel, curses.A_STANDOUT)
+ # draws the top label
+ if self.isTitleVisible():
+ configType = "Tor" if self.configType == State.TOR else "Arm"
+ hiddenMsg = "press 'a' to hide most options" if self.showAll else "press 'a' to show all options"
+ titleLabel = "%s Configuration (%s):" % (configType, hiddenMsg)
+ self.addstr(0, 0, titleLabel, curses.A_STANDOUT)
# draws left-hand scroll bar if content's longer than the height
scrollOffset = 1
diff --git a/src/cli/connections/connPanel.py b/src/cli/connections/connPanel.py
index 8ad41d5..4d89d5c 100644
--- a/src/cli/connections/connPanel.py
+++ b/src/cli/connections/connPanel.py
@@ -131,6 +131,8 @@ class ConnectionPanel(panel.Panel, threading.Thread):
listingType - Listing instance for the primary information to be shown
"""
+ if self._listingType == listingType: return
+
self.valsLock.acquire()
self._listingType = listingType
@@ -143,6 +145,7 @@ class ConnectionPanel(panel.Panel, threading.Thread):
def handleKey(self, key):
self.valsLock.acquire()
+ isKeystrokeConsumed = True
if uiTools.isScrollKey(key):
pageHeight = self.getPreferredSize()[0] - 1
if self._showDetails: pageHeight -= (DETAILS_HEIGHT + 1)
@@ -159,8 +162,39 @@ class ConnectionPanel(panel.Panel, threading.Thread):
optionColors = dict([(attr, entries.SORT_COLORS[attr]) for attr in options])
results = cli.popups.showSortDialog(titleLabel, options, oldSelection, optionColors)
if results: self.setSortOrder(results)
+ elif key == ord('u') or key == ord('U'):
+ # provides a menu to pick the connection resolver
+ title = "Resolver Util:"
+ options = ["auto"] + connections.Resolver.values()
+ connResolver = connections.getResolver("tor")
+
+ currentOverwrite = connResolver.overwriteResolver
+ if currentOverwrite == None: oldSelection = 0
+ else: oldSelection = options.index(currentOverwrite)
+
+ selection = cli.popups.showMenu(title, options, oldSelection)
+
+ # applies new setting
+ if selection != -1:
+ selectedOption = options[selection] if selection != 0 else None
+ connResolver.overwriteResolver = selectedOption
+ elif key == ord('l') or key == ord('L'):
+ # provides a menu to pick the primary information we list connections by
+ title = "List By:"
+ options = entries.ListingType.values()
+
+ # dropping the HOSTNAME listing type until we support displaying that content
+ options.remove(cli.connections.entries.ListingType.HOSTNAME)
+
+ oldSelection = options.index(self._listingType)
+ selection = cli.popups.showMenu(title, options, oldSelection)
+
+ # applies new setting
+ if selection != -1: self.setListingType(options[selection])
+ else: isKeystrokeConsumed = False
self.valsLock.release()
+ return isKeystrokeConsumed
def run(self):
"""
@@ -233,8 +267,9 @@ class ConnectionPanel(panel.Panel, threading.Thread):
drawEntries[i].render(self, 1 + i, 2)
# title label with connection counts
- title = "Connection Details:" if self._showDetails else self._title
- self.addstr(0, 0, title, curses.A_STANDOUT)
+ if self.isTitleVisible():
+ title = "Connection Details:" if self._showDetails else self._title
+ self.addstr(0, 0, title, curses.A_STANDOUT)
scrollOffset = 1
if isScrollbarVisible:
diff --git a/src/cli/controller.py b/src/cli/controller.py
index a195c15..6f4b70d 100644
--- a/src/cli/controller.py
+++ b/src/cli/controller.py
@@ -42,6 +42,7 @@ def refresh():
# new panel params and accessors (this is part of the new controller apis)
PANELS = {}
STDSCR = None
+IS_PAUSED = False
def getScreen():
return STDSCR
@@ -83,7 +84,6 @@ def getPanels(page = None):
CONFIRM_QUIT = True
REFRESH_RATE = 5 # seconds between redrawing screen
-MAX_REGEX_FILTERS = 5 # maximum number of previous regex filters that'll be remembered
# enums for message in control label
CTL_HELP, CTL_PAUSED = range(2)
@@ -129,6 +129,9 @@ class ControlPanel(panel.Panel):
self.msgText = msgText
self.msgAttr = msgAttr
+ def revertMsg(self):
+ self.setMsg(CTL_PAUSED if IS_PAUSED else CTL_HELP)
+
def draw(self, width, height):
msgText = self.msgText
msgAttr = self.msgAttr
@@ -275,57 +278,6 @@ def setPauseState(panels, monitorIsPaused, currentPage, overwrite=False):
for key in allPanels: panels[key].setPaused(overwrite or monitorIsPaused or (key not in PAGES[currentPage] and key not in PAGE_S))
-def showMenu(stdscr, popup, title, options, initialSelection):
- """
- Provides menu with options laid out in a single column. User can cancel
- selection with the escape key, in which case this proives -1. Otherwise this
- returns the index of the selection. If initialSelection is -1 then the first
- option is used and the carrot indicating past selection is ommitted.
- """
-
- selection = initialSelection if initialSelection != -1 else 0
-
- if popup.win:
- if not panel.CURSES_LOCK.acquire(False): return -1
- try:
- # TODO: should pause interface (to avoid event accumilation)
- curses.cbreak() # wait indefinitely for key presses (no timeout)
-
- # uses smaller dimentions more fitting for small content
- popup.height = len(options) + 2
-
- newWidth = max([len(label) for label in options]) + 9
- popup.recreate(stdscr, newWidth)
-
- key = 0
- while not uiTools.isSelectionKey(key):
- popup.clear()
- popup.win.box()
- popup.addstr(0, 0, title, curses.A_STANDOUT)
-
- for i in range(len(options)):
- label = options[i]
- format = curses.A_STANDOUT if i == selection else curses.A_NORMAL
- tab = "> " if i == initialSelection else " "
- popup.addstr(i + 1, 2, tab)
- popup.addstr(i + 1, 4, " %s " % label, format)
-
- popup.refresh()
- key = stdscr.getch()
- if key == curses.KEY_UP: selection = max(0, selection - 1)
- elif key == curses.KEY_DOWN: selection = min(len(options) - 1, selection + 1)
- elif key == 27: selection, key = -1, curses.KEY_ENTER # esc - cancel
-
- # reverts popup dimensions and conn panel label
- popup.height = 9
- popup.recreate(stdscr, 80)
-
- curses.halfdelay(REFRESH_RATE * 10) # reset normal pausing behavior
- finally:
- panel.CURSES_LOCK.release()
-
- return selection
-
def setEventListening(selectedEvents, isBlindMode):
# creates a local copy, note that a suspected python bug causes *very*
# puzzling results otherwise when trying to discard entries (silently
@@ -381,7 +333,7 @@ def drawTorMonitor(stdscr, startTime, loggedEvents, isBlindMode):
otherwise unrecognized events)
"""
- global PANELS, STDSCR, REFRESH_FLAG, PAGE
+ global PANELS, STDSCR, REFRESH_FLAG, PAGE, IS_PAUSED
STDSCR = stdscr
# loads config for various interface components
@@ -592,7 +544,6 @@ def drawTorMonitor(stdscr, startTime, loggedEvents, isBlindMode):
isPaused = False # if true updates are frozen
overrideKey = None # immediately runs with this input rather than waiting for the user if set
page = 0
- regexFilters = [] # previously used log regex filters
panels["popup"].redraw(True) # hack to make sure popup has a window instance (not entirely sure why...)
PAGE = page
@@ -846,6 +797,7 @@ def drawTorMonitor(stdscr, startTime, loggedEvents, isBlindMode):
panel.CURSES_LOCK.acquire()
try:
isPaused = not isPaused
+ IS_PAUSED = isPaused
setPauseState(panels, isPaused, page)
panels["control"].setMsg(CTL_PAUSED if isPaused else CTL_HELP)
finally:
@@ -883,69 +835,6 @@ def drawTorMonitor(stdscr, startTime, loggedEvents, isBlindMode):
panel.CURSES_LOCK.release()
elif key == ord('h') or key == ord('H'):
overrideKey = popups.showHelpPopup()
- elif page == 0 and (key == ord('s') or key == ord('S')):
- # provides menu to pick stats to be graphed
- #options = ["None"] + [label for label in panels["graph"].stats.keys()]
- options = ["None"]
-
- # appends stats labels with first letters of each word capitalized
- initialSelection, i = -1, 1
- if not panels["graph"].currentDisplay: initialSelection = 0
- graphLabels = panels["graph"].stats.keys()
- graphLabels.sort()
- for label in graphLabels:
- if label == panels["graph"].currentDisplay: initialSelection = i
- words = label.split()
- options.append(" ".join(word[0].upper() + word[1:] for word in words))
- i += 1
-
- # hides top label of the graph panel and pauses panels
- if panels["graph"].currentDisplay:
- panels["graph"].showLabel = False
- panels["graph"].redraw(True)
- setPauseState(panels, isPaused, page, True)
-
- selection = showMenu(stdscr, panels["popup"], "Graphed Stats:", options, initialSelection)
-
- # reverts changes made for popup
- panels["graph"].showLabel = True
- setPauseState(panels, isPaused, page)
-
- # applies new setting
- if selection != -1 and selection != initialSelection:
- if selection == 0: panels["graph"].setStats(None)
- else: panels["graph"].setStats(options[selection].lower())
-
- selectiveRefresh(panels, page)
-
- # TODO: this shouldn't be necessary with the above refresh, but doesn't seem responsive otherwise...
- panels["graph"].redraw(True)
- elif page == 0 and (key == ord('i') or key == ord('I')):
- # provides menu to pick graph panel update interval
- options = [label for (label, intervalTime) in graphing.graphPanel.UPDATE_INTERVALS]
-
- initialSelection = panels["graph"].updateInterval
-
- #initialSelection = -1
- #for i in range(len(options)):
- # if options[i] == panels["graph"].updateInterval: initialSelection = i
-
- # hides top label of the graph panel and pauses panels
- if panels["graph"].currentDisplay:
- panels["graph"].showLabel = False
- panels["graph"].redraw(True)
- setPauseState(panels, isPaused, page, True)
-
- selection = showMenu(stdscr, panels["popup"], "Update Interval:", options, initialSelection)
-
- # reverts changes made for popup
- panels["graph"].showLabel = True
- setPauseState(panels, isPaused, page)
-
- # applies new setting
- if selection != -1: panels["graph"].updateInterval = selection
-
- selectiveRefresh(panels, page)
elif page == 0 and (key == ord('b') or key == ord('B')):
# uses the next boundary type for graph
panels["graph"].bounds = graphing.graphPanel.Bounds.next(panels["graph"].bounds)
@@ -1031,64 +920,6 @@ def drawTorMonitor(stdscr, startTime, loggedEvents, isBlindMode):
panel.CURSES_LOCK.release()
panels["graph"].redraw(True)
- elif page == 0 and (key == ord('f') or key == ord('F')):
- # provides menu to pick previous regular expression filters or to add a new one
- # for syntax see: http://docs.python.org/library/re.html#regular-expression-syntax
- options = ["None"] + regexFilters + ["New..."]
- initialSelection = 0 if not panels["log"].regexFilter else 1
-
- # hides top label of the graph panel and pauses panels
- if panels["graph"].currentDisplay:
- panels["graph"].showLabel = False
- panels["graph"].redraw(True)
- setPauseState(panels, isPaused, page, True)
-
- selection = showMenu(stdscr, panels["popup"], "Log Filter:", options, initialSelection)
-
- # applies new setting
- if selection == 0:
- panels["log"].setFilter(None)
- elif selection == len(options) - 1:
- # selected 'New...' option - prompt user to input regular expression
- panel.CURSES_LOCK.acquire()
- try:
- # provides prompt
- panels["control"].setMsg("Regular expression: ")
- panels["control"].redraw(True)
-
- # gets user input (this blocks monitor updates)
- regexInput = panels["control"].getstr(0, 20)
-
- if regexInput:
- try:
- panels["log"].setFilter(re.compile(regexInput))
- if regexInput in regexFilters: regexFilters.remove(regexInput)
- regexFilters = [regexInput] + regexFilters
- except re.error, exc:
- panels["control"].setMsg("Unable to compile expression: %s" % str(exc), curses.A_STANDOUT)
- panels["control"].redraw(True)
- time.sleep(2)
- panels["control"].setMsg(CTL_PAUSED if isPaused else CTL_HELP)
- finally:
- panel.CURSES_LOCK.release()
- elif selection != -1:
- try:
- panels["log"].setFilter(re.compile(regexFilters[selection - 1]))
-
- # move selection to top
- regexFilters = [regexFilters[selection - 1]] + regexFilters
- del regexFilters[selection]
- except re.error, exc:
- # shouldn't happen since we've already checked validity
- log.log(log.WARN, "Invalid regular expression ('%s': %s) - removing from listing" % (regexFilters[selection - 1], str(exc)))
- del regexFilters[selection - 1]
-
- if len(regexFilters) > MAX_REGEX_FILTERS: del regexFilters[MAX_REGEX_FILTERS:]
-
- # reverts changes made for popup
- panels["graph"].showLabel = True
- setPauseState(panels, isPaused, page)
- panels["graph"].redraw(True)
elif page == 0 and key in (ord('n'), ord('N'), ord('m'), ord('M')):
# Unfortunately modifier keys don't work with the up/down arrows (sending
# multiple keycodes. The only exception to this is shift + left/right,
@@ -1124,30 +955,6 @@ def drawTorMonitor(stdscr, startTime, loggedEvents, isBlindMode):
setPauseState(panels, isPaused, page)
finally:
panel.CURSES_LOCK.release()
- elif page == 1 and (key == ord('u') or key == ord('U')):
- # provides menu to pick identification resolving utility
- options = ["auto"] + connections.Resolver.values()
-
- currentOverwrite = connections.getResolver("tor").overwriteResolver # enums correspond to indices
- if currentOverwrite == None: initialSelection = 0
- else: initialSelection = options.index(currentOverwrite)
-
- # hides top label of conn panel and pauses panels
- panelTitle = panels["conn"]._title
- panels["conn"]._title = ""
- panels["conn"].redraw(True)
- setPauseState(panels, isPaused, page, True)
-
- selection = showMenu(stdscr, panels["popup"], "Resolver Util:", options, initialSelection)
- selectedOption = options[selection] if selection != 0 else None
-
- # reverts changes made for popup
- panels["conn"]._title = panelTitle
- setPauseState(panels, isPaused, page)
-
- # applies new setting
- if selection != -1 and selectedOption != connections.getResolver("tor").overwriteResolver:
- connections.getResolver("tor").overwriteResolver = selectedOption
elif page == 1 and key in (ord('d'), ord('D')):
# presents popup for raw consensus data
panel.CURSES_LOCK.acquire()
@@ -1165,31 +972,6 @@ def drawTorMonitor(stdscr, startTime, loggedEvents, isBlindMode):
curses.halfdelay(REFRESH_RATE * 10) # reset normal pausing behavior
finally:
panel.CURSES_LOCK.release()
- elif page == 1 and (key == ord('l') or key == ord('L')):
- # provides a menu to pick the primary information we list connections by
- options = cli.connections.entries.ListingType.values()
-
- # dropping the HOSTNAME listing type until we support displaying that content
- options.remove(cli.connections.entries.ListingType.HOSTNAME)
-
- initialSelection = options.index(panels["conn"]._listingType)
-
- # hides top label of connection panel and pauses the display
- panelTitle = panels["conn"]._title
- panels["conn"]._title = ""
- panels["conn"].redraw(True)
- setPauseState(panels, isPaused, page, True)
-
- selection = showMenu(stdscr, panels["popup"], "List By:", options, initialSelection)
-
- # reverts changes made for popup
- panels["conn"]._title = panelTitle
- setPauseState(panels, isPaused, page)
-
- # applies new setting
- if selection != -1 and options[selection] != panels["conn"]._listingType:
- panels["conn"].setListingType(options[selection])
- panels["conn"].redraw(True)
elif page == 2 and (key == ord('w') or key == ord('W')):
# display a popup for saving the current configuration
panel.CURSES_LOCK.acquire()
@@ -1400,14 +1182,10 @@ def drawTorMonitor(stdscr, startTime, loggedEvents, isBlindMode):
time.sleep(1)
panels["control"].setMsg(CTL_PAUSED if isPaused else CTL_HELP)
- elif page == 0:
- panels["log"].handleKey(key)
- elif page == 1:
- panels["conn"].handleKey(key)
- elif page == 2:
- panels["config"].handleKey(key)
- elif page == 3:
- panels["torrc"].handleKey(key)
+ else:
+ for pagePanel in getPanels(page + 1):
+ isKeystrokeConsumed = pagePanel.handleKey(key)
+ if isKeystrokeConsumed: break
if REFRESH_FLAG:
REFRESH_FLAG = False
diff --git a/src/cli/graphing/graphPanel.py b/src/cli/graphing/graphPanel.py
index d8808b3..0c52f6f 100644
--- a/src/cli/graphing/graphPanel.py
+++ b/src/cli/graphing/graphPanel.py
@@ -20,6 +20,8 @@ import copy
import curses
from TorCtl import TorCtl
+import cli.popups
+
from util import enum, panel, uiTools
# time intervals at which graphs can be updated
@@ -229,7 +231,6 @@ class GraphPanel(panel.Panel):
self.graphHeight = CONFIG["features.graph.height"]
self.currentDisplay = None # label of the stats currently being displayed
self.stats = {} # available stats (mappings of label -> instance)
- self.showLabel = True # shows top label if true, hides otherwise
self.setPauseAttr("stats")
def getHeight(self):
@@ -253,6 +254,37 @@ class GraphPanel(panel.Panel):
self.graphHeight = max(MIN_GRAPH_HEIGHT, newGraphHeight)
+ def handleKey(self, key):
+ isKeystrokeConsumed = True
+ if key == ord('s') or key == ord('S'):
+ # provides a menu to pick the graphed stats
+ availableStats = self.stats.keys()
+ availableStats.sort()
+
+ # uses sorted, camel cased labels for the options
+ options = ["None"]
+ for label in availableStats:
+ words = label.split()
+ options.append(" ".join(word[0].upper() + word[1:] for word in words))
+
+ if self.currentDisplay:
+ initialSelection = availableStats.index(self.currentDisplay) + 1
+ else: initialSelection = 0
+
+ selection = cli.popups.showMenu("Graphed Stats:", options, initialSelection)
+
+ # applies new setting
+ if selection == 0: self.setStats(None)
+ elif selection != -1: self.setStats(options[selection].lower())
+ elif key == ord('i') or key == ord('I'):
+ # provides menu to pick graph panel update interval
+ options = [label for (label, _) in UPDATE_INTERVALS]
+ selection = cli.popups.showMenu("Update Interval:", options, self.updateInterval)
+ if selection != -1: self.updateInterval = selection
+ else: isKeystrokeConsumed = False
+
+ return isKeystrokeConsumed
+
def getHelp(self):
if self.currentDisplay: graphedStats = self.currentDisplay
else: graphedStats = "none"
@@ -275,7 +307,7 @@ class GraphPanel(panel.Panel):
primaryColor = uiTools.getColor(param.getColor(True))
secondaryColor = uiTools.getColor(param.getColor(False))
- if self.showLabel: self.addstr(0, 0, param.getTitle(width), curses.A_STANDOUT)
+ if self.isTitleVisible(): self.addstr(0, 0, param.getTitle(width), curses.A_STANDOUT)
# top labels
left, right = param.getHeaderLabel(width / 2, True), param.getHeaderLabel(width / 2, False)
diff --git a/src/cli/logPanel.py b/src/cli/logPanel.py
index b12715e..d34b640 100644
--- a/src/cli/logPanel.py
+++ b/src/cli/logPanel.py
@@ -4,13 +4,15 @@ for. This provides prepopulation from the log file and supports filtering by
regular expressions.
"""
-import time
+import re
import os
+import time
import curses
import threading
from TorCtl import TorCtl
+import popups
from version import VERSION
from util import conf, log, panel, sysTools, torTools, uiTools
@@ -75,6 +77,9 @@ CACHED_DUPLICATES_RESULT = None
# duration we'll wait for the deduplication function before giving up (in ms)
DEDUPLICATION_TIMEOUT = 100
+# maximum number of regex filters we'll remember
+MAX_REGEX_FILTERS = 5
+
def daysSince(timestamp=None):
"""
Provides the number of days since the epoch converted to local time (rounded
@@ -551,6 +556,7 @@ class LogPanel(panel.Panel, threading.Thread):
self.msgLog = [] # log entries, sorted by the timestamp
self.loggedEvents = loggedEvents # events we're listening to
self.regexFilter = None # filter for presented log events (no filtering if None)
+ self.filterOptions = [] # filters the user has input
self.lastContentHeight = 0 # height of the rendered content when last drawn
self.logFile = None # file log messages are saved to (skipped if None)
self.scroll = 0
@@ -746,6 +752,7 @@ class LogPanel(panel.Panel, threading.Thread):
raise exc
def handleKey(self, key):
+ isKeystrokeConsumed = True
if uiTools.isScrollKey(key):
pageHeight = self.getPreferredSize()[0] - 1
newScroll = uiTools.getScrollPosition(key, self.scroll, pageHeight, self.lastContentHeight)
@@ -760,6 +767,53 @@ class LogPanel(panel.Panel, threading.Thread):
self.showDuplicates = not self.showDuplicates
self.redraw(True)
self.valsLock.release()
+ elif key == ord('f') or key == ord('F'):
+ # Provides menu to pick regular expression filters or adding new ones:
+ # for syntax see: http://docs.python.org/library/re.html#regular-expression-syntax
+ options = ["None"] + self.filterOptions + ["New..."]
+ oldSelection = 0 if not self.regexFilter else 1
+
+ # does all activity under a curses lock to prevent redraws when adding
+ # new filters
+ panel.CURSES_LOCK.acquire()
+ try:
+ selection = popups.showMenu("Log Filter:", options, oldSelection)
+
+ # applies new setting
+ if selection == 0:
+ self.setFilter(None)
+ elif selection == len(options) - 1:
+ # selected 'New...' option - prompt user to input regular expression
+ regexInput = popups.inputPrompt("Regular expression: ")
+
+ if regexInput:
+ try:
+ self.setFilter(re.compile(regexInput))
+ if regexInput in self.filterOptions: self.filterOptions.remove(regexInput)
+ self.filterOptions.insert(0, regexInput)
+ except re.error, exc:
+ popups.showMsg("Unable to compile expression: %s" % exc, 2)
+ elif selection != -1:
+ selectedOption = self.filterOptions[selection - 1]
+
+ try:
+ self.setFilter(re.compile(selectedOption))
+
+ # move selection to top
+ self.filterOptions.remove(selectedOption)
+ self.filterOptions.insert(0, selectedOption)
+ except re.error, exc:
+ # shouldn't happen since we've already checked validity
+ msg = "Invalid regular expression ('%s': %s) - removing from listing" % (selectedOption, exc)
+ log.log(log.WARN, msg)
+ self.filterOptions.remove(selectedOption)
+ finally:
+ panel.CURSES_LOCK.release()
+
+ if len(self.filterOptions) > MAX_REGEX_FILTERS: del self.filterOptions[MAX_REGEX_FILTERS:]
+ else: isKeystrokeConsumed = False
+
+ return isKeystrokeConsumed
def getHelp(self):
options = []
@@ -784,7 +838,8 @@ class LogPanel(panel.Panel, threading.Thread):
self._lastLoggedEvents, self._lastUpdate = list(currentLog), time.time()
# draws the top label
- self.addstr(0, 0, self._getTitle(width), curses.A_STANDOUT)
+ if self.isTitleVisible():
+ self.addstr(0, 0, self._getTitle(width), curses.A_STANDOUT)
# restricts scroll location to valid bounds
self.scroll = max(0, min(self.scroll, self.lastContentHeight - height + 1))
diff --git a/src/cli/popups.py b/src/cli/popups.py
index d5cf76c..81b4589 100644
--- a/src/cli/popups.py
+++ b/src/cli/popups.py
@@ -44,6 +44,46 @@ def finalize():
controller.refresh()
panel.CURSES_LOCK.release()
+def inputPrompt(msg):
+ """
+ Prompts the user to enter a string on the control line (which usually
+ displays the page number and basic controls).
+
+ Arguments:
+ msg - message to prompt the user for input with
+ """
+
+ panel.CURSES_LOCK.acquire()
+ controlPanel = controller.getPanel("control")
+ controlPanel.setMsg(msg)
+ controlPanel.redraw(True)
+ userInput = controlPanel.getstr(0, len(msg))
+ controlPanel.revertMsg()
+ panel.CURSES_LOCK.release()
+ return userInput
+
+def showMsg(msg, maxWait, attr = curses.A_STANDOUT):
+ """
+ Displays a single line message on the control line for a set time. Pressing
+ any key will end the message.
+
+ Arguments:
+ msg - message to be displayed to the user
+ maxWait - time to show the message
+ attr - attributes with which to draw the message
+ """
+
+ panel.CURSES_LOCK.acquire()
+ controlPanel = controller.getPanel("control")
+ controlPanel.setMsg(msg, attr)
+ controlPanel.redraw(True)
+
+ curses.halfdelay(maxWait * 10)
+ controller.getScreen().getch()
+ controlPanel.revertMsg()
+ curses.halfdelay(controller.REFRESH_RATE * 10)
+ panel.CURSES_LOCK.release()
+
def showHelpPopup():
"""
Presents a popup with instructions for the current page's hotkeys. This
@@ -108,7 +148,7 @@ def showHelpPopup():
return exitKey
else: return None
-def showSortDialog(titleLabel, options, oldSelection, optionColors):
+def showSortDialog(title, options, oldSelection, optionColors):
"""
Displays a sorting dialog of the form:
@@ -122,7 +162,7 @@ def showSortDialog(titleLabel, options, oldSelection, optionColors):
then this returns None. Otherwise, the new ordering is provided.
Arguments:
- titleLabel - title displayed for the popup window
+ title - title displayed for the popup window
options - ordered listing of option labels
oldSelection - current ordering
optionColors - mappings of options to their color
@@ -142,7 +182,7 @@ def showSortDialog(titleLabel, options, oldSelection, optionColors):
while len(newSelections) < len(oldSelection):
popup.win.erase()
popup.win.box()
- popup.addstr(0, 0, titleLabel, curses.A_STANDOUT)
+ popup.addstr(0, 0, title, curses.A_STANDOUT)
_drawSortSelection(popup, 1, 2, "Current Order: ", oldSelection, optionColors)
_drawSortSelection(popup, 2, 2, "New Order: ", newSelections, optionColors)
@@ -214,3 +254,54 @@ def _drawSortSelection(popup, y, x, prefix, options, optionColors):
popup.addstr(y, x, ", ", curses.A_BOLD)
x += 2
+def showMenu(title, options, oldSelection):
+ """
+ Provides menu with options laid out in a single column. User can cancel
+ selection with the escape key, in which case this proives -1. Otherwise this
+ returns the index of the selection.
+
+ Arguments:
+ title - title displayed for the popup window
+ options - ordered listing of options to display
+ oldSelection - index of the initially selected option (uses the first
+ selection without a carrot if -1)
+ """
+
+ maxWidth = max([len(label) for label in options]) + 9
+ popup, width, height = init(len(options) + 2, maxWidth)
+ if not popup: return
+ key, selection = 0, oldSelection if oldSelection != -1 else 0
+
+ try:
+ # hides the title of the first panel on the page
+ topPanel = controller.getPanels(controller.getPage())[0]
+ topPanel.setTitleVisible(False)
+ topPanel.redraw(True)
+
+ curses.cbreak() # wait indefinitely for key presses (no timeout)
+
+ while not uiTools.isSelectionKey(key):
+ popup.win.erase()
+ popup.win.box()
+ popup.addstr(0, 0, title, curses.A_STANDOUT)
+
+ for i in range(len(options)):
+ label = options[i]
+ format = curses.A_STANDOUT if i == selection else curses.A_NORMAL
+ tab = "> " if i == oldSelection else " "
+ popup.addstr(i + 1, 2, tab)
+ popup.addstr(i + 1, 4, " %s " % label, format)
+
+ popup.win.refresh()
+
+ key = controller.getScreen().getch()
+ if key == curses.KEY_UP: selection = max(0, selection - 1)
+ elif key == curses.KEY_DOWN: selection = min(len(options) - 1, selection + 1)
+ elif key == 27: selection, key = -1, curses.KEY_ENTER # esc - cancel
+
+ topPanel.setTitleVisible(True)
+ curses.halfdelay(controller.REFRESH_RATE * 10) # reset normal pausing behavior
+ finally: finalize()
+
+ return selection
+
diff --git a/src/cli/torrcPanel.py b/src/cli/torrcPanel.py
index 6d7156d..5ca839f 100644
--- a/src/cli/torrcPanel.py
+++ b/src/cli/torrcPanel.py
@@ -31,7 +31,6 @@ class TorrcPanel(panel.Panel):
self.valsLock = threading.RLock()
self.configType = configType
self.scroll = 0
- self.showLabel = True # shows top label (hides otherwise)
self.showLineNum = True # shows left aligned line numbers
self.stripComments = False # drops comments and extra whitespace
@@ -42,6 +41,7 @@ class TorrcPanel(panel.Panel):
def handleKey(self, key):
self.valsLock.acquire()
+ isKeystrokeConsumed = True
if uiTools.isScrollKey(key):
pageHeight = self.getPreferredSize()[0] - 1
newScroll = uiTools.getScrollPosition(key, self.scroll, pageHeight, self._lastContentHeight)
@@ -57,8 +57,10 @@ class TorrcPanel(panel.Panel):
self.stripComments = not self.stripComments
self._lastContentHeightArgs = None
self.redraw(True)
+ else: isKeystrokeConsumed = False
self.valsLock.release()
+ return isKeystrokeConsumed
def getHelp(self):
options = []
@@ -120,7 +122,7 @@ class TorrcPanel(panel.Panel):
displayLine = -self.scroll + 1 # line we're drawing on
# draws the top label
- if self.showLabel:
+ if self.isTitleVisible():
sourceLabel = "Tor" if self.configType == Config.TORRC else "Arm"
locationLabel = " (%s)" % confLocation if confLocation else ""
self.addstr(0, 0, "%s Configuration File%s:" % (sourceLabel, locationLabel), curses.A_STANDOUT)
diff --git a/src/util/panel.py b/src/util/panel.py
index 7387833..06c8649 100644
--- a/src/util/panel.py
+++ b/src/util/panel.py
@@ -61,6 +61,7 @@ class Panel():
self.panelName = name
self.parent = parent
self.visible = False
+ self.titleVisible = True
# Attributes for pausing. The pauseAttr contains variables our getAttr
# method is tracking, and the pause buffer has copies of the values from
@@ -93,6 +94,21 @@ class Panel():
return self.panelName
+ def isTitleVisible(self):
+ """
+ True if the title is configured to be visible, False otherwise.
+ """
+
+ return self.titleVisible
+
+ def setTitleVisible(self, isVisible):
+ """
+ Configures the panel's title to be visible or not when it's next redrawn.
+ This is not guarenteed to be respected (not all panels have a title).
+ """
+
+ self.titleVisible = isVisible
+
def getParent(self):
"""
Provides the parent used to create subwindows.
@@ -290,6 +306,17 @@ class Panel():
if setWidth != -1: newWidth = min(newWidth, setWidth)
return (newHeight, newWidth)
+ def handleKey(self, key):
+ """
+ Handler for user input. This returns true if the key press was consumed,
+ false otherwise.
+
+ Arguments:
+ key - keycode for the key pressed
+ """
+
+ return False
+
def getHelp(self):
"""
Provides help information for the controls this page provides. This is a
1
0

09 May '11
commit 18905474729b648a45b5052e7a7751d6c5ea9723
Author: Damian Johnson <atagar(a)torproject.org>
Date: Sat May 7 22:45:27 2011 -0700
Dropping unused config switcher function
Once upon a time the config panel showed both tor and arm configuration
options. However, arm doesn't yet have a counterpart for SETCONF so I dropped
the arm config from the interface.
I'll probably re-introduce this at some point, but for now this is just dead
code and the back-end needs some more work before it's useful to users. Since
the showMenu function is being refactored this dead code would, as is, be
broken so dropping it.
---
src/cli/controller.py | 23 -----------------------
1 files changed, 0 insertions(+), 23 deletions(-)
diff --git a/src/cli/controller.py b/src/cli/controller.py
index 09e3575..a195c15 100644
--- a/src/cli/controller.py
+++ b/src/cli/controller.py
@@ -1190,29 +1190,6 @@ def drawTorMonitor(stdscr, startTime, loggedEvents, isBlindMode):
if selection != -1 and options[selection] != panels["conn"]._listingType:
panels["conn"].setListingType(options[selection])
panels["conn"].redraw(True)
- elif page == 2 and (key == ord('c') or key == ord('C')) and False:
- # TODO: disabled for now (probably gonna be going with separate pages
- # rather than popup menu)
- # provides menu to pick config being displayed
- #options = [confPanel.CONFIG_LABELS[confType] for confType in range(4)]
- options = []
- initialSelection = panels["torrc"].configType
-
- # hides top label of the graph panel and pauses panels
- panels["torrc"].showLabel = False
- panels["torrc"].redraw(True)
- setPauseState(panels, isPaused, page, True)
-
- selection = showMenu(stdscr, panels["popup"], "Configuration:", options, initialSelection)
-
- # reverts changes made for popup
- panels["torrc"].showLabel = True
- setPauseState(panels, isPaused, page)
-
- # applies new setting
- if selection != -1: panels["torrc"].setConfigType(selection)
-
- selectiveRefresh(panels, page)
elif page == 2 and (key == ord('w') or key == ord('W')):
# display a popup for saving the current configuration
panel.CURSES_LOCK.acquire()
1
0

09 May '11
commit 8364fc6a47238053738cce70f3cf9debe0cfb088
Author: Damian Johnson <atagar(a)torproject.org>
Date: Mon May 9 08:28:47 2011 -0700
fix: connection resolution test was nonfunctional
The second test (running targeted connection resolvers) was broken due to
changes in the connection util.
---
src/test.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test.py b/src/test.py
index e403076..af80879 100644
--- a/src/test.py
+++ b/src/test.py
@@ -78,9 +78,9 @@ while True:
printDivider()
break
- if userSelection.isdigit() and int(userSelection) in range(1, 8):
+ if userSelection.isdigit() and int(userSelection) in range(0, 7):
try:
- resolver = int(userSelection)
+ resolver = connections.Resolver.values()[int(userSelection)]
startTime = time.time()
print(connections.getResolverCommand(resolver, "tor", conn.getMyPid()))
@@ -93,7 +93,7 @@ while True:
print(" %s:%s -> %s:%s" % (lIp, lPort, fIp, fPort))
print("\n Runtime: %0.4f seconds" % (time.time() - startTime))
- except IOError, exc:
+ except (IOError, IndexError), exc:
print exc
else:
print("'%s' isn't a valid selection\n" % userSelection)
1
0
commit f40b6dcc9959caf139c998a9862c9f0ef546dbbf
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Mon May 9 10:46:35 2011 -0400
Add a .gitignore for torspec
---
.gitignore | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..be2ff82
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+# Editor droppings
+\#*\#
+.#*
+*~
+*.swp
+# C stuff
+*.o
+# Diff droppings
+*.orig
+*.rej
+
1
0
commit 8ef0f94f7c2d370e41e98f938e53837f01e5d64d
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Mon May 9 10:46:59 2011 -0400
Update proposal target versions
This includes marking "for 0.2.3" everything arma and I suggested
should be "tageted" for 0.2.3, and unmarking everything that was not
done but targetted for 0.2.2 or earlier.
---
proposals/000-index.txt | 53 ++++++++++----------
proposals/110-avoid-infinite-circuits.txt | 2 +-
proposals/117-ipv6-exits.txt | 2 +-
proposals/118-multiple-orports.txt | 6 ++-
proposals/140-consensus-diffs.txt | 1 -
proposals/143-distributed-storage-improvements.txt | 1 -
proposals/145-newguard-flag.txt | 3 +-
proposals/146-long-term-stability.txt | 3 +-
proposals/147-prevoting-opinions.txt | 2 +-
proposals/156-tracking-blocked-ports.txt | 2 +-
proposals/157-specific-cert-download.txt | 2 +-
proposals/158-microdescriptors.txt | 1 +
proposals/162-consensus-flavors.txt | 2 +-
proposals/164-reporting-server-status.txt | 1 -
proposals/168-reduce-circwindow.txt | 2 +-
proposals/171-separate-streams.txt | 3 +-
proposals/172-circ-getinfo-option.txt | 1 +
proposals/173-getinfo-option-expansion.txt | 1 +
proposals/174-optimistic-data-server.txt | 1 +
proposals/177-flag-abstention.txt | 1 +
proposals/178-param-voting.txt | 3 +-
.../179-TLS-cert-and-parameter-normalization.txt | 1 +
proposals/180-pluggable-transport.txt | 1 +
23 files changed, 51 insertions(+), 44 deletions(-)
diff --git a/proposals/000-index.txt b/proposals/000-index.txt
index 4de2634..dca67dc 100644
--- a/proposals/000-index.txt
+++ b/proposals/000-index.txt
@@ -38,7 +38,7 @@ Proposals by number:
115 Two Hop Paths [DEAD]
116 Two hop paths from entry guards [DEAD]
117 IPv6 exits [ACCEPTED]
-118 Advertising multiple ORPorts at once [ACCEPTED]
+118 Advertising multiple ORPorts at once [NEEDS-REVISION]
119 New PROTOCOLINFO command for controllers [CLOSED]
120 Shutdown descriptors when Tor servers stop [DEAD]
121 Hidden Service Authentication [FINISHED]
@@ -65,8 +65,8 @@ Proposals by number:
142 Combine Introduction and Rendezvous Points [DEAD]
143 Improvements of Distributed Storage for Tor Hidden Service Descriptors [OPEN]
144 Increase the diversity of circuits by detecting nodes belonging the same provider [DRAFT]
-145 Separate "suitable as a guard" from "suitable as a new guard" [OPEN]
-146 Add new flag to reflect long-term stability [OPEN]
+145 Separate "suitable as a guard" from "suitable as a new guard" [NEEDS-RESEARCH]
+146 Add new flag to reflect long-term stability [NEEDS-RESEARCH]
147 Eliminate the need for v2 directories in generating v3 directories [ACCEPTED]
148 Stream end reasons from the client side should be uniform [CLOSED]
149 Using data from NETINFO cells [SUPERSEDED]
@@ -91,7 +91,7 @@ Proposals by number:
168 Reduce default circuit window [OPEN]
169 Eliminate TLS renegotiation for the Tor connection handshake [SUPERSEDED]
170 Configuration options regarding circuit building [SUPERSEDED]
-171 Separate streams across circuits by connection metadata [OPEN]
+171 Separate streams across circuits by connection metadata [ACCEPTED]
172 GETINFO controller option for circuit information [ACCEPTED]
173 GETINFO Option Expansion [ACCEPTED]
174 Optimistic Data for Tor: Server Side [CLOSED]
@@ -112,32 +112,33 @@ Proposals by status:
141 Download server descriptors on demand
144 Increase the diversity of circuits by detecting nodes belonging the same provider
175 Automatically promoting Tor clients to nodes
- 179 TLS certificate and parameter normalization
+ 179 TLS certificate and parameter normalization [for 0.2.3.x]
NEEDS-REVISION:
+ 118 Advertising multiple ORPorts at once
131 Help users to verify they are using Tor
+ NEEDS-RESEARCH:
+ 145 Separate "suitable as a guard" from "suitable as a new guard"
+ 146 Add new flag to reflect long-term stability
OPEN:
- 143 Improvements of Distributed Storage for Tor Hidden Service Descriptors [for 0.2.1.x]
- 145 Separate "suitable as a guard" from "suitable as a new guard" [for 0.2.1.x]
- 146 Add new flag to reflect long-term stability [for 0.2.1.x]
- 156 Tracking blocked ports on the client side [for 0.2.?]
+ 143 Improvements of Distributed Storage for Tor Hidden Service Descriptors
+ 156 Tracking blocked ports on the client side
159 Exit Scanning
- 164 Reporting the status of server votes [for 0.2.2]
+ 164 Reporting the status of server votes
165 Easy migration for voting authority sets
- 168 Reduce default circuit window [for 0.2.2]
- 171 Separate streams across circuits by connection metadata
+ 168 Reduce default circuit window
176 Proposed version-3 link handshake for Tor [for 0.2.3]
- 177 Abstaining from votes on individual flags
- 178 Require majority of authorities to vote for consensus parameters
- 180 Pluggable transports for circumvention
+ 177 Abstaining from votes on individual flags [for 0.2.3.x]
+ 178 Require majority of authorities to vote for consensus parameters [for 0.2.3.x]
+ 180 Pluggable transports for circumvention [for 0.2.3.x]
ACCEPTED:
- 110 Avoiding infinite length circuits [for 0.2.1.x] [in 0.2.1.3-alpha]
- 117 IPv6 exits [for 0.2.1.x]
- 118 Advertising multiple ORPorts at once [for 0.2.1.x]
- 140 Provide diffs between consensuses [for 0.2.2.x]
- 147 Eliminate the need for v2 directories in generating v3 directories [for 0.2.1.x]
- 157 Make certificate downloads specific [for 0.2.1.x]
- 172 GETINFO controller option for circuit information
- 173 GETINFO Option Expansion
+ 110 Avoiding infinite length circuits [for 0.2.3.x] [in 0.2.1.3-alpha]
+ 117 IPv6 exits [for 0.2.3.x]
+ 140 Provide diffs between consensuses
+ 147 Eliminate the need for v2 directories in generating v3 directories [for 0.2.3.x]
+ 157 Make certificate downloads specific [for 0.2.3.x]
+ 171 Separate streams across circuits by connection metadata [for 0.2.3.x]
+ 172 GETINFO controller option for circuit information [for 0.2.3.x]
+ 173 GETINFO Option Expansion [for 0.2.3.x]
META:
000 Index of Tor Proposals
001 The Tor Proposal Process
@@ -147,10 +148,10 @@ Proposals by status:
121 Hidden Service Authentication [in 0.2.1.x]
151 Improving Tor Path Selection
155 Four Improvements of Hidden Service Performance [in 0.2.1.x]
- 158 Clients download consensus + microdescriptors
+ 158 Clients download consensus + microdescriptors [in 0.2.3.1-alpha]
160 Authorities vote for bandwidth offsets in consensus [for 0.2.2.x]
161 Computing Bandwidth Adjustments [for 0.2.2.x]
- 162 Publish the consensus in multiple flavors [for 0.2.2]
+ 162 Publish the consensus in multiple flavors [in 0.2.3.1-alpha]
CLOSED:
101 Voting on the Tor Directory System [in 0.2.0.x]
102 Dropping "opt" from the directory format [in 0.2.0.x]
@@ -180,7 +181,7 @@ Proposals by status:
152 Optionally allow exit from single-hop circuits [in 0.2.1.6-alpha]
166 Including Network Statistics in Extra-Info Documents [for 0.2.2]
167 Vote on network parameters in consensus [in 0.2.2]
- 174 Optimistic Data for Tor: Server Side
+ 174 Optimistic Data for Tor: Server Side [in 0.2.3.1-alpha]
SUPERSEDED:
112 Bring Back Pathlen Coin Weight
113 Simplifying directory authority administration
diff --git a/proposals/110-avoid-infinite-circuits.txt b/proposals/110-avoid-infinite-circuits.txt
index fffc41c..5da3261 100644
--- a/proposals/110-avoid-infinite-circuits.txt
+++ b/proposals/110-avoid-infinite-circuits.txt
@@ -3,7 +3,7 @@ Title: Avoiding infinite length circuits
Author: Roger Dingledine
Created: 13-Mar-2007
Status: Accepted
-Target: 0.2.1.x
+Target: 0.2.3.x
Implemented-In: 0.2.1.3-alpha
History:
diff --git a/proposals/117-ipv6-exits.txt b/proposals/117-ipv6-exits.txt
index fe458ce..648c520 100644
--- a/proposals/117-ipv6-exits.txt
+++ b/proposals/117-ipv6-exits.txt
@@ -3,7 +3,7 @@ Title: IPv6 exits
Author: coderman
Created: 10-Jul-2007
Status: Accepted
-Target: 0.2.1.x
+Target: 0.2.3.x
Overview
diff --git a/proposals/118-multiple-orports.txt b/proposals/118-multiple-orports.txt
index 2381ec7..64a6000 100644
--- a/proposals/118-multiple-orports.txt
+++ b/proposals/118-multiple-orports.txt
@@ -2,8 +2,10 @@ Filename: 118-multiple-orports.txt
Title: Advertising multiple ORPorts at once
Author: Nick Mathewson
Created: 09-Jul-2007
-Status: Accepted
-Target: 0.2.1.x
+Status: Needs-Revision
+
+[Needs Revision: This proposal needs revision to come up to 2011 standards
+and take microdescriptors into account.]
Overview:
diff --git a/proposals/140-consensus-diffs.txt b/proposals/140-consensus-diffs.txt
index 8bc4070..f3fcb2b 100644
--- a/proposals/140-consensus-diffs.txt
+++ b/proposals/140-consensus-diffs.txt
@@ -3,7 +3,6 @@ Title: Provide diffs between consensuses
Author: Peter Palfrader
Created: 13-Jun-2008
Status: Accepted
-Target: 0.2.2.x
0. History
diff --git a/proposals/143-distributed-storage-improvements.txt b/proposals/143-distributed-storage-improvements.txt
index 0f7468f..fcd0773 100644
--- a/proposals/143-distributed-storage-improvements.txt
+++ b/proposals/143-distributed-storage-improvements.txt
@@ -3,7 +3,6 @@ Title: Improvements of Distributed Storage for Tor Hidden Service Descriptors
Author: Karsten Loesing
Created: 28-Jun-2008
Status: Open
-Target: 0.2.1.x
Change history:
diff --git a/proposals/145-newguard-flag.txt b/proposals/145-newguard-flag.txt
index 9e61e30..d2eea6d 100644
--- a/proposals/145-newguard-flag.txt
+++ b/proposals/145-newguard-flag.txt
@@ -2,8 +2,7 @@ Filename: 145-newguard-flag.txt
Title: Separate "suitable as a guard" from "suitable as a new guard"
Author: Nick Mathewson
Created: 1-Jul-2008
-Status: Open
-Target: 0.2.1.x
+Status: Needs-Research
[This could be obsoleted by proposal 141, which could replace NewGuard
with a Guard weight.]
diff --git a/proposals/146-long-term-stability.txt b/proposals/146-long-term-stability.txt
index 9af0017..0fe1464 100644
--- a/proposals/146-long-term-stability.txt
+++ b/proposals/146-long-term-stability.txt
@@ -2,8 +2,7 @@ Filename: 146-long-term-stability.txt
Title: Add new flag to reflect long-term stability
Author: Nick Mathewson
Created: 19-Jun-2008
-Status: Open
-Target: 0.2.1.x
+Status: Needs-Research
Overview
diff --git a/proposals/147-prevoting-opinions.txt b/proposals/147-prevoting-opinions.txt
index 3d9659c..44c48f3 100644
--- a/proposals/147-prevoting-opinions.txt
+++ b/proposals/147-prevoting-opinions.txt
@@ -3,7 +3,7 @@ Title: Eliminate the need for v2 directories in generating v3 directories
Author: Nick Mathewson
Created: 2-Jul-2008
Status: Accepted
-Target: 0.2.1.x
+Target: 0.2.3.x
Overview
diff --git a/proposals/156-tracking-blocked-ports.txt b/proposals/156-tracking-blocked-ports.txt
index 419de7e..399d9e8 100644
--- a/proposals/156-tracking-blocked-ports.txt
+++ b/proposals/156-tracking-blocked-ports.txt
@@ -3,7 +3,7 @@ Title: Tracking blocked ports on the client side
Author: Robert Hogan
Created: 14-Oct-2008
Status: Open
-Target: 0.2.?
+
Motivation:
Tor clients that are behind extremely restrictive firewalls can end up
diff --git a/proposals/157-specific-cert-download.txt b/proposals/157-specific-cert-download.txt
index 204b209..739c580 100644
--- a/proposals/157-specific-cert-download.txt
+++ b/proposals/157-specific-cert-download.txt
@@ -3,7 +3,7 @@ Title: Make certificate downloads specific
Author: Nick Mathewson
Created: 2-Dec-2008
Status: Accepted
-Target: 0.2.1.x
+Target: 0.2.3.x
History:
diff --git a/proposals/158-microdescriptors.txt b/proposals/158-microdescriptors.txt
index bbfafba..39a0ed7 100644
--- a/proposals/158-microdescriptors.txt
+++ b/proposals/158-microdescriptors.txt
@@ -3,6 +3,7 @@ Title: Clients download consensus + microdescriptors
Author: Roger Dingledine
Created: 17-Jan-2009
Status: Finished
+Implemented-In: 0.2.3.1-alpha
0. History
diff --git a/proposals/162-consensus-flavors.txt b/proposals/162-consensus-flavors.txt
index b027b42..f97143b 100644
--- a/proposals/162-consensus-flavors.txt
+++ b/proposals/162-consensus-flavors.txt
@@ -2,7 +2,7 @@ Filename: 162-consensus-flavors.txt
Title: Publish the consensus in multiple flavors
Author: Nick Mathewson
Created: 14-May-2009
-Target: 0.2.2
+Implemented-In: 0.2.3.1-alpha
Status: Finished
Overview:
diff --git a/proposals/164-reporting-server-status.txt b/proposals/164-reporting-server-status.txt
index 705f5f1..c20460f 100644
--- a/proposals/164-reporting-server-status.txt
+++ b/proposals/164-reporting-server-status.txt
@@ -2,7 +2,6 @@ Filename: 164-reporting-server-status.txt
Title: Reporting the status of server votes
Author: Nick Mathewson
Created: 22-May-2009
-Target: 0.2.2
Status: Open
diff --git a/proposals/168-reduce-circwindow.txt b/proposals/168-reduce-circwindow.txt
index a746286..aed1d61 100644
--- a/proposals/168-reduce-circwindow.txt
+++ b/proposals/168-reduce-circwindow.txt
@@ -3,7 +3,7 @@ Title: Reduce default circuit window
Author: Roger Dingledine
Created: 12-Aug-2009
Status: Open
-Target: 0.2.2
+
0. History
diff --git a/proposals/171-separate-streams.txt b/proposals/171-separate-streams.txt
index 9842265..3b8b826 100644
--- a/proposals/171-separate-streams.txt
+++ b/proposals/171-separate-streams.txt
@@ -3,7 +3,8 @@ Title: Separate streams across circuits by connection metadata
Author: Robert Hogan, Jacob Appelbaum, Damon McCoy, Nick Mathewson
Created: 21-Oct-2008
Modified: 7-Dec-2010
-Status: Open
+Status: Accepted
+Target: 0.2.3.x
Summary:
diff --git a/proposals/172-circ-getinfo-option.txt b/proposals/172-circ-getinfo-option.txt
index b7fd79c..f716194 100644
--- a/proposals/172-circ-getinfo-option.txt
+++ b/proposals/172-circ-getinfo-option.txt
@@ -3,6 +3,7 @@ Title: GETINFO controller option for circuit information
Author: Damian Johnson
Created: 03-June-2010
Status: Accepted
+Target: 0.2.3.x
Overview:
diff --git a/proposals/173-getinfo-option-expansion.txt b/proposals/173-getinfo-option-expansion.txt
index 54356c9..b9ba4bd 100644
--- a/proposals/173-getinfo-option-expansion.txt
+++ b/proposals/173-getinfo-option-expansion.txt
@@ -3,6 +3,7 @@ Title: GETINFO Option Expansion
Author: Damian Johnson
Created: 02-June-2010
Status: Accepted
+Target: 0.2.3.x
Overview:
diff --git a/proposals/174-optimistic-data-server.txt b/proposals/174-optimistic-data-server.txt
index 95c1386..193565b 100644
--- a/proposals/174-optimistic-data-server.txt
+++ b/proposals/174-optimistic-data-server.txt
@@ -3,6 +3,7 @@ Title: Optimistic Data for Tor: Server Side
Author: Ian Goldberg
Created: 2-Aug-2010
Status: Closed
+Implemented-In: 0.2.3.1-alpha
Overview:
diff --git a/proposals/177-flag-abstention.txt b/proposals/177-flag-abstention.txt
index 46d68e6..8c83504 100644
--- a/proposals/177-flag-abstention.txt
+++ b/proposals/177-flag-abstention.txt
@@ -3,6 +3,7 @@ Title: Abstaining from votes on individual flags
Author: Nick Mathewson
Created: 14 Feb 2011
Status: Open
+Target: 0.2.3.x
Overview:
diff --git a/proposals/178-param-voting.txt b/proposals/178-param-voting.txt
index b5664b5..2c4abf6 100644
--- a/proposals/178-param-voting.txt
+++ b/proposals/178-param-voting.txt
@@ -1,8 +1,9 @@
Filename: 178-param-voting.txt
Title: Require majority of authorities to vote for consensus parameters
-Author: Sebastian Hahn
+Author: Sebastian Hahn
Created: 16-Feb-2011
Status: Open
+Target: 0.2.3.x
Overview:
diff --git a/proposals/179-TLS-cert-and-parameter-normalization.txt b/proposals/179-TLS-cert-and-parameter-normalization.txt
index acad79a..7ad3ed8 100644
--- a/proposals/179-TLS-cert-and-parameter-normalization.txt
+++ b/proposals/179-TLS-cert-and-parameter-normalization.txt
@@ -3,6 +3,7 @@ Title: TLS certificate and parameter normalization
Author: Jacob Appelbaum, Gladys Shufflebottom
Created: 16-Feb-2011
Status: Draft
+Target: 0.2.3.x
Draft spec for TLS certificate and handshake normalization
diff --git a/proposals/180-pluggable-transport.txt b/proposals/180-pluggable-transport.txt
index f51a9ff..16ad761 100644
--- a/proposals/180-pluggable-transport.txt
+++ b/proposals/180-pluggable-transport.txt
@@ -3,6 +3,7 @@ Title: Pluggable transports for circumvention
Author: Jacob Appelbaum, Nick Mathewson
Created: 15-Oct-2010
Status: Open
+Target: 0.2.3.x
Overview
1
0

[torspec/master] In specs, do not say "server" when we mean "relay" or "node"
by nickm@torproject.org 09 May '11
by nickm@torproject.org 09 May '11
09 May '11
commit 56a66372d492afd964d4c92537f79020e213b5cb
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Mon May 9 10:36:59 2011 -0400
In specs, do not say "server" when we mean "relay" or "node"
Fixes bug 2936.
---
control-spec.txt | 10 +++++-----
dir-spec.txt | 44 ++++++++++++++++++++++----------------------
path-spec.txt | 20 ++++++++++----------
tor-spec.txt | 52 ++++++++++++++++++++++++++--------------------------
4 files changed, 63 insertions(+), 63 deletions(-)
diff --git a/control-spec.txt b/control-spec.txt
index 5878d75..c0a0a0e 100644
--- a/control-spec.txt
+++ b/control-spec.txt
@@ -25,7 +25,7 @@
TC is a bidirectional message-based protocol. It assumes an underlying
stream for communication between a controlling process (the "client"
or "controller") and a Tor process (or "server"). The stream may be
- implemented via TCP, TLS-over-TCP, a Unix-domain socket, or so on,
+ implemented via TCP, TLS-over-TCP, a Unix-doma2in socket, or so on,
but it must provide reliable in-order delivery. For security, the
stream should not be accessible by untrusted parties.
@@ -467,7 +467,7 @@
have no guess, return a 551 error. (Added in 0.1.2.2-alpha)
"fingerprint" -- the contents of the fingerprint file that Tor
- writes as a server, or a 551 if we're not a server currently.
+ writes as a relay, or a 551 if we're not a relay currently.
(Added in 0.1.2.3-alpha)
"circuit-status"
@@ -509,7 +509,7 @@
[From 0.1.1.4-alpha to 0.1.1.10-alpha, entry-guards was called
"helper-nodes". Tor still supports calling "helper-nodes", but it
is deprecated and should not be used.]
-
+
[Older versions of Tor (before 0.1.2.x-final) generated 'down' instead
of unlisted/unusable. Current Tors never generate 'down'.]
@@ -1609,8 +1609,8 @@
Our DNS provider is giving a hijacked address instead of well-known
websites; Tor will not try to be an exit node.
- {Controllers could warn the admin if the server is running as an
- exit server: the admin needs to configure a good DNS server.
+ {Controllers could warn the admin if the relay is running as an
+ exit node: the admin needs to configure a good DNS server.
Alternatively, this happens a lot in some restrictive environments
(hotels, universities, coffeeshops) when the user hasn't registered.}
diff --git a/dir-spec.txt b/dir-spec.txt
index 589b0e9..0e17e6e 100644
--- a/dir-spec.txt
+++ b/dir-spec.txt
@@ -178,8 +178,8 @@
any missing router descriptors. Clients download missing descriptors
from caches; caches and authorities download from authorities.
Descriptors are downloaded by the hash of the descriptor, not by the
- server's identity key: this prevents servers from attacking clients by
- giving them descriptors nobody else uses.
+ relay's identity key: this prevents directory servers from attacking
+ clients by giving them descriptors nobody else uses.
All directory information is uploaded and downloaded with HTTP.
@@ -402,8 +402,8 @@
"average" bandwidth is the volume per second that the OR is willing to
sustain over long periods; the "burst" bandwidth is the volume that
the OR is willing to sustain in very short intervals. The "observed"
- value is an estimate of the capacity this server can handle. The
- server remembers the max bandwidth sustained output over any ten
+ value is an estimate of the capacity this relay can handle. The
+ relay remembers the max bandwidth sustained output over any ten
second period in the past day, and another sustained input. The
"observed" value is the lesser of these two numbers.
@@ -438,7 +438,7 @@
[At most once]
- If the value is 1, then the Tor server was hibernating when the
+ If the value is 1, then the Tor relay was hibernating when the
descriptor was published, and shouldn't be used to build circuits.
[We didn't start parsing this line until Tor 0.1.0.6-rc; it should be
@@ -490,14 +490,14 @@
[At most once]
- Describes a way to contact the server's administrator, preferably
+ Describes a way to contact the relay's administrator, preferably
including an email address and a PGP key fingerprint.
"family" names NL
[At most once]
- 'Names' is a space-separated list of server nicknames or
+ 'Names' is a space-separated list of relay nicknames or
hexdigests. If two ORs list one another in their "family" entries,
then OPs should treat them as a single OR for the purpose of path
selection.
@@ -530,7 +530,7 @@
dns logic. Versions of Tor with this field set to false SHOULD NOT
be used for reverse hostname lookups.
- [This option is obsolete. All Tor current servers should be presumed
+ [This option is obsolete. All Tor current relays should be presumed
to have the evdns backend.]
"caches-extra-info" NL
@@ -591,7 +591,7 @@
[At most once.]
Present only if the router allows single-hop circuits to make exit
- connections. Most Tor servers do not support this: this is
+ connections. Most Tor relays do not support this: this is
included for specialized controllers designed to support perspective
access and such.
@@ -913,7 +913,7 @@
nickname ::= between 1 and 19 alphanumeric characters ([A-Za-z0-9]),
case-insensitive.
hexdigest ::= a '$', followed by 40 hexadecimal characters
- ([A-Fa-f0-9]). [Represents a server by the digest of its identity
+ ([A-Fa-f0-9]). [Represents a relay by the digest of its identity
key.]
exitpattern ::= addrspec ":" portspec
@@ -1138,7 +1138,7 @@
[At most once.]
- A comma-separated list of recommended Tor versions for server
+ A comma-separated list of recommended Tor versions for relay
usage, in ascending order. The versions are given as defined by
version-spec.txt. If absent, no opinion is held about server
versions.
@@ -1319,7 +1319,7 @@
[At most once.]
- The version of the Tor protocol that this server is running. If
+ The version of the Tor protocol that this relay is running. If
the value begins with "Tor" SP, the rest of the string is a Tor
version number, and the protocol is "The Tor protocol as supported
by the given version of Tor." Otherwise, if the value begins with
@@ -1335,7 +1335,7 @@
[At most once.]
- An estimate of the bandwidth of this server, in an arbitrary
+ An estimate of the bandwidth of this relay, in an arbitrary
unit (currently kilobytes per second). Used to weight router
selection.
@@ -1446,7 +1446,7 @@
believes the given name should be bound to the given key.
Two strategies exist on the current network for deciding on
- values for the Named flag. In the original version, server
+ values for the Named flag. In the original version, relay
operators were asked to send nickname-identity pairs to a
mailing list of Naming directory authorities operators. The
operators were then supposed to add the pairs to their
@@ -1515,13 +1515,13 @@
serves v2 hidden service descriptors and the authority managed to connect
to it successfully within the last 24 hours.
- Directory server administrators may label some servers or IPs as
+ Directory server administrators may label some relays or IPs as
blacklisted, and elect not to include them in their network-status lists.
- Authorities SHOULD 'disable' any servers in excess of 3 on any single IP.
+ Authorities SHOULD 'disable' any relays in excess of 3 on any single IP.
When there are more than 3 to choose from, authorities should first prefer
authorities to non-authorities, then prefer Running to non-Running, and
- then prefer high-bandwidth to low-bandwidth. To 'disable' a server, the
+ then prefer high-bandwidth to low-bandwidth. To 'disable' a relay, the
authority *should* advertise it without the Running or Valid flag.
Thus, the network-status vote includes all non-blacklisted,
@@ -2270,17 +2270,17 @@
6. Using directory information
Everyone besides directory authorities uses the approaches in this section
- to decide which servers to use and what their keys are likely to be.
+ to decide which relays to use and what their keys are likely to be.
(Directory authorities just believe their own opinions, as in 3.1 above.)
6.1. Choosing routers for circuits.
Circuits SHOULD NOT be built until the client has enough directory
information: a live consensus network status [XXXX fallback?] and
- descriptors for at least 1/4 of the servers believed to be running.
+ descriptors for at least 1/4 of the relays believed to be running.
- A server is "listed" if it is included by the consensus network-status
- document. Clients SHOULD NOT use unlisted servers.
+ A relay is "listed" if it is included by the consensus network-status
+ document. Clients SHOULD NOT use unlisted relays.
These flags are used as follows:
@@ -2304,7 +2304,7 @@
6.2. Managing naming
- In order to provide human-memorable names for individual server
+ In order to provide human-memorable names for individual router
identities, some directory servers bind names to IDs. Clients handle
names in two ways:
diff --git a/path-spec.txt b/path-spec.txt
index 7c313f8..90e3160 100644
--- a/path-spec.txt
+++ b/path-spec.txt
@@ -76,16 +76,16 @@ of their choices.
is unknown (usually its target IP), but we believe the path probably
supports the request according to the rules given below.
-1.1. A server's bandwidth
+1.1. A relay's bandwidth
Old versions of Tor did not report bandwidths in network status
documents, so clients had to learn them from the routers' advertised
- server descriptors.
+ relay descriptors.
For versions of Tor prior to 0.2.1.17-rc, everywhere below where we
- refer to a server's "bandwidth", we mean its clipped advertised
+ refer to a relay's "bandwidth", we mean its clipped advertised
bandwidth, computed by taking the smaller of the 'rate' and
- 'observed' arguments to the "bandwidth" element in the server's
+ 'observed' arguments to the "bandwidth" element in the relay's
descriptor. If a router's advertised bandwidth is greater than
MAX_BELIEVABLE_BANDWIDTH (currently 10 MB/s), we clipped to that
value.
@@ -144,13 +144,13 @@ of their choices.
In some cases we can reuse an already established circuit if it's
clean; see Section 2.3 (cannibalizing circuits) for details.
-2.1.3. Servers build circuits for testing reachability and bandwidth
+2.1.3. Relays build circuits for testing reachability and bandwidth
- Tor servers test reachability of their ORPort once they have
+ Tor relays test reachability of their ORPort once they have
successfully built a circuit (on start and whenever their IP address
changes). They build an ordinary fast internal circuit with themselves
as the last hop. As soon as any testing circuit succeeds, the Tor
- server decides it's reachable and is willing to publish a descriptor.
+ relay decides it's reachable and is willing to publish a descriptor.
We launch multiple testing circuits (one at a time), until we
have NUM_PARALLEL_TESTING_CIRC (4) such circuits open. Then we
@@ -161,7 +161,7 @@ of their choices.
incoming bandwidth, and helps to jumpstart the observed bandwidth
(see dir-spec.txt).
- Tor servers also test reachability of their DirPort once they have
+ Tor relays also test reachability of their DirPort once they have
established a circuit, but they use an ordinary exit circuit for
this purpose.
@@ -266,7 +266,7 @@ of their choices.
such a connection if any clause that accepts any connections to that port
precedes all clauses (if any) that reject all connections to that port.
- Unless requested to do so by the user, we never choose an exit server
+ Unless requested to do so by the user, we never choose an exit node
flagged as "BadExit" by more than half of the authorities who advertise
themselves as listing bad exits.
@@ -539,7 +539,7 @@ of their choices.
We use Guard nodes (also called "helper nodes" in the literature) to
prevent certain profiling attacks. Here's the risk: if we choose entry and
- exit nodes at random, and an attacker controls C out of N servers
+ exit nodes at random, and an attacker controls C out of N relays
(ignoring bandwidth), then the
attacker will control the entry and exit node of any given circuit with
probability (C/N)^2. But as we make many different circuits over time,
diff --git a/tor-spec.txt b/tor-spec.txt
index 9c45a36..7d84dc9 100644
--- a/tor-spec.txt
+++ b/tor-spec.txt
@@ -130,31 +130,31 @@ see tor-design.pdf.
1.1. Keys and names
- Every Tor server has multiple public/private keypairs:
+ Every Tor relay has multiple public/private keypairs:
- A long-term signing-only "Identity key" used to sign documents and
- certificates, and used to establish server identity.
+ certificates, and used to establish relay identity.
- A medium-term "Onion key" used to decrypt onion skins when accepting
circuit extend attempts. (See 5.1.) Old keys MUST be accepted for at
least one week after they are no longer advertised. Because of this,
- servers MUST retain old keys for a while after they're rotated.
+ relays MUST retain old keys for a while after they're rotated.
- A short-term "Connection key" used to negotiate TLS connections.
Tor implementations MAY rotate this key as often as they like, and
SHOULD rotate this key at least once a day.
- Tor servers are also identified by "nicknames"; these are specified in
+ Tor relays are also identified by "nicknames"; these are specified in
dir-spec.txt.
2. Connections
- Connections between two Tor servers, or between a client and a server,
+ Connections between two Tor relays, or between a client and a relay,
use TLS/SSLv3 for link authentication and encryption. All
implementations MUST support the SSLv3 ciphersuite
"SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA", and SHOULD support the TLS
ciphersuite "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" if it is available.
There are three acceptable ways to perform a TLS handshake when
- connecting to a Tor server: "certificates up-front", "renegotiation", and
+ connecting to a Tor relay: "certificates up-front", "renegotiation", and
"backwards-compatible renegotiation". ("Backwards-compatible
renegotiation" is, as the name implies, compatible with both other
handshake types.)
@@ -197,7 +197,7 @@ see tor-design.pdf.
certificates have been sent, it proceeds as in "certificates up-front";
otherwise, it proceeds as in "renegotiation".
- All new implementations of the Tor server protocol MUST support
+ All new relay implementations of the Tor protocol MUST support
"backwards-compatible renegotiation"; clients SHOULD do this too. If
this is not possible, new client implementations MUST support both
"renegotiation" and "certificates up-front" and use the router's
@@ -205,7 +205,7 @@ see tor-design.pdf.
to decide which to use.
In all of the above handshake variants, certificates sent in the clear
- SHOULD NOT include any strings to identify the host as a Tor server. In
+ SHOULD NOT include any strings to identify the host as a Tor relay. In
the "renegotiation" and "backwards-compatible renegotiation" steps, the
initiator SHOULD choose a list of ciphersuites and TLS extensions
to mimic one used by a popular web browser.
@@ -255,7 +255,7 @@ see tor-design.pdf.
(As an exception, directory servers may try to stay connected to all of
the ORs -- though this will be phased out for the Tor 0.1.2.x release.)
- To avoid being trivially distinguished from servers, client-only Tor
+ To avoid being trivially distinguished from relays, client-only Tor
instances are encouraged but not required to use a two-certificate chain
as well. Clients SHOULD NOT keep using the same certificates when
their IP address changes. Clients MAY send no certificates at all.
@@ -332,8 +332,8 @@ see tor-design.pdf.
version is 2 or higher.
To determine the version, in any connection where the "renegotiation"
- handshake was used (that is, where the server sent only one certificate
- at first and where the client did not send any certificates until
+ handshake was used (that is, where the responder sent only one certificate
+ at first and where the initiator did not send any certificates until
renegotiation), both parties MUST send a VERSIONS cell immediately after
the renegotiation is finished, before any other cells are sent. Parties
MUST NOT send any other cells on a connection until they have received a
@@ -458,24 +458,24 @@ see tor-design.pdf.
5.2. Setting circuit keys
Once the handshake between the OP and an OR is completed, both can
- now calculate g^xy with ordinary DH. Before computing g^xy, both client
- and server MUST verify that the received g^x or g^y value is not degenerate;
+ now calculate g^xy with ordinary DH. Before computing g^xy, both parties
+ MUST verify that the received g^x or g^y value is not degenerate;
that is, it must be strictly greater than 1 and strictly less than p-1
where p is the DH modulus. Implementations MUST NOT complete a handshake
with degenerate keys. Implementations MUST NOT discard other "weak"
g^x values.
(Discarding degenerate keys is critical for security; if bad keys
- are not discarded, an attacker can substitute the server's CREATED
+ are not discarded, an attacker can substitute the OR's CREATED
cell's g^y with 0 or 1, thus creating a known g^xy and impersonating
- the server. Discarding other keys may allow attacks to learn bits of
+ the OR. Discarding other keys may allow attacks to learn bits of
the private key.)
- If CREATE or EXTEND is used to extend a circuit, the client and server
+ If CREATE or EXTEND is used to extend a circuit, both parties
base their key material on K0=g^xy, represented as a big-endian unsigned
integer.
- If CREATE_FAST is used, the client and server base their key material on
+ If CREATE_FAST is used, both parties base their key material on
K0=X|Y.
From the base key material K0, they compute KEY_LEN*2+HASH_LEN*3 bytes of
@@ -624,8 +624,8 @@ see tor-design.pdf.
3 -- REQUESTED (A client sent a TRUNCATE command.)
4 -- HIBERNATING (Not currently operating; trying to save bandwidth.)
5 -- RESOURCELIMIT (Out of memory, sockets, or circuit IDs.)
- 6 -- CONNECTFAILED (Unable to reach server.)
- 7 -- OR_IDENTITY (Connected to server, but its OR identity was not
+ 6 -- CONNECTFAILED (Unable to reach relay.)
+ 7 -- OR_IDENTITY (Connected to relay, but its OR identity was not
as expected.)
8 -- OR_CONN_CLOSED (The OR connection that was carrying this circuit
died.)
@@ -684,7 +684,7 @@ see tor-design.pdf.
RELAY cells that are not targeted at the first hop of any circuit as
RELAY_EARLY cells too, in order to partially conceal the circuit length.
- [In a future version of Tor, servers will reject any EXTEND cell not
+ [In a future version of Tor, relays will reject any EXTEND cell not
received in a RELAY_EARLY cell. See proposal 110.]
6. Application connections and stream management
@@ -792,7 +792,7 @@ see tor-design.pdf.
A number of seconds (TTL) for which the address may be cached [4 octets]
[XXXX No version of Tor currently generates the IPv6 format.]
- [Tor servers before 0.1.2.0 set the TTL field to a fixed value. Later
+ [Tor exit nodes before 0.1.2.0 set the TTL field to a fixed value. Later
versions set the TTL to the last value seen from a DNS server, and expire
their own cached entries after a fixed interval. This prevents certain
attacks.]
@@ -822,16 +822,16 @@ see tor-design.pdf.
6.2.1. Opening a directory stream
- If a Tor server is a directory server, it should respond to a
+ If a Tor relay is a directory server, it should respond to a
RELAY_BEGIN_DIR cell as if it had received a BEGIN cell requesting a
connection to its directory port. RELAY_BEGIN_DIR cells ignore exit
policy, since the stream is local to the Tor process.
- If the Tor server is not running a directory service, it should respond
+ If the Tor relay is not running a directory service, it should respond
with a REASON_NOTDIRECTORY RELAY_END cell.
Clients MUST generate an all-zero payload for RELAY_BEGIN_DIR cells,
- and servers MUST ignore the payload.
+ and relays MUST ignore the payload.
[RELAY_BEGIN_DIR was not supported before Tor 0.1.2.2-alpha; clients
SHOULD NOT send it to routers running earlier versions of Tor.]
@@ -866,7 +866,7 @@ see tor-design.pdf.
13 -- REASON_TORPROTOCOL (Sent when closing connection because of
Tor protocol violations.)
14 -- REASON_NOTDIRECTORY (Client sent RELAY_BEGIN_DIR to a
- non-directory server.)
+ non-directory relay.)
(With REASON_EXITPOLICY, the 4-byte IPv4 address or 16-byte IPv6 address
forms the optional data, along with a 4-byte TTL; no other reason
@@ -1014,7 +1014,7 @@ see tor-design.pdf.
A.1. Differences between spec and implementation
- The current specification requires all ORs to have IPv4 addresses, but
- allows servers to exit and resolve to IPv6 addresses, and to declare IPv6
+ allows relays to exit and resolve to IPv6 addresses, and to declare IPv6
addresses in their exit policies. The current codebase has no IPv6
support at all.
1
0

09 May '11
commit a9f5ec8d40386389e2a9a20b38d130e32b433711
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Mon May 9 10:06:52 2011 -0400
Index changes for proposal state changes
---
proposals/000-index.txt | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/proposals/000-index.txt b/proposals/000-index.txt
index f55afc7..4de2634 100644
--- a/proposals/000-index.txt
+++ b/proposals/000-index.txt
@@ -69,7 +69,7 @@ Proposals by number:
146 Add new flag to reflect long-term stability [OPEN]
147 Eliminate the need for v2 directories in generating v3 directories [ACCEPTED]
148 Stream end reasons from the client side should be uniform [CLOSED]
-149 Using data from NETINFO cells [DRAFT]
+149 Using data from NETINFO cells [SUPERSEDED]
150 Exclude Exit Nodes from a circuit [CLOSED]
151 Improving Tor Path Selection [FINISHED]
152 Optionally allow exit from single-hop circuits [CLOSED]
@@ -78,23 +78,23 @@ Proposals by number:
155 Four Improvements of Hidden Service Performance [FINISHED]
156 Tracking blocked ports on the client side [OPEN]
157 Make certificate downloads specific [ACCEPTED]
-158 Clients download consensus + microdescriptors [OPEN]
+158 Clients download consensus + microdescriptors [FINISHED]
159 Exit Scanning [OPEN]
160 Authorities vote for bandwidth offsets in consensus [FINISHED]
161 Computing Bandwidth Adjustments [FINISHED]
-162 Publish the consensus in multiple flavors [OPEN]
-163 Detecting whether a connection comes from a client [OPEN]
+162 Publish the consensus in multiple flavors [FINISHED]
+163 Detecting whether a connection comes from a client [SUPERSEDED]
164 Reporting the status of server votes [OPEN]
165 Easy migration for voting authority sets [OPEN]
166 Including Network Statistics in Extra-Info Documents [CLOSED]
167 Vote on network parameters in consensus [CLOSED]
168 Reduce default circuit window [OPEN]
169 Eliminate TLS renegotiation for the Tor connection handshake [SUPERSEDED]
-170 Configuration options regarding circuit building [DRAFT]
+170 Configuration options regarding circuit building [SUPERSEDED]
171 Separate streams across circuits by connection metadata [OPEN]
172 GETINFO controller option for circuit information [ACCEPTED]
173 GETINFO Option Expansion [ACCEPTED]
-174 Optimistic Data for Tor: Server Side [ACCEPTED]
+174 Optimistic Data for Tor: Server Side [CLOSED]
175 Automatically promoting Tor clients to nodes [DRAFT]
176 Proposed version-3 link handshake for Tor [OPEN]
177 Abstaining from votes on individual flags [OPEN]
@@ -111,8 +111,6 @@ Proposals by status:
133 Incorporate Unreachable ORs into the Tor Network
141 Download server descriptors on demand
144 Increase the diversity of circuits by detecting nodes belonging the same provider
- 149 Using data from NETINFO cells [for 0.2.1.x]
- 170 Configuration options regarding circuit building
175 Automatically promoting Tor clients to nodes
179 TLS certificate and parameter normalization
NEEDS-REVISION:
@@ -122,10 +120,7 @@ Proposals by status:
145 Separate "suitable as a guard" from "suitable as a new guard" [for 0.2.1.x]
146 Add new flag to reflect long-term stability [for 0.2.1.x]
156 Tracking blocked ports on the client side [for 0.2.?]
- 158 Clients download consensus + microdescriptors
159 Exit Scanning
- 162 Publish the consensus in multiple flavors [for 0.2.2]
- 163 Detecting whether a connection comes from a client [for 0.2.2]
164 Reporting the status of server votes [for 0.2.2]
165 Easy migration for voting authority sets
168 Reduce default circuit window [for 0.2.2]
@@ -143,7 +138,6 @@ Proposals by status:
157 Make certificate downloads specific [for 0.2.1.x]
172 GETINFO controller option for circuit information
173 GETINFO Option Expansion
- 174 Optimistic Data for Tor: Server Side
META:
000 Index of Tor Proposals
001 The Tor Proposal Process
@@ -153,8 +147,10 @@ Proposals by status:
121 Hidden Service Authentication [in 0.2.1.x]
151 Improving Tor Path Selection
155 Four Improvements of Hidden Service Performance [in 0.2.1.x]
+ 158 Clients download consensus + microdescriptors
160 Authorities vote for bandwidth offsets in consensus [for 0.2.2.x]
161 Computing Bandwidth Adjustments [for 0.2.2.x]
+ 162 Publish the consensus in multiple flavors [for 0.2.2]
CLOSED:
101 Voting on the Tor Directory System [in 0.2.0.x]
102 Dropping "opt" from the directory format [in 0.2.0.x]
@@ -184,13 +180,17 @@ Proposals by status:
152 Optionally allow exit from single-hop circuits [in 0.2.1.6-alpha]
166 Including Network Statistics in Extra-Info Documents [for 0.2.2]
167 Vote on network parameters in consensus [in 0.2.2]
+ 174 Optimistic Data for Tor: Server Side
SUPERSEDED:
112 Bring Back Pathlen Coin Weight
113 Simplifying directory authority administration
124 Blocking resistant TLS certificate usage
+ 149 Using data from NETINFO cells
153 Automatic software update protocol
154 Automatic Software Update Protocol
+ 163 Detecting whether a connection comes from a client
169 Eliminate TLS renegotiation for the Tor connection handshake
+ 170 Configuration options regarding circuit building
DEAD:
100 Tor Unreliable Datagram Extension Proposal
115 Two Hop Paths
1
0

[torspec/master] 170 is superseded by all the bug 1090 changes in 0.2.2.25-alpha
by nickm@torproject.org 09 May '11
by nickm@torproject.org 09 May '11
09 May '11
commit b7e97a27415a519728113b2b8c7d1e5d415a9df7
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Mon May 9 10:05:53 2011 -0400
170 is superseded by all the bug 1090 changes in 0.2.2.25-alpha
---
proposals/170-user-path-config.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/proposals/170-user-path-config.txt b/proposals/170-user-path-config.txt
index fa74c76..42163f1 100644
--- a/proposals/170-user-path-config.txt
+++ b/proposals/170-user-path-config.txt
@@ -2,7 +2,7 @@ Title: Configuration options regarding circuit building
Filename: 170-user-path-config.txt
Author: Sebastian Hahn
Created: 01-March-2010
-Status: Draft
+Status: Superseded
Overview:
1
0