[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Add a nickname to each fallback in a C comment
commit 561f18e724c15c0ad22d2915786fdb8e6ddd9c30
Author: teor <teor2345@xxxxxxxxx>
Date: Sat Dec 23 00:23:12 2017 +1100
Add a nickname to each fallback in a C comment
This makes it easier for operators to find their relays, and allows stem to
use nicknames to identify fallbacks.
Implements ticket 24600.
---
changes/ticket24600 | 5 +++++
scripts/maint/updateFallbackDirs.py | 7 +++++++
2 files changed, 12 insertions(+)
diff --git a/changes/ticket24600 b/changes/ticket24600
new file mode 100644
index 000000000..c464d0b16
--- /dev/null
+++ b/changes/ticket24600
@@ -0,0 +1,5 @@
+ o Minor features (fallback directory mirrors):
+ - Add a nickname to each fallback in a C comment. This makes it easier for
+ operators to find their relays, and allows stem to use nicknames to
+ identify fallbacks.
+ Implements ticket 24600.
diff --git a/scripts/maint/updateFallbackDirs.py b/scripts/maint/updateFallbackDirs.py
index 7bd6fae0e..4e4000dce 100755
--- a/scripts/maint/updateFallbackDirs.py
+++ b/scripts/maint/updateFallbackDirs.py
@@ -1331,6 +1331,7 @@ class Candidate(object):
def fallbackdir_info(self, dl_speed_ok):
# "address:dirport orport=port id=fingerprint"
# "[ipv6=addr:orport]"
+ # /* nickname=name */
# ,
#
# Do we want a C string, or a commented-out string?
@@ -1355,6 +1356,12 @@ class Candidate(object):
if self.has_ipv6():
s += '" ipv6=%s:%d"'%(cleanse_c_string(self.ipv6addr), self.ipv6orport)
s += '\n'
+ if not comment_string:
+ s += '/* '
+ s += 'nickname=%s'%(cleanse_c_string(self._data['nickname']))
+ if not comment_string:
+ s += ' */'
+ s += '\n'
s += ','
if comment_string:
s += '\n'
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits