|
@@ -76,6 +76,8 @@ except ImportError:
|
|
|
|
|
|
|
|
|
FALLBACK_FORMAT_VERSION = '2.0.0'
|
|
|
+SECTION_SEPARATOR_BASE = '====='
|
|
|
+SECTION_SEPARATOR_COMMENT = '/* ' + SECTION_SEPARATOR_BASE + ' */'
|
|
|
|
|
|
|
|
|
OUTPUT_CANDIDATES = False
|
|
@@ -1339,9 +1341,13 @@ class Candidate(object):
|
|
|
|
|
|
def fallbackdir_info(self, dl_speed_ok):
|
|
|
|
|
|
+
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1363,9 +1369,11 @@ class Candidate(object):
|
|
|
self.orport,
|
|
|
cleanse_c_string(self._fpr))
|
|
|
s += '\n'
|
|
|
+
|
|
|
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']))
|
|
@@ -1380,6 +1388,14 @@ class Candidate(object):
|
|
|
if not comment_string:
|
|
|
s += ' */'
|
|
|
s += '\n'
|
|
|
+
|
|
|
+
|
|
|
+ if not comment_string:
|
|
|
+ s += '/* '
|
|
|
+ s += SECTION_SEPARATOR_BASE
|
|
|
+ if not comment_string:
|
|
|
+ s += ' */'
|
|
|
+ s += '\n'
|
|
|
s += ','
|
|
|
if comment_string:
|
|
|
s += '\n'
|
|
@@ -2205,6 +2221,9 @@ def list_fallbacks(whitelist, blacklist):
|
|
|
print "/* type=fallback */"
|
|
|
print ("/* version={} */"
|
|
|
.format(cleanse_c_multiline_comment(FALLBACK_FORMAT_VERSION)))
|
|
|
+
|
|
|
+ print SECTION_SEPARATOR_COMMENT
|
|
|
+
|
|
|
logging.warning('Downloading and parsing Onionoo data. ' +
|
|
|
'This may take some time.')
|
|
|
|
|
@@ -2296,6 +2315,9 @@ def list_fallbacks(whitelist, blacklist):
|
|
|
for s in fetch_source_list():
|
|
|
print describe_fetch_source(s)
|
|
|
|
|
|
+
|
|
|
+ print SECTION_SEPARATOR_COMMENT
|
|
|
+
|
|
|
|
|
|
|
|
|
|