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
April 2014
- 22 participants
- 2020 discussions
commit 8f63e74709cd05cd812e33f95ffe51b05d6d537c
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Sun Apr 20 00:49:36 2014 +0200
Add a new fingerprint parameter.
By default, we are limiting all responses to relays or bridges that have
been running in the past 7 days. The main reason for this is performance.
We're now making an exception for specific lookups by fingerprint or
hashed fingerprint. These lookups don't use the node index, but attempt
to read the relay's or bridge's details document and extract all
information needed to compile a summary document or locate one of the
other documents.
There may be more elegant solutions, but we'll probably have to switch to
a database design for them.
Implements #11350.
---
src/org/torproject/onionoo/DocumentStore.java | 89 +++++++++++++++++++-
src/org/torproject/onionoo/RequestHandler.java | 29 ++++++-
src/org/torproject/onionoo/ResourceServlet.java | 20 +++--
.../torproject/onionoo/ResourceServletTest.java | 44 +++++++++-
web/index.html | 43 +++++++---
5 files changed, 204 insertions(+), 21 deletions(-)
diff --git a/src/org/torproject/onionoo/DocumentStore.java b/src/org/torproject/onionoo/DocumentStore.java
index e8b35b5..0bc2970 100644
--- a/src/org/torproject/onionoo/DocumentStore.java
+++ b/src/org/torproject/onionoo/DocumentStore.java
@@ -13,6 +13,7 @@ import java.io.FileWriter;
import java.io.IOException;
import java.util.Arrays;
import java.util.Map;
+import java.util.Scanner;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.Stack;
@@ -239,7 +240,93 @@ public class DocumentStore {
}
private NodeStatus retrieveNodeStatus(String fingerprint) {
- return this.cachedNodeStatuses.get(fingerprint);
+ if (this.cachedNodeStatuses.containsKey(fingerprint)) {
+ return this.cachedNodeStatuses.get(fingerprint);
+ } else if (this.listedArchivedNodeStatuses) {
+ return null;
+ }
+ /* TODO This is an evil hack to support looking up relays or bridges
+ * that haven't been running for a week without having to load
+ * 500,000 NodeStatus instances into memory. Maybe there's a better
+ * way? Or do we need to switch to a real database for this? */
+ DetailsDocument detailsDocument = this.retrieveDocumentFile(
+ DetailsDocument.class, false, fingerprint);
+ if (detailsDocument == null) {
+ return null;
+ }
+ try {
+ boolean isRelay = true, running = false;
+ String nickname = null, address = null, countryCode = null,
+ hostName = null, defaultPolicy = null, portList = null,
+ aSNumber = null, contact = null;
+ SortedSet<String> orAddressesAndPorts = new TreeSet<String>(),
+ exitAddresses = new TreeSet<String>(),
+ relayFlags = new TreeSet<String>();
+ long lastSeenMillis = -1L, consensusWeight = -1L,
+ lastRdnsLookup = -1L, firstSeenMillis = -1L,
+ lastChangedAddresses = -1L;
+ int orPort = 0, dirPort = 0;
+ Boolean recommendedVersion = null;
+ Scanner s = new Scanner(detailsDocument.getDocumentString());
+ while (s.hasNextLine()) {
+ String line = s.nextLine();
+ if (!line.contains(":")) {
+ continue;
+ }
+ String[] parts = line.split(":", 2);
+ String key = parts[0], value = parts[1];
+ if (key.equals("\"nickname\"")) {
+ if (!value.startsWith("\"") || !value.endsWith("\",")) {
+ return null;
+ }
+ nickname = value.substring(1, value.length() - 2);
+ } else if (key.equals("\"hashed_fingerprint\"")) {
+ isRelay = false;
+ } else if (key.equals("\"or_addresses\"")) {
+ if (!value.startsWith("[") || !value.endsWith("],")) {
+ return null;
+ }
+ for (String addressAndPort :
+ value.substring(1, value.length() - 2).split(",")) {
+ if (addressAndPort.length() < 2 ||
+ !addressAndPort.contains(":")) {
+ return null;
+ }
+ if (address == null) {
+ address = addressAndPort.substring(1,
+ addressAndPort.lastIndexOf(":"));
+ } else {
+ orAddressesAndPorts.add(addressAndPort);
+ }
+ }
+ } else if (key.equals("\"exit_addresses\"")) {
+ if (!value.startsWith("[") || !value.endsWith("],")) {
+ return null;
+ }
+ for (String addressPart :
+ value.substring(1, value.length() - 2).split(",")) {
+ exitAddresses.add(addressPart);
+ }
+ } else if (key.equals("\"running\"")) {
+ if (value.equals("true,")) {
+ running = true;
+ } else if (!value.equals("false,")) {
+ return null;
+ }
+ }
+ }
+ NodeStatus nodeStatus = new NodeStatus(isRelay, nickname,
+ fingerprint, address, orAddressesAndPorts, exitAddresses,
+ lastSeenMillis, orPort, dirPort, relayFlags, consensusWeight,
+ countryCode, hostName, lastRdnsLookup, defaultPolicy, portList,
+ firstSeenMillis, lastChangedAddresses, aSNumber, contact,
+ recommendedVersion);
+ nodeStatus.setRunning(running);
+ return nodeStatus;
+ } catch (Exception e) {
+ /* Play it safe and fall back to returning nothing. */
+ return null;
+ }
}
private <T extends Document> T retrieveDocumentFile(
diff --git a/src/org/torproject/onionoo/RequestHandler.java b/src/org/torproject/onionoo/RequestHandler.java
index 1efa5a0..67be625 100644
--- a/src/org/torproject/onionoo/RequestHandler.java
+++ b/src/org/torproject/onionoo/RequestHandler.java
@@ -15,8 +15,11 @@ public class RequestHandler {
private NodeIndex nodeIndex;
+ private DocumentStore documentStore;
+
public RequestHandler(NodeIndex nodeIndex) {
this.nodeIndex = nodeIndex;
+ this.documentStore = ApplicationFactory.getDocumentStore();
}
private String resourceType;
@@ -45,6 +48,11 @@ public class RequestHandler {
this.lookup = lookup;
}
+ private String fingerprint;
+ public void setFingerprint(String fingerprint) {
+ this.fingerprint = fingerprint;
+ }
+
private String country;
public void setCountry(String country) {
this.country = country;
@@ -111,6 +119,7 @@ public class RequestHandler {
this.filterByType();
this.filterByRunning();
this.filterBySearchTerms();
+ this.filterByLookup();
this.filterByFingerprint();
this.filterByCountryCode();
this.filterByASNumber();
@@ -252,7 +261,7 @@ public class RequestHandler {
}
}
- private void filterByFingerprint() {
+ private void filterByLookup() {
if (this.lookup == null) {
return;
}
@@ -269,6 +278,24 @@ public class RequestHandler {
}
}
+ private void filterByFingerprint() {
+ if (this.fingerprint == null) {
+ return;
+ }
+ this.filteredRelays.clear();
+ this.filteredBridges.clear();
+ String fingerprint = this.fingerprint;
+ NodeStatus entry = this.documentStore.retrieve(NodeStatus.class, true,
+ fingerprint);
+ if (entry != null) {
+ if (entry.isRelay()) {
+ this.filteredRelays.put(fingerprint, entry);
+ } else {
+ this.filteredBridges.put(fingerprint, entry);
+ }
+ }
+ }
+
private void filterByCountryCode() {
if (this.country == null) {
return;
diff --git a/src/org/torproject/onionoo/ResourceServlet.java b/src/org/torproject/onionoo/ResourceServlet.java
index f2f3005..1817504 100644
--- a/src/org/torproject/onionoo/ResourceServlet.java
+++ b/src/org/torproject/onionoo/ResourceServlet.java
@@ -146,9 +146,9 @@ public class ResourceServlet extends HttpServlet {
/* Make sure that the request doesn't contain any unknown
* parameters. */
Set<String> knownParameters = new HashSet<String>(Arrays.asList((
- "type,running,search,lookup,country,as,flag,first_seen_days,"
- + "last_seen_days,contact,order,limit,offset,fields").
- split(",")));
+ "type,running,search,lookup,fingerprint,country,as,flag,"
+ + "first_seen_days,last_seen_days,contact,order,limit,offset,"
+ + "fields").split(",")));
for (String parameterKey : parameterMap.keySet()) {
if (!knownParameters.contains(parameterKey)) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
@@ -190,14 +190,24 @@ public class ResourceServlet extends HttpServlet {
rh.setSearch(searchTerms);
}
if (parameterMap.containsKey("lookup")) {
- String fingerprintParameter = this.parseFingerprintParameter(
+ String lookupParameter = this.parseFingerprintParameter(
parameterMap.get("lookup"));
+ if (lookupParameter == null) {
+ response.sendError(HttpServletResponse.SC_BAD_REQUEST);
+ return;
+ }
+ String fingerprint = lookupParameter.toUpperCase();
+ rh.setLookup(fingerprint);
+ }
+ if (parameterMap.containsKey("fingerprint")) {
+ String fingerprintParameter = this.parseFingerprintParameter(
+ parameterMap.get("fingerprint"));
if (fingerprintParameter == null) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
return;
}
String fingerprint = fingerprintParameter.toUpperCase();
- rh.setLookup(fingerprint);
+ rh.setFingerprint(fingerprint);
}
if (parameterMap.containsKey("country")) {
String countryCodeParameter = this.parseCountryCodeParameter(
diff --git a/test/org/torproject/onionoo/ResourceServletTest.java b/test/org/torproject/onionoo/ResourceServletTest.java
index f5395ed..3b047c6 100644
--- a/test/org/torproject/onionoo/ResourceServletTest.java
+++ b/test/org/torproject/onionoo/ResourceServletTest.java
@@ -725,7 +725,7 @@ public class ResourceServletTest {
}
@Test()
- public void testSearchBridgeHashedHashedFingerprint() {
+ public void testLookupBridgeHashedHashedFingerprint() {
this.assertSummaryDocument(
"/summary?lookup=CE52F898DB3678BCE33FAC28C92774DE90D618B5", 0,
null, 1, new String[] { "gummy" });
@@ -739,6 +739,48 @@ public class ResourceServletTest {
}
@Test()
+ public void testLookupNonExistantFingerprint() {
+ this.assertSummaryDocument(
+ "/summary?lookup=0000000000000000000000000000000000000000", 0,
+ null, 0, null);
+ }
+
+ @Test()
+ public void testFingerprintRelayFingerprint() {
+ this.assertSummaryDocument(
+ "/summary?fingerprint=000C5F55BD4814B917CC474BD537F1A3B33CCE2A",
+ 1, new String[] { "TorkaZ" }, 0, null);
+ }
+
+ @Test()
+ public void testFingerprintRelayHashedFingerprint() {
+ this.assertSummaryDocument(
+ "/summary?fingerprint=5aa14c08d62913e0057a9ad5863b458c0ce94cee",
+ 0, null, 0, null);
+ }
+
+ @Test()
+ public void testFingerprintBridgeHashedFingerprint() {
+ this.assertSummaryDocument(
+ "/summary?fingerprint=1FEDE50ED8DBA1DD9F9165F78C8131E4A44AB756",
+ 0, null, 1, new String[] { "gummy" });
+ }
+
+ @Test()
+ public void testFingerprintBridgeHashedHashedFingerprint() {
+ this.assertSummaryDocument(
+ "/summary?fingerprint=CE52F898DB3678BCE33FAC28C92774DE90D618B5",
+ 0, null, 0, null);
+ }
+
+ @Test()
+ public void testFingerprintBridgeOriginalFingerprint() {
+ this.assertSummaryDocument(
+ "/summary?fingerprint=0010D49C6DA1E46A316563099F41BFE40B6C7183",
+ 0, null, 0, null);
+ }
+
+ @Test()
public void testCountryDe() {
this.assertSummaryDocument(
"/summary?country=de", 1, new String[] { "TorkaZ" }, 0, null);
diff --git a/web/index.html b/web/index.html
index 29673e9..afe4f88 100644
--- a/web/index.html
+++ b/web/index.html
@@ -174,8 +174,9 @@ below.</p>
<p>
The following methods each return a single document containing zero or
-more objects of relays and/or bridges that are currently running or that
-have been running in the past week.
+more objects of relays and/or bridges.
+By default, all relays and bridges are included that have been running in
+the past week.
</p>
<ul class="api-urls">
@@ -226,8 +227,12 @@ document</a></span>
<h4>Parameters</h4>
<p>
-Each of the methods above can be parameterized to select only a subset
-of relay and/or bridge documents to be included in the response.
+Each of the methods can be parameterized to select only a subset of relay
+and/or bridge documents that are currently running or that have been
+running in the past week.
+(The <strong>fingerprint</strong> parameter is special here, because it
+allows selecting a specific relay or bridge, regardless of whether it has
+been running in the past week.)
If multiple parameters are specified, they are combined using a logical
AND operation, meaning that only the intersection of relays and bridges
matching all parameters is returned.
@@ -293,6 +298,22 @@ Lookups are case-insensitive.
</li>
<li>
+<font color="blue"><b>fingerprint</b></font>
+<p>
+Return only the relay with the parameter value matching the fingerprint
+or the bridge with the parameter value matching the hashed fingerprint.
+Fingerprints must consist of 40 hex characters, case does not matter.
+This parameter is quite similar to the <strong>lookup</strong> parameter
+with two exceptions:
+(1) the provided relay fingerprint or hashed bridge fingerprint <i>must
+not</i> be hashed (again) using SHA-1;
+(2) the response will contain any matching relay or bridge regardless of
+whether they have been running in the past week.
+<font color="blue">Added on April 20, 2014.</font>
+</p>
+</li>
+
+<li>
<b>country</b>
<p>
Return only relays which are located in the
@@ -344,8 +365,8 @@ last been seen at least x and at most y days ago.
Accepted short forms are "x", "x-", and "-y" which are interpreted as
"x-x", "x-infinity", and "0-y".
Note that relays and bridges that haven't been running in the past week
-are never included in results, so that setting x to 8 or higher will
-always lead to an empty result set.
+are not included in results, so that setting x to 8 or higher will lead to
+an empty result set.
</p>
</li>
@@ -609,8 +630,6 @@ running in the last bridge network status.
</h3>
<p>
-Details documents contain all known details of relays and bridges that
-have been running in the past week.
Details documents are based on the network statuses published by the Tor
directories and the server descriptors published by relays and bridges.
Details documents contain the following fields:
@@ -1387,8 +1406,6 @@ graphs.
<p>
Bandwidth documents contain aggregate statistics of a relay's or
bridge's consumed bandwidth for different time intervals.
-Bandwidth documents are available for all relays and bridges that have
-been running in the past week.
Bandwidth documents contain the following fields:
</p>
@@ -1551,7 +1568,7 @@ The specification of graph history objects is similar to those in the
Weights documents contain aggregate statistics of a relay's probability
to be selected by clients for building paths.
Weights documents contain different time intervals and are available for
-all relays that have been running in the past week.
+relays only.
Weights documents contain the following fields:
</p>
@@ -1725,7 +1742,7 @@ Clients documents contain estimates of the average number of clients
connecting to a bridge every day.
There are no clients documents available for relays, just for bridges.
Clients documents contain different time intervals and are available for
-all bridges that have been running in the past week.
+bridges only.
Clients documents contain the following fields:
</p>
@@ -1894,7 +1911,7 @@ It might be removed in the future without notice.</font>
<font color="blue">Added on March 10, 2014.</font>
Uptime documents contain fractional uptimes of relays and bridges.
Uptime documents contain different time intervals and are available for
-all relays and bridges that have been running in the past week.
+relays and bridges.
Uptime documents contain the following fields:
</p>
1
0

[doctor/java] Replace <br> with newline in relay list and format with CSS.
by karsten@torproject.org 20 Apr '14
by karsten@torproject.org 20 Apr '14
20 Apr '14
commit ea9196ead7f06176bd2860102b43947d9166b662
Author: Michael Wolf <mikewolf(a)riseup.net>
Date: Sun Apr 20 03:39:29 2014 -0400
Replace <br> with newline in relay list and format with CSS.
* Implements part 4 of ticket #11563
---
src/org/torproject/doctor/MetricsWebsiteReport.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/org/torproject/doctor/MetricsWebsiteReport.java b/src/org/torproject/doctor/MetricsWebsiteReport.java
index f6f59f8..28d9e9a 100644
--- a/src/org/torproject/doctor/MetricsWebsiteReport.java
+++ b/src/org/torproject/doctor/MetricsWebsiteReport.java
@@ -130,6 +130,9 @@ public class MetricsWebsiteReport {
+ "height:3em;\n"
+ "vertical-align:bottom;\n"
+ "}\n"
+ + "#relay-list td {\n"
+ + "white-space:pre;\n"
+ + "}\n"
+ "</style>\n"
+ "<div class=\"center\">\n"
+ "<div class=\"main-column\">\n"
@@ -678,7 +681,7 @@ public class MetricsWebsiteReport {
+ "</ul>\n"
+ "<br>\n"
+ "<table border=\"0\" cellpadding=\"4\" "
- + "cellspacing=\"0\" summary=\"\">\n"
+ + "cellspacing=\"0\" id=\"relay-list\" summary=\"\">\n"
+ "<colgroup>\n"
+ "<col width=\"120\">\n"
+ "<col width=\"80\">\n");
@@ -759,7 +762,7 @@ public class MetricsWebsiteReport {
this.bw.write("<td>");
int flagsWritten = 0;
for (String flag : relevantFlags) {
- this.bw.write(flagsWritten++ > 0 ? "<br>" : "");
+ this.bw.write(flagsWritten++ > 0 ? "\n" : "");
if (flags.contains(flag)) {
if (consensusFlags == null ||
consensusFlags.contains(flag)) {
1
0

[translation/liveusb-creator_completed] Update translations for liveusb-creator_completed
by translation@torproject.org 20 Apr '14
by translation@torproject.org 20 Apr '14
20 Apr '14
commit 528acc8ff0d48c81049b3c7114839a2e3c8ab55e
Author: Translation commit bot <translation(a)torproject.org>
Date: Sun Apr 20 09:45:23 2014 +0000
Update translations for liveusb-creator_completed
---
fr/fr.po | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/fr/fr.po b/fr/fr.po
index f75a8b2..47554c5 100644
--- a/fr/fr.po
+++ b/fr/fr.po
@@ -20,7 +20,7 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-04-16 21:40+0200\n"
-"PO-Revision-Date: 2014-04-19 17:25+0000\n"
+"PO-Revision-Date: 2014-04-20 09:41+0000\n"
"Last-Translator: bassmax\n"
"Language-Team: French (http://www.transifex.com/projects/p/torproject/language/fr/)\n"
"MIME-Version: 1.0\n"
@@ -137,7 +137,7 @@ msgstr "Cloner\n&&\nMettre à jour"
#: ../liveusb/creator.py:400
#, python-format
msgid "Creating %sMB persistent overlay"
-msgstr "Création du stockage persistant de %s MB"
+msgstr "Création du volume persistant de %s MB"
#: ../liveusb/gui.py:567
msgid ""
@@ -194,7 +194,7 @@ msgstr "Extraction en cours de l'image Live vers le périphérique destination..
#: ../liveusb/creator.py:1063
#, python-format
msgid "Formatting %(device)s as FAT32"
-msgstr "Création d'un système de fichiers FAT32 sur %(device)s"
+msgstr "Formattage de %(device)s en FAT32"
#: ../liveusb/creator.py:140
msgid "ISO MD5 checksum passed"
@@ -229,7 +229,7 @@ msgstr "L'installation est terminée. Appuyez sur OK pour fermer ce programme."
#: ../liveusb/creator.py:916 ../liveusb/creator.py:1239
msgid "Installing bootloader..."
-msgstr "Installation du chargeur de démarrage..."
+msgstr "Installation du bootloader..."
#: ../liveusb/gui.py:284
msgid "LiveUSB creation failed!"
@@ -266,7 +266,7 @@ msgstr "Pas assez d'espace libre sur le périphérique."
#: ../liveusb/gui.py:554
msgid "Partition is FAT16; Restricting overlay size to 2G"
-msgstr "La partition est de type FAT16, la taille de stockage est donc restreinte à 2 Go"
+msgstr "La partition est de type FAT16, la taille du volume est donc restreinte à 2 Go"
#: ../liveusb/gui.py:550
msgid "Partition is FAT32; Restricting overlay size to 4G"
@@ -447,13 +447,13 @@ msgstr "Impossible d'enlever le fichier du système d'exploitation Live précéd
#: ../liveusb/creator.py:1115
msgid ""
"Unable to reset MBR. You may not have the `syslinux` package installed."
-msgstr "Impossible de réinitialiser le MBR. Vous n'avez peut-être pas installé le paquet `syslinux` ?"
+msgstr "Impossible de réinitialiser le MBR. Le paquet `syslinux` n'est sans doute pas installé."
#: ../liveusb/gui.py:802
msgid ""
"Unable to use the selected file. You may have better luck if you move your "
"ISO to the root of your drive (ie: C:\\)"
-msgstr "Impossible d'utiliser le fichier sélectionné. Vous devriez avoir plus de chance en déplacant l'ISO à la racine de votre disque (par exemple : C:\\)"
+msgstr "Impossible d'utiliser le fichier sélectionné. Vous devriez avoir plus de chance en déplacant l'ISO à la racine de votre disque (i.e. : C:\\)"
#: ../liveusb/creator.py:697
#, python-format
@@ -546,7 +546,7 @@ msgid ""
"Warning: The Master Boot Record on your device does not match your system's "
"syslinux MBR. If you have trouble booting this stick, try running the "
"liveusb-creator with the --reset-mbr option."
-msgstr "Attention : le « Master Boot Record » de votre périphérique ne correspond pas à celui de votre syslinux. Si vous avez des problèmes à démarrer sur cette clé USB, essayer de lancer usb-creator avec l'option « --reset-mbr »."
+msgstr "Attention : le « Master Boot Record » de votre périphérique ne correspond pas à celui de votre syslinux. Si vous avez des problèmes pour démarrer sur cette clé USB, essayer de lancer usb-creator avec l'option « --reset-mbr »."
#: ../liveusb/gui.py:392
msgid ""
1
0

[translation/liveusb-creator] Update translations for liveusb-creator
by translation@torproject.org 20 Apr '14
by translation@torproject.org 20 Apr '14
20 Apr '14
commit e4dd3ed567ad2eece2dc0e8ea818bb25b2c7a7e5
Author: Translation commit bot <translation(a)torproject.org>
Date: Sun Apr 20 09:45:18 2014 +0000
Update translations for liveusb-creator
---
fr/fr.po | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/fr/fr.po b/fr/fr.po
index f75a8b2..47554c5 100644
--- a/fr/fr.po
+++ b/fr/fr.po
@@ -20,7 +20,7 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-04-16 21:40+0200\n"
-"PO-Revision-Date: 2014-04-19 17:25+0000\n"
+"PO-Revision-Date: 2014-04-20 09:41+0000\n"
"Last-Translator: bassmax\n"
"Language-Team: French (http://www.transifex.com/projects/p/torproject/language/fr/)\n"
"MIME-Version: 1.0\n"
@@ -137,7 +137,7 @@ msgstr "Cloner\n&&\nMettre à jour"
#: ../liveusb/creator.py:400
#, python-format
msgid "Creating %sMB persistent overlay"
-msgstr "Création du stockage persistant de %s MB"
+msgstr "Création du volume persistant de %s MB"
#: ../liveusb/gui.py:567
msgid ""
@@ -194,7 +194,7 @@ msgstr "Extraction en cours de l'image Live vers le périphérique destination..
#: ../liveusb/creator.py:1063
#, python-format
msgid "Formatting %(device)s as FAT32"
-msgstr "Création d'un système de fichiers FAT32 sur %(device)s"
+msgstr "Formattage de %(device)s en FAT32"
#: ../liveusb/creator.py:140
msgid "ISO MD5 checksum passed"
@@ -229,7 +229,7 @@ msgstr "L'installation est terminée. Appuyez sur OK pour fermer ce programme."
#: ../liveusb/creator.py:916 ../liveusb/creator.py:1239
msgid "Installing bootloader..."
-msgstr "Installation du chargeur de démarrage..."
+msgstr "Installation du bootloader..."
#: ../liveusb/gui.py:284
msgid "LiveUSB creation failed!"
@@ -266,7 +266,7 @@ msgstr "Pas assez d'espace libre sur le périphérique."
#: ../liveusb/gui.py:554
msgid "Partition is FAT16; Restricting overlay size to 2G"
-msgstr "La partition est de type FAT16, la taille de stockage est donc restreinte à 2 Go"
+msgstr "La partition est de type FAT16, la taille du volume est donc restreinte à 2 Go"
#: ../liveusb/gui.py:550
msgid "Partition is FAT32; Restricting overlay size to 4G"
@@ -447,13 +447,13 @@ msgstr "Impossible d'enlever le fichier du système d'exploitation Live précéd
#: ../liveusb/creator.py:1115
msgid ""
"Unable to reset MBR. You may not have the `syslinux` package installed."
-msgstr "Impossible de réinitialiser le MBR. Vous n'avez peut-être pas installé le paquet `syslinux` ?"
+msgstr "Impossible de réinitialiser le MBR. Le paquet `syslinux` n'est sans doute pas installé."
#: ../liveusb/gui.py:802
msgid ""
"Unable to use the selected file. You may have better luck if you move your "
"ISO to the root of your drive (ie: C:\\)"
-msgstr "Impossible d'utiliser le fichier sélectionné. Vous devriez avoir plus de chance en déplacant l'ISO à la racine de votre disque (par exemple : C:\\)"
+msgstr "Impossible d'utiliser le fichier sélectionné. Vous devriez avoir plus de chance en déplacant l'ISO à la racine de votre disque (i.e. : C:\\)"
#: ../liveusb/creator.py:697
#, python-format
@@ -546,7 +546,7 @@ msgid ""
"Warning: The Master Boot Record on your device does not match your system's "
"syslinux MBR. If you have trouble booting this stick, try running the "
"liveusb-creator with the --reset-mbr option."
-msgstr "Attention : le « Master Boot Record » de votre périphérique ne correspond pas à celui de votre syslinux. Si vous avez des problèmes à démarrer sur cette clé USB, essayer de lancer usb-creator avec l'option « --reset-mbr »."
+msgstr "Attention : le « Master Boot Record » de votre périphérique ne correspond pas à celui de votre syslinux. Si vous avez des problèmes pour démarrer sur cette clé USB, essayer de lancer usb-creator avec l'option « --reset-mbr »."
#: ../liveusb/gui.py:392
msgid ""
1
0

20 Apr '14
commit 6af98a8ac813a8b34052539dbad0f71797e39908
Author: Michael Wolf <mikewolf(a)riseup.net>
Date: Sat Apr 19 15:06:31 2014 -0400
Remove leading spaces to reduce HTML size
* Remove leading spaces (Implements part 3 of ticket #11563)
* Improve alignment of HTML in source
---
.../torproject/doctor/MetricsWebsiteReport.java | 650 ++++++++++----------
1 file changed, 325 insertions(+), 325 deletions(-)
diff --git a/src/org/torproject/doctor/MetricsWebsiteReport.java b/src/org/torproject/doctor/MetricsWebsiteReport.java
index 428bee2..f6f59f8 100644
--- a/src/org/torproject/doctor/MetricsWebsiteReport.java
+++ b/src/org/torproject/doctor/MetricsWebsiteReport.java
@@ -102,52 +102,52 @@ public class MetricsWebsiteReport {
this.bw.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 "
+ "Transitional//EN\">\n"
+ "<html>\n"
- + " <head>\n"
- + " <title>Consensus health</title>\n"
- + " <meta http-equiv=\"content-type\" content=\"text/html; "
- + "charset=ISO-8859-1\">\n"
- + " <link href=\"/css/stylesheet-ltr.css\" type=\"text/css\" "
+ + "<head>\n"
+ + "<title>Consensus health</title>\n"
+ + "<meta http-equiv=\"content-type\" content=\"text/html; "
+ + "charset=ISO-8859-1\">\n"
+ + "<link href=\"/css/stylesheet-ltr.css\" type=\"text/css\" "
+ "rel=\"stylesheet\">\n"
- + " <link href=\"/images/favicon.ico\" "
+ + "<link href=\"/images/favicon.ico\" "
+ "type=\"image/x-icon\" rel=\"shortcut icon\">\n"
- + " </head>\n"
- + " <body>\n"
- + " <style>\n"
- + " tr:nth-child(2n) {\n"
- + " background-color:#eeeeee;\n"
- + " }\n"
- + " .oiv {\n"
- + " color:red;\n"
- + " }\n"
- + " .oic {\n"
- + " color:gray;\n"
- + " text-decoration:line-through;\n"
- + " }\n"
- + " .ic {\n"
- + " color:blue;\n"
- + " }\n"
- + " .tbl-hdr {\n"
- + " height:3em;\n"
- + " vertical-align:bottom;\n"
- + " }\n"
- + " </style>\n"
- + " <div class=\"center\">\n"
- + " <div class=\"main-column\">\n"
- + " <h2>Consensus Health</h2>\n"
- + " <br>\n"
- + " <p>This page shows statistics about the current "
+ + "</head>\n"
+ + "<body>\n"
+ + "<style>\n"
+ + "tr:nth-child(2n) {\n"
+ + "background-color:#eeeeee;\n"
+ + "}\n"
+ + ".oiv {\n"
+ + "color:red;\n"
+ + "}\n"
+ + ".oic {\n"
+ + "color:gray;\n"
+ + "text-decoration:line-through;\n"
+ + "}\n"
+ + ".ic {\n"
+ + "color:blue;\n"
+ + "}\n"
+ + ".tbl-hdr {\n"
+ + "height:3em;\n"
+ + "vertical-align:bottom;\n"
+ + "}\n"
+ + "</style>\n"
+ + "<div class=\"center\">\n"
+ + "<div class=\"main-column\">\n"
+ + "<h2>Consensus Health</h2>\n"
+ + "<br>\n"
+ + "<p>This page shows statistics about the current "
+ "consensus and votes to facilitate debugging of the "
+ "directory consensus process.</p>\n");
}
/* Write the valid-after time of the downloaded consensus. */
private void writeValidAfterTime() throws IOException {
- this.bw.write(" <br>\n"
- + " <a name=\"validafter\">\n"
- + " <h3><a href=\"#validafter\" class=\"anchor\">"
+ this.bw.write("<br>\n"
+ + "<a name=\"validafter\">\n"
+ + "<h3><a href=\"#validafter\" class=\"anchor\">"
+ "Valid-after time</a></h3>\n"
- + " <br>\n"
- + " <p>Consensus was published ");
+ + "<br>\n"
+ + "<p>Consensus was published ");
if (this.downloadedConsensus.getValidAfterMillis() <
System.currentTimeMillis() - 3L * 60L * 60L * 1000L) {
this.bw.write("<span class=\"oiv\">"
@@ -163,59 +163,58 @@ public class MetricsWebsiteReport {
/* Write the lists of known flags. */
private void writeKnownFlags() throws IOException {
- this.bw.write(" <br>\n"
- + " <a name=\"knownflags\">\n"
- + " <h3><a href=\"#knownflags\" class=\"anchor\">Known "
+ this.bw.write("<br>\n"
+ + "<a name=\"knownflags\">\n"
+ + "<h3><a href=\"#knownflags\" class=\"anchor\">Known "
+ "flags</a></h3>\n"
- + " <br>\n"
- + " <table border=\"0\" cellpadding=\"4\" "
+ + "<br>\n"
+ + "<table border=\"0\" cellpadding=\"4\" "
+ "cellspacing=\"0\" summary=\"\">\n"
- + " <colgroup>\n"
- + " <col width=\"160\">\n"
- + " <col width=\"640\">\n"
- + " </colgroup>\n");
+ + "<colgroup>\n"
+ + "<col width=\"160\">\n"
+ + "<col width=\"640\">\n"
+ + "</colgroup>\n");
if (this.downloadedVotes.size() < 1) {
- this.bw.write(" <tr><td>(No votes.)</td><td></td></tr>\n");
+ this.bw.write("<tr><td>(No votes.)</td><td></td></tr>\n");
} else {
for (RelayNetworkStatusVote vote : this.downloadedVotes.values()) {
- this.bw.write(" <tr>\n"
- + " <td>" + vote.getNickname() + "</td>\n"
- + " <td>known-flags");
+ this.bw.write("<tr>\n"
+ + "<td>" + vote.getNickname() + "</td>\n"
+ + "<td>known-flags");
for (String knownFlag : vote.getKnownFlags()) {
this.bw.write(" " + knownFlag);
}
- this.bw.write("</td>\n"
- + " </tr>\n");
+ this.bw.write( "</td>\n"
+ + "</tr>\n");
}
}
- this.bw.write(" <tr>\n"
- + " <td class=\"ic\">consensus</td>\n"
- + " <td class=\"ic\">known-flags");
+ this.bw.write( "<tr>\n"
+ + "<td class=\"ic\">consensus</td>\n"
+ + "<td class=\"ic\">known-flags");
for (String knownFlag : this.downloadedConsensus.getKnownFlags()) {
this.bw.write(" " + knownFlag);
}
- this.bw.write("</td>\n"
- + " </tr>\n"
- + " </table>\n");
+ this.bw.write( "</td>\n"
+ + "</tr>\n"
+ + "</table>\n");
}
/* Write the number of relays voted about. */
private void writeNumberOfRelaysVotedAbout() throws IOException {
- this.bw.write(" <br>\n"
- + " <a name=\"numberofrelays\">\n"
- + " <h3><a href=\"#numberofrelays\" class=\"anchor\">"
+ this.bw.write("<br>\n"
+ + "<a name=\"numberofrelays\">\n"
+ + "<h3><a href=\"#numberofrelays\" class=\"anchor\">"
+ "Number of relays voted about</a></h3>\n"
- + " <br>\n"
- + " <table border=\"0\" cellpadding=\"4\" "
+ + "<br>\n"
+ + "<table border=\"0\" cellpadding=\"4\" "
+ "cellspacing=\"0\" summary=\"\">\n"
- + " <colgroup>\n"
- + " <col width=\"160\">\n"
- + " <col width=\"320\">\n"
- + " <col width=\"320\">\n"
- + " </colgroup>\n");
+ + "<colgroup>\n"
+ + "<col width=\"160\">\n"
+ + "<col width=\"320\">\n"
+ + "<col width=\"320\">\n"
+ + "</colgroup>\n");
if (this.downloadedVotes.size() < 1) {
- this.bw.write(" <tr><td>(No votes.)</td><td></td><td></td>"
- + "</tr>\n");
+ this.bw.write("<tr><td>(No votes.)</td><td></td><td></td></tr>\n");
} else {
for (RelayNetworkStatusVote vote : this.downloadedVotes.values()) {
int runningRelays = 0;
@@ -225,12 +224,12 @@ public class MetricsWebsiteReport {
runningRelays++;
}
}
- this.bw.write(" <tr>\n"
- + " <td>" + vote.getNickname() + "</td>\n"
- + " <td>" + vote.getStatusEntries().size()
+ this.bw.write("<tr>\n"
+ + "<td>" + vote.getNickname() + "</td>\n"
+ + "<td>" + vote.getStatusEntries().size()
+ " total</td>\n"
- + " <td>" + runningRelays + " Running</td>\n"
- + " </tr>\n");
+ + "<td>" + runningRelays + " Running</td>\n"
+ + "</tr>\n");
}
}
int runningRelays = 0;
@@ -240,82 +239,82 @@ public class MetricsWebsiteReport {
runningRelays++;
}
}
- this.bw.write(" <tr>\n"
- + " <td class=\"ic\">consensus</td>\n"
- + " <td/>\n"
- + " <td class=\"ic\">" + runningRelays
+ this.bw.write( "<tr>\n"
+ + "<td class=\"ic\">consensus</td>\n"
+ + "<td/>\n"
+ + "<td class=\"ic\">" + runningRelays
+ " Running</td>\n"
- + " </tr>\n"
- + " </table>\n");
+ + "</tr>\n"
+ + "</table>\n");
}
/* Write the supported consensus methods of directory authorities and
* the resulting consensus method. */
private void writeConsensusMethods() throws IOException {
- this.bw.write(" <br>\n"
- + " <a name=\"consensusmethods\">\n"
- + " <h3><a href=\"#consensusmethods\" class=\"anchor\">"
+ this.bw.write("<br>\n"
+ + "<a name=\"consensusmethods\">\n"
+ + "<h3><a href=\"#consensusmethods\" class=\"anchor\">"
+ "Consensus methods</a></h3>\n"
- + " <br>\n"
- + " <table border=\"0\" cellpadding=\"4\" "
+ + "<br>\n"
+ + "<table border=\"0\" cellpadding=\"4\" "
+ "cellspacing=\"0\" summary=\"\">\n"
- + " <colgroup>\n"
- + " <col width=\"160\">\n"
- + " <col width=\"640\">\n"
- + " </colgroup>\n");
+ + "<colgroup>\n"
+ + "<col width=\"160\">\n"
+ + "<col width=\"640\">\n"
+ + "</colgroup>\n");
if (this.downloadedVotes.size() < 1) {
- this.bw.write(" <tr><td>(No votes.)</td><td></td></tr>\n");
+ this.bw.write("<tr><td>(No votes.)</td><td></td></tr>\n");
} else {
for (RelayNetworkStatusVote vote : this.downloadedVotes.values()) {
List<Integer> consensusMethods = vote.getConsensusMethods();
if (consensusMethods.contains(
this.downloadedConsensus.getConsensusMethod())) {
- this.bw.write(" <tr>\n"
- + " <td>" + vote.getNickname() + "</td>\n"
- + " <td>consensus-methods");
+ this.bw.write("<tr>\n"
+ + "<td>" + vote.getNickname() + "</td>\n"
+ + "<td>consensus-methods");
for (int consensusMethod : consensusMethods) {
this.bw.write(" " + String.valueOf(consensusMethod));
}
- this.bw.write("</td>\n"
- + " </tr>\n");
+ this.bw.write( "</td>\n"
+ + "</tr>\n");
} else {
- this.bw.write(" <tr>\n"
- + " <td><span class=\"oiv\">"
+ this.bw.write("<tr>\n"
+ + "<td><span class=\"oiv\">"
+ vote.getNickname() + "</span></td>\n"
- + " <td><span class=\"oiv\">"
+ + "<td><span class=\"oiv\">"
+ "consensus-methods");
for (int consensusMethod : consensusMethods) {
this.bw.write(" " + String.valueOf(consensusMethod));
}
- this.bw.write("</span></td>\n"
- + " </tr>\n");
+ this.bw.write( "</span></td>\n"
+ + "</tr>\n");
}
}
}
- this.bw.write(" <tr>\n"
- + " <td class=\"ic\">consensus</td>\n"
- + " <td class=\"ic\">consensus-method "
+ this.bw.write( "<tr>\n"
+ + "<td class=\"ic\">consensus</td>\n"
+ + "<td class=\"ic\">consensus-method "
+ this.downloadedConsensus.getConsensusMethod()
- + "</td>\n"
- + " </tr>\n"
- + " </table>\n");
+ + "</td>\n"
+ + "</tr>\n"
+ + "</table>\n");
}
/* Write recommended versions. */
private void writeRecommendedVersions() throws IOException {
- this.bw.write(" <br>\n"
- + " <a name=\"recommendedversions\">\n"
- + " <h3><a href=\"#recommendedversions\" class=\"anchor\">"
+ this.bw.write("<br>\n"
+ + "<a name=\"recommendedversions\">\n"
+ + "<h3><a href=\"#recommendedversions\" class=\"anchor\">"
+ "Recommended versions</a></h3>\n"
- + " <br>\n"
- + " <table border=\"0\" cellpadding=\"4\" "
+ + "<br>\n"
+ + "<table border=\"0\" cellpadding=\"4\" "
+ "cellspacing=\"0\" summary=\"\">\n"
- + " <colgroup>\n"
- + " <col width=\"160\">\n"
- + " <col width=\"640\">\n"
- + " </colgroup>\n");
+ + "<colgroup>\n"
+ + "<col width=\"160\">\n"
+ + "<col width=\"640\">\n"
+ + "</colgroup>\n");
if (this.downloadedVotes.size() < 1) {
- this.bw.write(" <tr><td>(No votes.)</td><td></td></tr>\n");
+ this.bw.write("<tr><td>(No votes.)</td><td></td></tr>\n");
} else {
for (RelayNetworkStatusVote vote : this.downloadedVotes.values()) {
List<String> voteRecommendedClientVersions =
@@ -323,27 +322,28 @@ public class MetricsWebsiteReport {
if (voteRecommendedClientVersions != null) {
if (downloadedConsensus.getRecommendedClientVersions().equals(
voteRecommendedClientVersions)) {
- this.bw.write(" <tr>\n"
- + " <td>" + vote.getNickname() + "</td>\n"
- + " <td>client-versions ");
+ this.bw.write("<tr>\n"
+ + "<td>" + vote.getNickname() + "</td>\n"
+ + "<td>client-versions ");
int i = 0;
for (String version : voteRecommendedClientVersions) {
this.bw.write((i++ > 0 ? "," : "") + version);
}
- this.bw.write("</td>\n"
- + " </tr>\n");
+ this.bw.write( "</td>\n"
+ + "</tr>\n");
} else {
- this.bw.write(" <tr>\n"
- + " <td><span class=\"oiv\">"
+ this.bw.write("<tr>\n"
+ + "<td><span class=\"oiv\">"
+ vote.getNickname()
+ "</span></td>\n"
- + " <td><span class=\"oiv\">client-versions ");
+ + "<td><span class=\"oiv\">client-versions ");
int i = 0;
for (String version : voteRecommendedClientVersions) {
this.bw.write((i++ > 0 ? "," : "") + version);
}
- this.bw.write("</span></td>\n"
- + " </tr>\n");
+ this.bw.write( "</span>"
+ + "</td>\n"
+ + "</tr>\n");
}
}
List<String> voteRecommendedServerVersions =
@@ -351,67 +351,67 @@ public class MetricsWebsiteReport {
if (voteRecommendedServerVersions != null) {
if (downloadedConsensus.getRecommendedServerVersions().equals(
voteRecommendedServerVersions)) {
- this.bw.write(" <tr>\n"
- + " <td></td>\n"
- + " <td>server-versions ");
+ this.bw.write("<tr>\n"
+ + "<td></td>\n"
+ + "<td>server-versions ");
int i = 0;
for (String version : voteRecommendedServerVersions) {
this.bw.write((i++ > 0 ? "," : "") + version);
}
- this.bw.write("</td>\n"
- + " </tr>\n");
+ this.bw.write( "</td>\n"
+ + "</tr>\n");
} else {
- this.bw.write(" <tr>\n"
- + " <td></td>\n"
- + " <td><span class=\"oiv\">server-versions ");
+ this.bw.write("<tr>\n"
+ + "<td></td>\n"
+ + "<td><span class=\"oiv\">server-versions ");
int i = 0;
for (String version : voteRecommendedServerVersions) {
this.bw.write((i++ > 0 ? "," : "") + version);
}
this.bw.write("</span></td>\n"
- + " </tr>\n");
+ + "</tr>\n");
}
}
}
}
- this.bw.write(" <tr>\n"
- + " <td class=\"ic\">consensus</td>\n"
- + " <td class=\"ic\">client-versions ");
+ this.bw.write( "<tr>\n"
+ + "<td class=\"ic\">consensus</td>\n"
+ + "<td class=\"ic\">client-versions ");
int i = 0;
for (String version :
downloadedConsensus.getRecommendedClientVersions()) {
this.bw.write((i++ > 0 ? "," : "") + version);
}
- this.bw.write("</td>\n"
- + " </tr>\n"
- + " <tr>\n"
- + " <td></td>\n"
- + " <td class=\"ic\">server-versions ");
+ this.bw.write( "</td>\n"
+ + "</tr>\n"
+ + "<tr>\n"
+ + "<td></td>\n"
+ + "<td class=\"ic\">server-versions ");
i = 0;
for (String version :
downloadedConsensus.getRecommendedServerVersions()) {
this.bw.write((i++ > 0 ? "," : "") + version);
}
- this.bw.write("</td>\n"
- + " </tr>\n"
- + " </table>\n");
+ this.bw.write( "</td>\n"
+ + "</tr>\n"
+ + "</table>\n");
}
/* Write consensus parameters. */
private void writeConsensusParameters() throws IOException {
- this.bw.write(" <br>\n"
- + " <a name=\"consensusparams\">\n"
- + " <h3><a href=\"#consensusparams\" class=\"anchor\">"
+ this.bw.write("<br>\n"
+ + "<a name=\"consensusparams\">\n"
+ + "<h3><a href=\"#consensusparams\" class=\"anchor\">"
+ "Consensus parameters</a></h3>\n"
- + " <br>\n"
- + " <table border=\"0\" cellpadding=\"4\" "
+ + "<br>\n"
+ + "<table border=\"0\" cellpadding=\"4\" "
+ "cellspacing=\"0\" summary=\"\">\n"
- + " <colgroup>\n"
- + " <col width=\"160\">\n"
- + " <col width=\"640\">\n"
- + " </colgroup>\n");
+ + "<colgroup>\n"
+ + "<col width=\"160\">\n"
+ + "<col width=\"640\">\n"
+ + "</colgroup>\n");
if (this.downloadedVotes.size() < 1) {
- this.bw.write(" <tr><td>(No votes.)</td><td></td></tr>\n");
+ this.bw.write("<tr><td>(No votes.)</td><td></td></tr>\n");
} else {
Set<String> validParameters = new HashSet<String>(Arrays.asList(
("circwindow,CircuitPriorityHalflifeMsec,refuseunknownexits,"
@@ -440,81 +440,81 @@ public class MetricsWebsiteReport {
}
}
if (conflictOrInvalid) {
- this.bw.write(" <tr>\n"
- + " <td><span class=\"oiv\">"
+ this.bw.write("<tr>\n"
+ + "<td><span class=\"oiv\">"
+ vote.getNickname() + "</span></td>\n"
- + " <td><span class=\"oiv\">params");
+ + "<td><span class=\"oiv\">params");
for (Map.Entry<String, Integer> e :
voteConsensusParams.entrySet()) {
this.bw.write(" " + e.getKey() + "=" + e.getValue());
}
- this.bw.write("</span></td>\n"
- + " </tr>\n");
+ this.bw.write( "</span></td>\n"
+ + "</tr>\n");
} else {
- this.bw.write(" <tr>\n"
- + " <td>" + vote.getNickname() + "</td>\n"
- + " <td>params");
+ this.bw.write("<tr>\n"
+ + "<td>" + vote.getNickname() + "</td>\n"
+ + "<td>params");
for (Map.Entry<String, Integer> e :
voteConsensusParams.entrySet()) {
this.bw.write(" " + e.getKey() + "=" + e.getValue());
}
- this.bw.write("</td>\n"
- + " </tr>\n");
+ this.bw.write( "</td>\n"
+ + "</tr>\n");
}
}
}
- this.bw.write(" <tr>\n"
- + " <td class=\"ic\">consensus</td>\n"
- + " <td class=\"ic\">params");
+ this.bw.write( "<tr>\n"
+ + "<td class=\"ic\">consensus</td>\n"
+ + "<td class=\"ic\">params");
for (Map.Entry<String, Integer> e :
this.downloadedConsensus.getConsensusParams().entrySet()) {
this.bw.write(" " + e.getKey() + "=" + e.getValue());
}
- this.bw.write("</td>\n"
- + " </tr>\n"
- + " </table>\n");
+ this.bw.write( "</td>\n"
+ + "</tr>\n"
+ + "</table>\n");
}
/* Write authority keys and their expiration dates. */
private void writeAuthorityKeys() throws IOException {
- this.bw.write(" <br>\n"
- + " <a name=\"authoritykeys\">\n"
- + " <h3><a href=\"#authoritykeys\" class=\"anchor\">"
+ this.bw.write("<br>\n"
+ + "<a name=\"authoritykeys\">\n"
+ + "<h3><a href=\"#authoritykeys\" class=\"anchor\">"
+ "Authority keys</a></h3>\n"
- + " <br>\n"
- + " <table border=\"0\" cellpadding=\"4\" "
+ + "<br>\n"
+ + "<table border=\"0\" cellpadding=\"4\" "
+ "cellspacing=\"0\" summary=\"\">\n"
- + " <colgroup>\n"
- + " <col width=\"160\">\n"
- + " <col width=\"640\">\n"
- + " </colgroup>\n");
+ + "<colgroup>\n"
+ + "<col width=\"160\">\n"
+ + "<col width=\"640\">\n"
+ + "</colgroup>\n");
if (this.downloadedVotes.size() < 1) {
- this.bw.write(" <tr><td>(No votes.)</td><td></td></tr>\n");
+ this.bw.write("<tr><td>(No votes.)</td><td></td></tr>\n");
} else {
for (RelayNetworkStatusVote vote : this.downloadedVotes.values()) {
long voteDirKeyExpiresMillis = vote.getDirKeyExpiresMillis();
if (voteDirKeyExpiresMillis - 14L * 24L * 60L * 60L * 1000L <
System.currentTimeMillis()) {
- this.bw.write(" <tr>\n"
- + " <td><span class=\"oiv\">"
+ this.bw.write("<tr>\n"
+ + "<td><span class=\"oiv\">"
+ vote.getNickname() + "</span></td>\n"
- + " <td><span class=\"oiv\">dir-key-expires "
+ + "<td><span class=\"oiv\">dir-key-expires "
+ dateTimeFormat.format(voteDirKeyExpiresMillis)
+ "</span></td>\n"
- + " </tr>\n");
+ + "</tr>\n");
} else {
- this.bw.write(" <tr>\n"
- + " <td>" + vote.getNickname() + "</td>\n"
- + " <td>dir-key-expires "
+ this.bw.write("<tr>\n"
+ + "<td>" + vote.getNickname() + "</td>\n"
+ + "<td>dir-key-expires "
+ dateTimeFormat.format(voteDirKeyExpiresMillis)
+ "</td>\n"
- + " </tr>\n");
+ + "</tr>\n");
}
}
}
- this.bw.write(" </table>\n"
- + " <br>\n"
- + " <p><i>Note that expiration dates of legacy keys are "
+ this.bw.write("</table>\n"
+ + "<br>\n"
+ + "<p><i>Note that expiration dates of legacy keys are "
+ "not included in votes and therefore not listed here!</i>"
+ "</p>\n");
}
@@ -522,19 +522,19 @@ public class MetricsWebsiteReport {
/* Write the status of bandwidth scanners and results being contained
* in votes. */
private void writeBandwidthScannerStatus() throws IOException {
- this.bw.write(" <br>\n"
- + " <a name=\"bwauthstatus\">\n"
- + " <h3><a href=\"#bwauthstatus\" class=\"anchor\">"
+ this.bw.write("<br>\n"
+ + "<a name=\"bwauthstatus\">\n"
+ + "<h3><a href=\"#bwauthstatus\" class=\"anchor\">"
+ "Bandwidth scanner status</a></h3>\n"
- + " <br>\n"
- + " <table border=\"0\" cellpadding=\"4\" "
+ + "<br>\n"
+ + "<table border=\"0\" cellpadding=\"4\" "
+ "cellspacing=\"0\" summary=\"\">\n"
- + " <colgroup>\n"
- + " <col width=\"160\">\n"
- + " <col width=\"640\">\n"
- + " </colgroup>\n");
+ + "<colgroup>\n"
+ + "<col width=\"160\">\n"
+ + "<col width=\"640\">\n"
+ + "</colgroup>\n");
if (this.downloadedVotes.size() < 1) {
- this.bw.write(" <tr><td>(No votes.)</td><td></td></tr>\n");
+ this.bw.write("<tr><td>(No votes.)</td><td></td></tr>\n");
} else {
for (RelayNetworkStatusVote vote : this.downloadedVotes.values()) {
int bandwidthWeights = 0;
@@ -544,24 +544,24 @@ public class MetricsWebsiteReport {
}
}
if (bandwidthWeights > 0) {
- this.bw.write(" <tr>\n"
- + " <td>" + vote.getNickname() + "</td>\n"
- + " <td>" + bandwidthWeights
+ this.bw.write("<tr>\n"
+ + "<td>" + vote.getNickname() + "</td>\n"
+ + "<td>" + bandwidthWeights
+ " Measured values in w lines</td>\n"
- + " </tr>\n");
+ + "</tr>\n");
}
}
}
- this.bw.write(" </table>\n");
+ this.bw.write("</table>\n");
}
/* Write directory authority versions. */
private void writeAuthorityVersions() throws IOException {
- this.bw.write(" <br>\n"
- + " <a name=\"authorityversions\">\n"
- + " <h3><a href=\"#authorityversions\" class=\"anchor\">"
- + "Authority versions</a></h3>\n"
- + " <br>\n");
+ this.bw.write("<br>\n"
+ + "<a name=\"authorityversions\">\n"
+ + "<h3><a href=\"#authorityversions\" class=\"anchor\">"
+ + "Authority versions</a></h3>\n"
+ + "<br>\n");
SortedMap<String, String> authorityVersions =
new TreeMap<String, String>();
for (NetworkStatusEntry entry :
@@ -571,26 +571,26 @@ public class MetricsWebsiteReport {
}
}
if (authorityVersions.size() < 1) {
- this.bw.write(" <p>(No relays with Authority flag found.)"
+ this.bw.write("<p>(No relays with Authority flag found.)"
+ "</p>\n");
} else {
- this.bw.write(" <table border=\"0\" cellpadding=\"4\" "
+ this.bw.write("<table border=\"0\" cellpadding=\"4\" "
+ "cellspacing=\"0\" summary=\"\">\n"
- + " <colgroup>\n"
- + " <col width=\"160\">\n"
- + " <col width=\"640\">\n"
- + " </colgroup>\n");
+ + "<colgroup>\n"
+ + "<col width=\"160\">\n"
+ + "<col width=\"640\">\n"
+ + "</colgroup>\n");
for (Map.Entry<String, String> e : authorityVersions.entrySet()) {
String nickname = e.getKey();
String versionString = e.getValue();
- this.bw.write(" <tr>\n"
- + " <td>" + nickname + "</td>\n"
- + " <td>" + versionString + "</td>\n"
- + " </tr>\n");
+ this.bw.write("<tr>\n"
+ + "<td>" + nickname + "</td>\n"
+ + "<td>" + versionString + "</td>\n"
+ + "</tr>\n");
}
- this.bw.write(" </table>\n"
- + " <br>\n"
- + " <p><i>Note that this list of relays with the "
+ this.bw.write("</table>\n"
+ + "<br>\n"
+ + "<p><i>Note that this list of relays with the "
+ "Authority flag may be different from the list of v3 "
+ "directory authorities!</i></p>\n");
}
@@ -604,26 +604,26 @@ public class MetricsWebsiteReport {
if (knownAuthorities.isEmpty()) {
return;
}
- this.bw.write(" <br>\n"
- + " <a name=\"downloadstats\">\n"
- + " <h3><a href=\"#downloadstats\" class=\"anchor\">"
- + "Consensus download statistics</a></h3>\n"
- + " <br>\n"
- + " <p>The following table contains statistics on "
+ this.bw.write("<br>\n"
+ + "<a name=\"downloadstats\">\n"
+ + "<h3><a href=\"#downloadstats\" class=\"anchor\">"
+ + "Consensus download statistics</a></h3>\n"
+ + "<br>\n"
+ + "<p>The following table contains statistics on "
+ "consensus download times in milliseconds over the last 7 "
+ "days:</p>\n"
- + " <table border=\"0\" cellpadding=\"4\" "
- + "cellspacing=\"0\" summary=\"\">\n"
- + " <colgroup>\n"
- + " <col width=\"160\">\n"
- + " <col width=\"100\">\n"
- + " <col width=\"100\">\n"
- + " <col width=\"100\">\n"
- + " <col width=\"100\">\n"
- + " <col width=\"100\">\n"
- + " <col width=\"100\">\n"
- + " </colgroup>\n"
- + " <tr><th>Authority</th>"
+ + "<table border=\"0\" cellpadding=\"4\" "
+ + "cellspacing=\"0\" summary=\"\">\n"
+ + "<colgroup>\n"
+ + "<col width=\"160\">\n"
+ + "<col width=\"100\">\n"
+ + "<col width=\"100\">\n"
+ + "<col width=\"100\">\n"
+ + "<col width=\"100\">\n"
+ + "<col width=\"100\">\n"
+ + "<col width=\"100\">\n"
+ + "</colgroup>\n"
+ + "<tr><th>Authority</th>"
+ "<th>Minimum</th>"
+ "<th>1st Quartile</th>"
+ "<th>Median</th>"
@@ -631,62 +631,62 @@ public class MetricsWebsiteReport {
+ "<th>Maximum</th>"
+ "<th>Timeouts</th></tr>\n");
for (String authority : knownAuthorities) {
- this.bw.write(" <tr>\n"
- + " <td>" + authority + "</td>\n"
- + " <td>"
+ this.bw.write("<tr>\n"
+ + "<td>" + authority + "</td>\n"
+ + "<td>"
+ this.statistics.getPercentile(authority, 0) + "</td>"
- + " <td>"
+ + "<td>"
+ this.statistics.getPercentile(authority, 25) + "</td>"
- + " <td>"
+ + "<td>"
+ this.statistics.getPercentile(authority, 50) + "</td>"
- + " <td>"
+ + "<td>"
+ this.statistics.getPercentile(authority, 75) + "</td>"
- + " <td>"
+ + "<td>"
+ this.statistics.getPercentile(authority, 100) + "</td>"
- + " <td>"
+ + "<td>"
+ this.statistics.getNAs(authority) + "</td></tr>\n");
}
- this.bw.write(" </table>\n");
+ this.bw.write("</table>\n");
}
/* Write the (huge) table containing relay flags contained in votes and
* the consensus for each relay. */
private void writeRelayFlagsTable() throws IOException {
- this.bw.write(" <br>\n"
- + " <a name=\"relayflags\">\n"
- + " <h3><a href=\"#relayflags\" class=\"anchor\">Relay "
+ this.bw.write("<br>\n"
+ + "<a name=\"relayflags\">\n"
+ + "<h3><a href=\"#relayflags\" class=\"anchor\">Relay "
+ "flags</a></h3>\n"
- + " <br>\n"
- + " <p>The semantics of flags written in the table is "
+ + "<br>\n"
+ + "<p>The semantics of flags written in the table is "
+ "similar to the table above:</p>\n"
- + " <ul>\n"
- + " <li><b>In vote and consensus:</b> Flag in vote "
+ + "<ul>\n"
+ + "<li><b>In vote and consensus:</b> Flag in vote "
+ "matches flag in consensus, or relay is not listed in "
+ "consensus (because it doesn't have the Running "
+ "flag)</li>\n"
- + " <li><b><span class=\"oiv\">Only in "
+ + "<li><b><span class=\"oiv\">Only in "
+ "vote:</span></b> Flag in vote, but missing in the "
+ "consensus, because there was no majority for the flag or "
+ "the flag was invalidated (e.g., Named gets invalidated by "
+ "Unnamed)</li>\n"
- + " <li><b><span class=\"oic\">Only in "
+ + "<li><b><span class=\"oic\">Only in "
+ "consensus:</span></b> Flag in consensus, but missing "
+ "in a vote of a directory authority voting on this "
+ "flag</li>\n"
- + " <li><b><span class=\"ic\">In "
+ + "<li><b><span class=\"ic\">In "
+ "consensus:</span></b> Flag in consensus</li>\n"
- + " </ul>\n"
- + " <br>\n"
- + " <table border=\"0\" cellpadding=\"4\" "
+ + "</ul>\n"
+ + "<br>\n"
+ + "<table border=\"0\" cellpadding=\"4\" "
+ "cellspacing=\"0\" summary=\"\">\n"
- + " <colgroup>\n"
- + " <col width=\"120\">\n"
- + " <col width=\"80\">\n");
+ + "<colgroup>\n"
+ + "<col width=\"120\">\n"
+ + "<col width=\"80\">\n");
for (int i = 0; i < this.downloadedVotes.size(); i++) {
- this.bw.write(" <col width=\""
+ this.bw.write( "<col width=\""
+ (640 / this.downloadedVotes.size()) + "\">\n");
}
- this.bw.write(" </colgroup>\n");
+ this.bw.write( "</colgroup>\n");
SortedMap<String, String> allRelays = new TreeMap<String, String>();
for (RelayNetworkStatusVote vote : this.downloadedVotes.values()) {
for (NetworkStatusEntry statusEntry :
@@ -709,37 +709,37 @@ public class MetricsWebsiteReport {
String nickname = e.getValue();
this.writeRelayFlagsTableRow(fingerprint, nickname);
}
- this.bw.write(" </table>\n");
+ this.bw.write("</table>\n");
}
/* Write the table header that is repeated every ten relays and that
* contains the directory authority names. */
private void writeRelayFlagsTableHeader() throws IOException {
- this.bw.write(" <tr class=\"tbl-hdr\"><th>Fingerprint</th>"
- + "<th>Nickname</th>\n");
+ this.bw.write( "<tr class=\"tbl-hdr\"><th>Fingerprint</th>"
+ + "<th>Nickname</th>\n");
for (RelayNetworkStatusVote vote : this.downloadedVotes.values()) {
String shortDirName = vote.getNickname().length() > 6 ?
vote.getNickname().substring(0, 5) + "." :
vote.getNickname();
- this.bw.write("<th>" + shortDirName + "</th>");
+ this.bw.write( "<th>" + shortDirName + "</th>");
}
- this.bw.write("<th>consensus</th></tr>\n");
+ this.bw.write( "<th>consensus</th></tr>\n");
}
/* Write a single row in the table of relay flags. */
private void writeRelayFlagsTableRow(String fingerprint,
String nickname) throws IOException {
- this.bw.write(" <tr>\n");
+ this.bw.write( "<tr>\n");
if (this.downloadedConsensus.containsStatusEntry(fingerprint) &&
this.downloadedConsensus.getStatusEntry(fingerprint).getFlags().
contains("Named") && !Character.isDigit(nickname.charAt(0))) {
- this.bw.write(" <td id=\"" + nickname + "\">"
+ this.bw.write( "<td id=\"" + nickname + "\">"
+ fingerprint.substring(0, 8) + "</td>\n");
} else {
- this.bw.write(" <td>"
+ this.bw.write( "<td>"
+ fingerprint.substring(0, 8) + "</td>\n");
}
- this.bw.write(" <td>" + nickname + "</td>\n");
+ this.bw.write( "<td>" + nickname + "</td>\n");
SortedSet<String> relevantFlags = new TreeSet<String>();
for (RelayNetworkStatusVote vote : this.downloadedVotes.values()) {
if (vote.containsStatusEntry(fingerprint)) {
@@ -756,7 +756,7 @@ public class MetricsWebsiteReport {
if (vote.containsStatusEntry(fingerprint)) {
SortedSet<String> flags = vote.getStatusEntry(fingerprint).
getFlags();
- this.bw.write(" <td>");
+ this.bw.write("<td>");
int flagsWritten = 0;
for (String flag : relevantFlags) {
this.bw.write(flagsWritten++ > 0 ? "<br>" : "");
@@ -770,17 +770,17 @@ public class MetricsWebsiteReport {
} else if (consensusFlags != null &&
vote.getKnownFlags().contains(flag) &&
consensusFlags.contains(flag)) {
- this.bw.write("<span class=\"oic\">" + flag
+ this.bw.write( "<span class=\"oic\">" + flag
+ "</span>");
}
}
this.bw.write("</td>\n");
} else {
- this.bw.write(" <td></td>\n");
+ this.bw.write("<td></td>\n");
}
}
if (consensusFlags != null) {
- this.bw.write(" <td class=\"ic\">");
+ this.bw.write( "<td class=\"ic\">");
int flagsWritten = 0;
for (String flag : relevantFlags) {
this.bw.write(flagsWritten++ > 0 ? "<br>" : "");
@@ -788,46 +788,46 @@ public class MetricsWebsiteReport {
this.bw.write(flag);
}
}
- this.bw.write("</td>\n");
+ this.bw.write( "</td>\n");
} else {
- this.bw.write(" <td></td>\n");
+ this.bw.write( "<td></td>\n");
}
- this.bw.write(" </tr>\n");
+ this.bw.write( "</tr>\n");
}
/* Write the relay flag summary. */
private void writeRelayFlagsSummary() throws IOException {
- this.bw.write(" <br>\n"
- + " <a name=\"overlap\">\n"
- + " <h3><a href=\"#overlap\" class=\"anchor\">Overlap "
+ this.bw.write("<br>\n"
+ + "<a name=\"overlap\">\n"
+ + "<h3><a href=\"#overlap\" class=\"anchor\">Overlap "
+ "between votes and consensus</a></h3>\n"
- + " <br>\n"
- + " <p>The semantics of columns is as follows:</p>\n"
- + " <ul>\n"
- + " <li><b>In vote and consensus:</b> Flag in vote "
+ + "<br>\n"
+ + "<p>The semantics of columns is as follows:</p>\n"
+ + "<ul>\n"
+ + "<li><b>In vote and consensus:</b> Flag in vote "
+ "matches flag in consensus, or relay is not listed in "
+ "consensus (because it doesn't have the Running "
+ "flag)</li>\n"
- + " <li><b><span class=\"oiv\">Only in "
+ + "<li><b><span class=\"oiv\">Only in "
+ "vote:</span></b> Flag in vote, but missing in the "
+ "consensus, because there was no majority for the flag or "
+ "the flag was invalidated (e.g., Named gets invalidated by "
+ "Unnamed)</li>\n"
- + " <li><b><span class=\"oic\">Only in "
+ + "<li><b><span class=\"oic\">Only in "
+ "consensus:</span></b> Flag in consensus, but missing "
+ "in a vote of a directory authority voting on this "
+ "flag</li>\n"
- + " </ul>\n"
- + " <br>\n"
- + " <table border=\"0\" cellpadding=\"4\" "
- + "cellspacing=\"0\" summary=\"\">\n"
- + " <colgroup>\n"
- + " <col width=\"160\">\n"
- + " <col width=\"210\">\n"
- + " <col width=\"210\">\n"
- + " <col width=\"210\">\n"
- + " </colgroup>\n"
- + " <tr><td></td><td><b>Only in vote</b></td>"
+ + "</ul>\n"
+ + "<br>\n"
+ + "<table border=\"0\" cellpadding=\"4\" "
+ + "cellspacing=\"0\" summary=\"\">\n"
+ + "<colgroup>\n"
+ + "<col width=\"160\">\n"
+ + "<col width=\"210\">\n"
+ + "<col width=\"210\">\n"
+ + "<col width=\"210\">\n"
+ + "</colgroup>\n"
+ + "<tr><td></td><td><b>Only in vote</b></td>"
+ "<td><b>In vote and consensus</b></td>"
+ "<td><b>Only in consensus</b></td>\n");
Set<String> allFingerprints = new HashSet<String>();
@@ -885,51 +885,51 @@ public class MetricsWebsiteReport {
String dir = vote.getNickname();
int i = 0;
for (String flag : vote.getKnownFlags()) {
- this.bw.write(" <tr>\n"
- + " <td>" + (i++ == 0 ? dir : "")
+ this.bw.write("<tr>\n"
+ + "<td>" + (i++ == 0 ? dir : "")
+ "</td>\n");
if (flagsLost.containsKey(dir) &&
flagsLost.get(dir).containsKey(flag)) {
- this.bw.write(" <td><span class=\"oiv\"> "
+ this.bw.write("<td><span class=\"oiv\"> "
+ flagsLost.get(dir).get(flag) + " " + flag
+ "</span></td>\n");
} else {
- this.bw.write(" <td></td>\n");
+ this.bw.write("<td></td>\n");
}
if (flagsAgree.containsKey(dir) &&
flagsAgree.get(dir).containsKey(flag)) {
- this.bw.write(" <td>" + flagsAgree.get(dir).get(flag)
+ this.bw.write("<td>" + flagsAgree.get(dir).get(flag)
+ " " + flag + "</td>\n");
} else {
- this.bw.write(" <td></td>\n");
+ this.bw.write("<td></td>\n");
}
if (flagsMissing.containsKey(dir) &&
flagsMissing.get(dir).containsKey(flag)) {
- this.bw.write(" <td><span class=\"oic\">"
+ this.bw.write("<td><span class=\"oic\">"
+ flagsMissing.get(dir).get(flag) + " " + flag
+ "</span></td>\n");
} else {
- this.bw.write(" <td></td>\n");
+ this.bw.write("<td></td>\n");
}
- this.bw.write(" </tr>\n");
+ this.bw.write("</tr>\n");
}
}
- this.bw.write(" </table>\n");
+ this.bw.write("</table>\n");
}
/* Write the footer of the HTML page containing the blurb that is on
* every page of the metrics website. */
private void writePageFooter() throws IOException {
- this.bw.write(" </div>\n"
- + " </div>\n"
- + " <div class=\"bottom\" id=\"bottom\">\n"
- + " <p>\"Tor\" and the \"Onion Logo\" are <a "
+ this.bw.write("</div>\n"
+ + "</div>\n"
+ + "<div class=\"bottom\" id=\"bottom\">\n"
+ + "<p>\"Tor\" and the \"Onion Logo\" are <a "
+ "href=\"https://www.torproject.org/docs/trademark-faq.html"
+ ".en\">"
- + "registered trademarks</a> of The Tor Project, "
+ + "registered trademarks</a> of The Tor Project, "
+ "Inc.</p>\n"
- + " </div>\n"
- + " </body>\n"
+ + "</div>\n"
+ + "</body>\n"
+ "</html>");
}
}
1
0
Author: phobos
Date: 2014-04-20 02:29:59 +0000 (Sun, 20 Apr 2014)
New Revision: 26720
Modified:
website/trunk/include/tor-mirrors.csv
Log:
add a new mirror
Modified: website/trunk/include/tor-mirrors.csv
===================================================================
--- website/trunk/include/tor-mirrors.csv 2014-04-19 18:43:28 UTC (rev 26719)
+++ website/trunk/include/tor-mirrors.csv 2014-04-20 02:29:59 UTC (rev 26720)
@@ -91,3 +91,4 @@
Ich Eben, Tor Supporter, DE, Germany, DE, TRUE, TRUE, No, http://reichster.de/mirrors/torproject.org/, https://reichster.de/mirrors/torproject.org, , , http://reichster.de/mirrors/torproject.org/dist/, https://reichster.de/mirrors/torproject.org/dist/, , , Wed Apr 16 16:29:40 2014
jlgaddis AT gnu DOT org, Evil Routers, US, United States, US, TRUE, FALSE, No, http://tor1.evilrouters.net/, , , , http://tor1.evilrouters.net/dist/, , , , Wed Apr 16 16:29:40 2014
tor AT miglix DOT eu, Tor Supporter, DE, Germany, Europe, TRUE, TRUE, NO, http://tor.miglix.eu, https://tor.miglix.eu, , , http://tor.miglix.eu/dist/, https://tor.miglix.eu/dist/, , , Wed Apr 16 16:29:40 2014
+tor TA ninurta TOD name, TorNinurtaName, AT, Austria, AT, TRUE, TRUE, no, http://tor.ninurta.name/, , , , http://tor.ninurta.name/dist/, , , ,
1
0

[onionoo/master] fixup! Create node index in background thread.
by karsten@torproject.org 19 Apr '14
by karsten@torproject.org 19 Apr '14
19 Apr '14
commit 4ad1ab4fae911963e362cab4554da02c1e7fc272
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Sat Apr 19 15:34:45 2014 +0200
fixup! Create node index in background thread.
---
src/org/torproject/onionoo/NodeIndexer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/org/torproject/onionoo/NodeIndexer.java b/src/org/torproject/onionoo/NodeIndexer.java
index 87ecf9f..5dc0e0a 100644
--- a/src/org/torproject/onionoo/NodeIndexer.java
+++ b/src/org/torproject/onionoo/NodeIndexer.java
@@ -165,7 +165,7 @@ public class NodeIndexer implements ServletContextListener, Runnable {
private Thread nodeIndexerThread = null;
public synchronized long getLastIndexed(long timeoutMillis) {
- if (this.lastIndexed == 0L && this.nodeIndexerThread != null &&
+ if (this.lastIndexed == -1L && this.nodeIndexerThread != null &&
timeoutMillis > 0L) {
try {
this.wait(timeoutMillis);
1
0

19 Apr '14
commit f3991be5df78d32268c87b31f0a413724d370879
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Sat Apr 19 15:18:16 2014 +0200
Tweak node indexer to be more efficient.
---
src/org/torproject/onionoo/NodeIndexer.java | 67 +++--------
src/org/torproject/onionoo/RequestHandler.java | 91 +++++++--------
src/org/torproject/onionoo/ResponseBuilder.java | 138 +++++++++++------------
3 files changed, 127 insertions(+), 169 deletions(-)
diff --git a/src/org/torproject/onionoo/NodeIndexer.java b/src/org/torproject/onionoo/NodeIndexer.java
index 5dc0e0a..b1935e1 100644
--- a/src/org/torproject/onionoo/NodeIndexer.java
+++ b/src/org/torproject/onionoo/NodeIndexer.java
@@ -43,21 +43,22 @@ class NodeIndex {
return relaysByConsensusWeight;
}
- private Map<String, String> relayFingerprintSummaryLines;
+
+ private Map<String, NodeStatus> relayFingerprintSummaryLines;
public void setRelayFingerprintSummaryLines(
- Map<String, String> relayFingerprintSummaryLines) {
+ Map<String, NodeStatus> relayFingerprintSummaryLines) {
this.relayFingerprintSummaryLines = relayFingerprintSummaryLines;
}
- public Map<String, String> getRelayFingerprintSummaryLines() {
+ public Map<String, NodeStatus> getRelayFingerprintSummaryLines() {
return this.relayFingerprintSummaryLines;
}
- private Map<String, String> bridgeFingerprintSummaryLines;
+ private Map<String, NodeStatus> bridgeFingerprintSummaryLines;
public void setBridgeFingerprintSummaryLines(
- Map<String, String> bridgeFingerprintSummaryLines) {
+ Map<String, NodeStatus> bridgeFingerprintSummaryLines) {
this.bridgeFingerprintSummaryLines = bridgeFingerprintSummaryLines;
}
- public Map<String, String> getBridgeFingerprintSummaryLines() {
+ public Map<String, NodeStatus> getBridgeFingerprintSummaryLines() {
return this.bridgeFingerprintSummaryLines;
}
@@ -230,9 +231,11 @@ public class NodeIndexer implements ServletContextListener, Runnable {
}
}
List<String> newRelaysByConsensusWeight = new ArrayList<String>();
- Map<String, String>
- newRelayFingerprintSummaryLines = new HashMap<String, String>(),
- newBridgeFingerprintSummaryLines = new HashMap<String, String>();
+ Map<String, NodeStatus>
+ newRelayFingerprintSummaryLines =
+ new HashMap<String, NodeStatus>(),
+ newBridgeFingerprintSummaryLines =
+ new HashMap<String, NodeStatus>();
Map<String, Set<String>>
newRelaysByCountryCode = new HashMap<String, Set<String>>(),
newRelaysByASNumber = new HashMap<String, Set<String>>(),
@@ -270,9 +273,8 @@ public class NodeIndexer implements ServletContextListener, Runnable {
toUpperCase();
entry.setRunning(entry.getLastSeenMillis() ==
relaysLastValidAfterMillis);
- String line = formatRelaySummaryLine(entry);
- newRelayFingerprintSummaryLines.put(fingerprint, line);
- newRelayFingerprintSummaryLines.put(hashedFingerprint, line);
+ newRelayFingerprintSummaryLines.put(fingerprint, entry);
+ newRelayFingerprintSummaryLines.put(hashedFingerprint, entry);
long consensusWeight = entry.getConsensusWeight();
orderRelaysByConsensusWeight.add(String.format("%020d %s",
consensusWeight, fingerprint));
@@ -339,10 +341,9 @@ public class NodeIndexer implements ServletContextListener, Runnable {
toUpperCase();
entry.setRunning(entry.getRelayFlags().contains("Running") &&
entry.getLastSeenMillis() == bridgesLastPublishedMillis);
- String line = formatBridgeSummaryLine(entry);
- newBridgeFingerprintSummaryLines.put(hashedFingerprint, line);
+ newBridgeFingerprintSummaryLines.put(hashedFingerprint, entry);
newBridgeFingerprintSummaryLines.put(hashedHashedFingerprint,
- line);
+ entry);
for (String flag : entry.getRelayFlags()) {
String flagLowerCase = flag.toLowerCase();
if (!newBridgesByFlag.containsKey(flagLowerCase)) {
@@ -398,41 +399,5 @@ public class NodeIndexer implements ServletContextListener, Runnable {
this.notifyAll();
}
}
-
- private String formatRelaySummaryLine(NodeStatus entry) {
- String nickname = !entry.getNickname().equals("Unnamed") ?
- entry.getNickname() : null;
- String fingerprint = entry.getFingerprint();
- String running = entry.getRunning() ? "true" : "false";
- List<String> addresses = new ArrayList<String>();
- addresses.add(entry.getAddress());
- for (String orAddress : entry.getOrAddresses()) {
- addresses.add(orAddress);
- }
- for (String exitAddress : entry.getExitAddresses()) {
- if (!addresses.contains(exitAddress)) {
- addresses.add(exitAddress);
- }
- }
- StringBuilder addressesBuilder = new StringBuilder();
- int written = 0;
- for (String address : addresses) {
- addressesBuilder.append((written++ > 0 ? "," : "") + "\""
- + address.toLowerCase() + "\"");
- }
- return String.format("{%s\"f\":\"%s\",\"a\":[%s],\"r\":%s}",
- (nickname == null ? "" : "\"n\":\"" + nickname + "\","),
- fingerprint, addressesBuilder.toString(), running);
- }
-
- private String formatBridgeSummaryLine(NodeStatus entry) {
- String nickname = !entry.getNickname().equals("Unnamed") ?
- entry.getNickname() : null;
- String hashedFingerprint = entry.getFingerprint();
- String running = entry.getRunning() ? "true" : "false";
- return String.format("{%s\"h\":\"%s\",\"r\":%s}",
- (nickname == null ? "" : "\"n\":\"" + nickname + "\","),
- hashedFingerprint, running);
- }
}
diff --git a/src/org/torproject/onionoo/RequestHandler.java b/src/org/torproject/onionoo/RequestHandler.java
index f0e58da..1efa5a0 100644
--- a/src/org/torproject/onionoo/RequestHandler.java
+++ b/src/org/torproject/onionoo/RequestHandler.java
@@ -96,11 +96,11 @@ public class RequestHandler {
lastSeenDays.length);
}
- private Map<String, String> filteredRelays =
- new HashMap<String, String>();
+ private Map<String, NodeStatus> filteredRelays =
+ new HashMap<String, NodeStatus>();
- private Map<String, String> filteredBridges =
- new HashMap<String, String>();
+ private Map<String, NodeStatus> filteredBridges =
+ new HashMap<String, NodeStatus>();
public void handleRequest() {
this.filteredRelays.putAll(
@@ -149,8 +149,8 @@ public class RequestHandler {
}
boolean runningRequested = this.running.equals("true");
Set<String> removeRelays = new HashSet<String>();
- for (Map.Entry<String, String> e : filteredRelays.entrySet()) {
- if (e.getValue().contains("\"r\":true") != runningRequested) {
+ for (Map.Entry<String, NodeStatus> e : filteredRelays.entrySet()) {
+ if (e.getValue().getRunning() != runningRequested) {
removeRelays.add(e.getKey());
}
}
@@ -158,8 +158,8 @@ public class RequestHandler {
this.filteredRelays.remove(fingerprint);
}
Set<String> removeBridges = new HashSet<String>();
- for (Map.Entry<String, String> e : filteredBridges.entrySet()) {
- if (e.getValue().contains("\"r\":true") != runningRequested) {
+ for (Map.Entry<String, NodeStatus> e : filteredBridges.entrySet()) {
+ if (e.getValue().getRunning() != runningRequested) {
removeBridges.add(e.getKey());
}
}
@@ -179,15 +179,12 @@ public class RequestHandler {
private void filterBySearchTerm(String searchTerm) {
Set<String> removeRelays = new HashSet<String>();
- for (Map.Entry<String, String> e : filteredRelays.entrySet()) {
+ for (Map.Entry<String, NodeStatus> e : filteredRelays.entrySet()) {
String fingerprint = e.getKey();
- String line = e.getValue();
+ NodeStatus entry = e.getValue();
boolean lineMatches = false;
- String nickname = "unnamed";
- if (line.contains("\"n\":\"")) {
- nickname = line.substring(line.indexOf("\"n\":\"") + 5).
- split("\"")[0].toLowerCase();
- }
+ String nickname = entry.getNickname() != null ?
+ entry.getNickname().toLowerCase() : "unnamed";
if (searchTerm.startsWith("$")) {
/* Search is for $-prefixed fingerprint. */
if (fingerprint.startsWith(
@@ -201,10 +198,22 @@ public class RequestHandler {
} else if (fingerprint.startsWith(searchTerm.toUpperCase())) {
/* Non-$-prefixed fingerprint matches. */
lineMatches = true;
- } else if (line.substring(line.indexOf("\"a\":[")).contains("\""
- + searchTerm.toLowerCase())) {
- /* Address matches. */
- lineMatches = true;
+ } else {
+ List<String> addresses = new ArrayList<String>();
+ addresses.add(entry.getAddress().toLowerCase());
+ for (String orAddress : entry.getOrAddresses()) {
+ addresses.add(orAddress.toLowerCase());
+ }
+ for (String exitAddress : entry.getExitAddresses()) {
+ addresses.add(exitAddress.toLowerCase());
+ }
+ for (String address : addresses) {
+ if (address.startsWith(searchTerm.toLowerCase())) {
+ /* Address matches. */
+ lineMatches = true;
+ break;
+ }
+ }
}
if (!lineMatches) {
removeRelays.add(e.getKey());
@@ -214,15 +223,12 @@ public class RequestHandler {
this.filteredRelays.remove(fingerprint);
}
Set<String> removeBridges = new HashSet<String>();
- for (Map.Entry<String, String> e : filteredBridges.entrySet()) {
+ for (Map.Entry<String, NodeStatus> e : filteredBridges.entrySet()) {
String hashedFingerprint = e.getKey();
- String line = e.getValue();
+ NodeStatus entry = e.getValue();
boolean lineMatches = false;
- String nickname = "unnamed";
- if (line.contains("\"n\":\"")) {
- nickname = line.substring(line.indexOf("\"n\":\"") + 5).
- split("\"")[0].toLowerCase();
- }
+ String nickname = entry.getNickname() != null ?
+ entry.getNickname().toLowerCase() : "unnamed";
if (searchTerm.startsWith("$")) {
/* Search is for $-prefixed hashed fingerprint. */
if (hashedFingerprint.startsWith(
@@ -251,12 +257,12 @@ public class RequestHandler {
return;
}
String fingerprint = this.lookup;
- String relayLine = this.filteredRelays.get(fingerprint);
+ NodeStatus relayLine = this.filteredRelays.get(fingerprint);
this.filteredRelays.clear();
if (relayLine != null) {
this.filteredRelays.put(fingerprint, relayLine);
}
- String bridgeLine = this.filteredBridges.get(fingerprint);
+ NodeStatus bridgeLine = this.filteredBridges.get(fingerprint);
this.filteredBridges.clear();
if (bridgeLine != null) {
this.filteredBridges.put(fingerprint, bridgeLine);
@@ -275,8 +281,7 @@ public class RequestHandler {
Set<String> relaysWithCountryCode =
this.nodeIndex.getRelaysByCountryCode().get(countryCode);
Set<String> removeRelays = new HashSet<String>();
- for (Map.Entry<String, String> e : this.filteredRelays.entrySet()) {
- String fingerprint = e.getKey();
+ for (String fingerprint : this.filteredRelays.keySet()) {
if (!relaysWithCountryCode.contains(fingerprint)) {
removeRelays.add(fingerprint);
}
@@ -302,8 +307,7 @@ public class RequestHandler {
Set<String> relaysWithASNumber =
this.nodeIndex.getRelaysByASNumber().get(aSNumber);
Set<String> removeRelays = new HashSet<String>();
- for (Map.Entry<String, String> e : this.filteredRelays.entrySet()) {
- String fingerprint = e.getKey();
+ for (String fingerprint : this.filteredRelays.keySet()) {
if (!relaysWithASNumber.contains(fingerprint)) {
removeRelays.add(fingerprint);
}
@@ -326,8 +330,7 @@ public class RequestHandler {
Set<String> relaysWithFlag = this.nodeIndex.getRelaysByFlag().get(
flag);
Set<String> removeRelays = new HashSet<String>();
- for (Map.Entry<String, String> e : this.filteredRelays.entrySet()) {
- String fingerprint = e.getKey();
+ for (String fingerprint : this.filteredRelays.keySet()) {
if (!relaysWithFlag.contains(fingerprint)) {
removeRelays.add(fingerprint);
}
@@ -342,9 +345,7 @@ public class RequestHandler {
Set<String> bridgesWithFlag = this.nodeIndex.getBridgesByFlag().get(
flag);
Set<String> removeBridges = new HashSet<String>();
- for (Map.Entry<String, String> e :
- this.filteredBridges.entrySet()) {
- String fingerprint = e.getKey();
+ for (String fingerprint : this.filteredBridges.keySet()) {
if (!bridgesWithFlag.contains(fingerprint)) {
removeBridges.add(fingerprint);
}
@@ -375,7 +376,7 @@ public class RequestHandler {
this.nodeIndex.getBridgesByLastSeenDays(), this.lastSeenDays);
}
- private void filterNodesByDays(Map<String, String> filteredNodes,
+ private void filterNodesByDays(Map<String, NodeStatus> filteredNodes,
SortedMap<Integer, Set<String>> nodesByDays, int[] days) {
Set<String> removeNodes = new HashSet<String>();
for (Set<String> nodes : nodesByDays.headMap(days[0]).values()) {
@@ -432,14 +433,14 @@ public class RequestHandler {
this.orderedRelays.add(this.filteredRelays.remove(relay));
}
}
- Set<String> uniqueBridges = new HashSet<String>(
+ Set<NodeStatus> uniqueBridges = new HashSet<NodeStatus>(
this.filteredBridges.values());
this.orderedBridges.addAll(uniqueBridges);
} else {
- Set<String> uniqueRelays = new HashSet<String>(
+ Set<NodeStatus> uniqueRelays = new HashSet<NodeStatus>(
this.filteredRelays.values());
this.orderedRelays.addAll(uniqueRelays);
- Set<String> uniqueBridges = new HashSet<String>(
+ Set<NodeStatus> uniqueBridges = new HashSet<NodeStatus>(
this.filteredBridges.values());
this.orderedBridges.addAll(uniqueBridges);
}
@@ -477,13 +478,13 @@ public class RequestHandler {
}
}
- private List<String> orderedRelays = new ArrayList<String>();
- public List<String> getOrderedRelays() {
+ private List<NodeStatus> orderedRelays = new ArrayList<NodeStatus>();
+ public List<NodeStatus> getOrderedRelays() {
return this.orderedRelays;
}
- private List<String> orderedBridges = new ArrayList<String>();
- public List<String> getOrderedBridges() {
+ private List<NodeStatus> orderedBridges = new ArrayList<NodeStatus>();
+ public List<NodeStatus> getOrderedBridges() {
return this.orderedBridges;
}
diff --git a/src/org/torproject/onionoo/ResponseBuilder.java b/src/org/torproject/onionoo/ResponseBuilder.java
index d14ee5b..2b22c59 100644
--- a/src/org/torproject/onionoo/ResponseBuilder.java
+++ b/src/org/torproject/onionoo/ResponseBuilder.java
@@ -30,13 +30,13 @@ public class ResponseBuilder {
this.bridgesPublishedString = bridgesPublishedString;
}
- private List<String> orderedRelays = new ArrayList<String>();
- public void setOrderedRelays(List<String> orderedRelays) {
+ private List<NodeStatus> orderedRelays = new ArrayList<NodeStatus>();
+ public void setOrderedRelays(List<NodeStatus> orderedRelays) {
this.orderedRelays = orderedRelays;
}
- private List<String> orderedBridges = new ArrayList<String>();
- public void setOrderedBridges(List<String> orderedBridges) {
+ private List<NodeStatus> orderedBridges = new ArrayList<NodeStatus>();
+ public void setOrderedBridges(List<NodeStatus> orderedBridges) {
this.orderedBridges = orderedBridges;
}
@@ -51,12 +51,12 @@ public class ResponseBuilder {
writeBridges(orderedBridges, pw);
}
- private void writeRelays(List<String> relays, PrintWriter pw) {
+ private void writeRelays(List<NodeStatus> relays, PrintWriter pw) {
pw.write("{\"relays_published\":\"" + relaysPublishedString
+ "\",\n\"relays\":[");
int written = 0;
- for (String line : relays) {
- String lines = this.getFromSummaryLine(line);
+ for (NodeStatus entry : relays) {
+ String lines = this.formatNodeStatus(entry);
if (lines.length() > 0) {
pw.print((written++ > 0 ? ",\n" : "\n") + lines);
}
@@ -64,12 +64,12 @@ public class ResponseBuilder {
pw.print("\n],\n");
}
- private void writeBridges(List<String> bridges, PrintWriter pw) {
+ private void writeBridges(List<NodeStatus> bridges, PrintWriter pw) {
pw.write("\"bridges_published\":\"" + bridgesPublishedString
+ "\",\n\"bridges\":[");
int written = 0;
- for (String line : bridges) {
- String lines = this.getFromSummaryLine(line);
+ for (NodeStatus entry : bridges) {
+ String lines = this.formatNodeStatus(entry);
if (lines.length() > 0) {
pw.print((written++ > 0 ? ",\n" : "\n") + lines);
}
@@ -77,43 +77,69 @@ public class ResponseBuilder {
pw.print("\n]}\n");
}
- private String getFromSummaryLine(String summaryLine) {
+ private String formatNodeStatus(NodeStatus entry) {
if (this.resourceType == null) {
return "";
} else if (this.resourceType.equals("summary")) {
- return this.writeSummaryLine(summaryLine);
+ return this.writeSummaryLine(entry);
} else if (this.resourceType.equals("details")) {
- return this.writeDetailsLines(summaryLine);
+ return this.writeDetailsLines(entry);
} else if (this.resourceType.equals("bandwidth")) {
- return this.writeBandwidthLines(summaryLine);
+ return this.writeBandwidthLines(entry);
} else if (this.resourceType.equals("weights")) {
- return this.writeWeightsLines(summaryLine);
+ return this.writeWeightsLines(entry);
} else if (this.resourceType.equals("clients")) {
- return this.writeClientsLines(summaryLine);
+ return this.writeClientsLines(entry);
} else if (this.resourceType.equals("uptime")) {
- return this.writeUptimeLines(summaryLine);
+ return this.writeUptimeLines(entry);
} else {
return "";
}
}
- private String writeSummaryLine(String summaryLine) {
- return (summaryLine.endsWith(",") ? summaryLine.substring(0,
- summaryLine.length() - 1) : summaryLine);
+ private String writeSummaryLine(NodeStatus entry) {
+ return entry.isRelay() ? writeRelaySummaryLine(entry)
+ : writeBridgeSummaryLine(entry);
}
- private String writeDetailsLines(String summaryLine) {
- String fingerprint = null;
- if (summaryLine.contains("\"f\":\"")) {
- fingerprint = summaryLine.substring(summaryLine.indexOf(
- "\"f\":\"") + "\"f\":\"".length());
- } else if (summaryLine.contains("\"h\":\"")) {
- fingerprint = summaryLine.substring(summaryLine.indexOf(
- "\"h\":\"") + "\"h\":\"".length());
- } else {
- return "";
+ private String writeRelaySummaryLine(NodeStatus entry) {
+ String nickname = !entry.getNickname().equals("Unnamed") ?
+ entry.getNickname() : null;
+ String fingerprint = entry.getFingerprint();
+ String running = entry.getRunning() ? "true" : "false";
+ List<String> addresses = new ArrayList<String>();
+ addresses.add(entry.getAddress());
+ for (String orAddress : entry.getOrAddresses()) {
+ addresses.add(orAddress);
+ }
+ for (String exitAddress : entry.getExitAddresses()) {
+ if (!addresses.contains(exitAddress)) {
+ addresses.add(exitAddress);
+ }
+ }
+ StringBuilder addressesBuilder = new StringBuilder();
+ int written = 0;
+ for (String address : addresses) {
+ addressesBuilder.append((written++ > 0 ? "," : "") + "\""
+ + address.toLowerCase() + "\"");
}
- fingerprint = fingerprint.substring(0, 40);
+ return String.format("{%s\"f\":\"%s\",\"a\":[%s],\"r\":%s}",
+ (nickname == null ? "" : "\"n\":\"" + nickname + "\","),
+ fingerprint, addressesBuilder.toString(), running);
+ }
+
+ private String writeBridgeSummaryLine(NodeStatus entry) {
+ String nickname = !entry.getNickname().equals("Unnamed") ?
+ entry.getNickname() : null;
+ String hashedFingerprint = entry.getFingerprint();
+ String running = entry.getRunning() ? "true" : "false";
+ return String.format("{%s\"h\":\"%s\",\"r\":%s}",
+ (nickname == null ? "" : "\"n\":\"" + nickname + "\","),
+ hashedFingerprint, running);
+ }
+
+ private String writeDetailsLines(NodeStatus entry) {
+ String fingerprint = entry.getFingerprint();
DetailsDocument detailsDocument = this.documentStore.retrieve(
DetailsDocument.class, false, fingerprint);
if (detailsDocument != null &&
@@ -172,18 +198,8 @@ public class ResponseBuilder {
}
}
- private String writeBandwidthLines(String summaryLine) {
- String fingerprint = null;
- if (summaryLine.contains("\"f\":\"")) {
- fingerprint = summaryLine.substring(summaryLine.indexOf(
- "\"f\":\"") + "\"f\":\"".length());
- } else if (summaryLine.contains("\"h\":\"")) {
- fingerprint = summaryLine.substring(summaryLine.indexOf(
- "\"h\":\"") + "\"h\":\"".length());
- } else {
- return "";
- }
- fingerprint = fingerprint.substring(0, 40);
+ private String writeBandwidthLines(NodeStatus entry) {
+ String fingerprint = entry.getFingerprint();
BandwidthDocument bandwidthDocument = this.documentStore.retrieve(
BandwidthDocument.class, false, fingerprint);
if (bandwidthDocument != null &&
@@ -199,15 +215,8 @@ public class ResponseBuilder {
}
}
- private String writeWeightsLines(String summaryLine) {
- String fingerprint = null;
- if (summaryLine.contains("\"f\":\"")) {
- fingerprint = summaryLine.substring(summaryLine.indexOf(
- "\"f\":\"") + "\"f\":\"".length());
- } else {
- return "";
- }
- fingerprint = fingerprint.substring(0, 40);
+ private String writeWeightsLines(NodeStatus entry) {
+ String fingerprint = entry.getFingerprint();
WeightsDocument weightsDocument = this.documentStore.retrieve(
WeightsDocument.class, false, fingerprint);
if (weightsDocument != null &&
@@ -222,15 +231,8 @@ public class ResponseBuilder {
}
}
- private String writeClientsLines(String summaryLine) {
- String fingerprint = null;
- if (summaryLine.contains("\"h\":\"")) {
- fingerprint = summaryLine.substring(summaryLine.indexOf(
- "\"h\":\"") + "\"h\":\"".length());
- } else {
- return "";
- }
- fingerprint = fingerprint.substring(0, 40);
+ private String writeClientsLines(NodeStatus entry) {
+ String fingerprint = entry.getFingerprint();
ClientsDocument clientsDocument = this.documentStore.retrieve(
ClientsDocument.class, false, fingerprint);
if (clientsDocument != null &&
@@ -245,18 +247,8 @@ public class ResponseBuilder {
}
}
- private String writeUptimeLines(String summaryLine) {
- String fingerprint = null;
- if (summaryLine.contains("\"f\":\"")) {
- fingerprint = summaryLine.substring(summaryLine.indexOf(
- "\"f\":\"") + "\"f\":\"".length());
- } else if (summaryLine.contains("\"h\":\"")) {
- fingerprint = summaryLine.substring(summaryLine.indexOf(
- "\"h\":\"") + "\"h\":\"".length());
- } else {
- return "";
- }
- fingerprint = fingerprint.substring(0, 40);
+ private String writeUptimeLines(NodeStatus entry) {
+ String fingerprint = entry.getFingerprint();
UptimeDocument uptimeDocument = this.documentStore.retrieve(
UptimeDocument.class, false, fingerprint);
if (uptimeDocument != null &&
1
0

[translation/tor-launcher-network-settings_completed] Update translations for tor-launcher-network-settings_completed
by translation@torproject.org 19 Apr '14
by translation@torproject.org 19 Apr '14
19 Apr '14
commit 392359b537f6eb9eea50550dc969d3b439d4175c
Author: Translation commit bot <translation(a)torproject.org>
Date: Sat Apr 19 21:15:38 2014 +0000
Update translations for tor-launcher-network-settings_completed
---
fr/network-settings.dtd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fr/network-settings.dtd b/fr/network-settings.dtd
index 5e6ed8c..f93148c 100644
--- a/fr/network-settings.dtd
+++ b/fr/network-settings.dtd
@@ -23,7 +23,7 @@
<!ENTITY torSettings.firewallHelp "Si vous ne savez par comment répondre à cette question, choisissez Non. Vous pourrez changer ce paramètre plus tard en cas de problèmes de connexion au réseau Tor.">
<!ENTITY torSettings.enterFirewall "Entrez la liste de ports, séparés par des virgules, qui sont autorisés par le pare-feu.">
<!ENTITY torSettings.bridgeQuestion "Est-ce que votre Fournisseur d'Accès Internet (FAI) bloque les connexions au réseau Tor ?">
-<!ENTITY torSettings.bridgeHelp "Si vous ne savez pas comment répondre à cette question, choisissez le numéro &#160; Si vous choisissez Oui, il vous sera demandé de configurer les bridges Tor qui sont des relais non listés et qui rendent plus difficile le blocage du réseau Tor.">
+<!ENTITY torSettings.bridgeHelp "Si vous ne savez pas comment répondre à cette question, choisissez Non.&#160; Si vous choisissez Oui, il vous sera demandé de configurer les bridges Tor qui sont des relais non listés et qui rendent plus difficile le blocage du réseau Tor.">
<!ENTITY torSettings.bridgeSettingsPrompt "Vous pouvez utiliser les bridges fournis ou bien saisir votre liste de bridges personnels.">
<!-- Other: -->
1
0

[translation/tor-launcher-network-settings] Update translations for tor-launcher-network-settings
by translation@torproject.org 19 Apr '14
by translation@torproject.org 19 Apr '14
19 Apr '14
commit 5ba4018d47b48f666178d80e36eea0bd0a0c1bcc
Author: Translation commit bot <translation(a)torproject.org>
Date: Sat Apr 19 21:15:33 2014 +0000
Update translations for tor-launcher-network-settings
---
fr/network-settings.dtd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fr/network-settings.dtd b/fr/network-settings.dtd
index 5e6ed8c..f93148c 100644
--- a/fr/network-settings.dtd
+++ b/fr/network-settings.dtd
@@ -23,7 +23,7 @@
<!ENTITY torSettings.firewallHelp "Si vous ne savez par comment répondre à cette question, choisissez Non. Vous pourrez changer ce paramètre plus tard en cas de problèmes de connexion au réseau Tor.">
<!ENTITY torSettings.enterFirewall "Entrez la liste de ports, séparés par des virgules, qui sont autorisés par le pare-feu.">
<!ENTITY torSettings.bridgeQuestion "Est-ce que votre Fournisseur d'Accès Internet (FAI) bloque les connexions au réseau Tor ?">
-<!ENTITY torSettings.bridgeHelp "Si vous ne savez pas comment répondre à cette question, choisissez le numéro &#160; Si vous choisissez Oui, il vous sera demandé de configurer les bridges Tor qui sont des relais non listés et qui rendent plus difficile le blocage du réseau Tor.">
+<!ENTITY torSettings.bridgeHelp "Si vous ne savez pas comment répondre à cette question, choisissez Non.&#160; Si vous choisissez Oui, il vous sera demandé de configurer les bridges Tor qui sont des relais non listés et qui rendent plus difficile le blocage du réseau Tor.">
<!ENTITY torSettings.bridgeSettingsPrompt "Vous pouvez utiliser les bridges fournis ou bien saisir votre liste de bridges personnels.">
<!-- Other: -->
1
0