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

[bridgedb/develop] Fix unittests for bridge lines to search for <div class='bridges'>.
by isis@torproject.org 19 Apr '14
by isis@torproject.org 19 Apr '14
19 Apr '14
commit 4ea93b1b21f79ee3e125b4dca74426a1ea1ddaa5
Author: Isis Lovecruft <isis(a)torproject.org>
Date: Sat Apr 19 04:34:35 2014 +0000
Fix unittests for bridge lines to search for <div class='bridges'>.
---
lib/bridgedb/test/test_HTTPServer.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/bridgedb/test/test_HTTPServer.py b/lib/bridgedb/test/test_HTTPServer.py
index 52c2fb7..0de233d 100644
--- a/lib/bridgedb/test/test_HTTPServer.py
+++ b/lib/bridgedb/test/test_HTTPServer.py
@@ -535,9 +535,9 @@ class WebResourceBridgesTests(unittest.TestCase):
:rtype: list
:returns: A list of the bridge lines contained on the **page**.
"""
- # The bridge lines are contained in a <div class='well well-lg'> tag:
+ # The bridge lines are contained in a <div class='bridges'> tag:
soup = BeautifulSoup(page)
- well = soup.find('div', {'class': 'well well-lg'}).find('p')
+ well = soup.find('div', {'class': 'bridge-lines'})
content = well.renderContents().strip()
bridges = [b.strip() for b in content.splitlines()]
return bridges
1
0

[translation/tails-misc_completed] Update translations for tails-misc_completed
by translation@torproject.org 19 Apr '14
by translation@torproject.org 19 Apr '14
19 Apr '14
commit 5f231c11b4624a845587a02c0b50fabe1604cac5
Author: Translation commit bot <translation(a)torproject.org>
Date: Sat Apr 19 12:15:37 2014 +0000
Update translations for tails-misc_completed
---
fr.po | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/fr.po b/fr.po
index 604df00..95bb303 100644
--- a/fr.po
+++ b/fr.po
@@ -15,7 +15,7 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-03-23 08:55+0100\n"
-"PO-Revision-Date: 2014-04-19 11:45+0000\n"
+"PO-Revision-Date: 2014-04-19 11:53+0000\n"
"Last-Translator: bassmax\n"
"Language-Team: French (http://www.transifex.com/projects/p/torproject/language/fr/)\n"
"MIME-Version: 1.0\n"
@@ -26,7 +26,7 @@ msgstr ""
#: config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready-notification.sh:43
msgid "Tor is ready"
-msgstr "Tor est prêt"
+msgstr "Tor est opérationnel"
#: config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready-notification.sh:44
msgid "You can now access the Internet."
@@ -205,15 +205,15 @@ msgstr "Autres messages fournis par GnuPG :"
#: config/chroot_local-includes/usr/local/bin/iceweasel:12
msgid "Tor is not ready"
-msgstr "Tor n'est pas prêt"
+msgstr "Tor n'est pas opérationnel"
#: config/chroot_local-includes/usr/local/bin/iceweasel:13
msgid "Tor is not ready. Start Tor Browser anyway?"
-msgstr "Tor n'est pas prêt. Lancer tout de même le navigateur Tor?"
+msgstr "Tor n'est pas opérationnel. Démarrer malgré tout le navigateur Tor?"
#: config/chroot_local-includes/usr/local/bin/iceweasel:14
msgid "Start Tor Browser"
-msgstr "Lancer le navigateur Tor?"
+msgstr "Démarrer le navigateur Tor?"
#: config/chroot_local-includes/usr/local/bin/iceweasel:15
msgid "Cancel"
@@ -293,7 +293,7 @@ msgid ""
"MAC spoofing feature. For more information, see the <a "
"href=\\\"file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html#blocked\\\">MAC"
" spoofing documentation</a>."
-msgstr "Il semble que votre connexion au réseau est bloquée. Cela peut être lié à la fonction d'usurpation d'adresse MAC. Pour plus d'informations, reportez vous à la <a href=\\\"file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html#blocked\\\">documentation (en) sur l'usurpation d'adresse MAC</a>."
+msgstr "Il semble que votre connexion au réseau est bloquée. Cela peut être lié à la fonction d'usurpation d'adresse MAC. Pour plus d'informations, reportez vous à la <a href=\\\"file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html#blocked\\\">documentation sur l'usurpation d'adresse MAC</a>."
#: config/chroot_local-includes/usr/local/bin/tails-security-check:145
msgid "This version of Tails has known security issues:"
@@ -309,7 +309,7 @@ msgstr "Carte réseau ${nic} désactivée"
msgid ""
"MAC spoofing failed for network card ${nic_name} (${nic}) so it is temporarily disabled.\n"
"You might prefer to restart Tails and disable MAC spoofing. See the <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation</a>."
-msgstr "L'usurpation MAC a échoué pour la carte réseau ${nic_name} (${nic}), cette fonctionnalité est donc temporairement désactivée.\nSi vous le préférez vous pouvez redémarrer Tails et désactiver complètement l'usurpation MAC. Consultez la <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation (en)</a>."
+msgstr "L'usurpation MAC a échoué pour la carte réseau ${nic_name} (${nic}), cette fonctionnalité est donc temporairement désactivée.\nVous pouvez néanmoins redémarrer Tails et désactiver complètement la fonctionnalité d'usurpation MAC. Consultez la <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation</a>."
#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:39
msgid "All networking disabled"
@@ -320,7 +320,7 @@ msgstr "Toutes les connexions réseau sont désactivées"
msgid ""
"MAC spoofing failed for network card ${nic_name} (${nic}). The error recovery also failed so all networking is disabled.\n"
"You might prefer to restart Tails and disable MAC spoofing. See the <a href='file:///usr/share/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation</a>."
-msgstr "L'usurpation MAC a échoué pour la carte réseau ${nic_name} (${nic}). La récupération d'erreur a également échouée, les fonctionnalités réseau sont donc désactivées.\nVous pouvez redémarrer Tails et désactiver l'usurpation MAC. Consultez la <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation (en)</a>."
+msgstr "L'usurpation MAC a échoué pour la carte réseau ${nic_name} (${nic}). La récupération d'erreur a également échouée et les fonctionnalités réseau ont donc été désactivées.\nVous pouvez redémarrer Tails et désactiver l'usurpation MAC. Consultez la <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation</a>."
#: config/chroot_local-includes/usr/local/bin/tails-start-i2p:62
msgid "Starting I2P..."
@@ -368,7 +368,7 @@ msgid ""
"\n"
"Or do a manual upgrade.\n"
"See https://tails.boum.org/doc/first_steps/upgrade#manual"
-msgstr "<b>Pas assez de mémoire système pour vérifier les mises à jour.</b>\n\nAssurez vous que votre système correspond aux pré-requis pour lancer Tails.\nAllez sur file:///usr/share/doc/tails/website/doc/about/requirements.en.html\n\nEssayez de redémarrer Tails afin de vérifier les mises à jour à nouveau.\n\nOu bien exécutez la mise à jour manuellement.\nAllez ici: https://tails.boum.org/doc/first_steps/upgrade#manual"
+msgstr "<b>Pas assez de mémoire disponible pour vérifier les mises à jour.</b>\n\nAssurez vous que votre système correspond aux pré-requis pour lancer Tails.\nAllez sur file:///usr/share/doc/tails/website/doc/about/requirements.en.html\n\nEssayez de redémarrer Tails afin de vérifier les mises à jour à nouveau.\n\nOu bien exécutez la mise à jour manuellement.\nAllez ici: https://tails.boum.org/doc/first_steps/upgrade#manual"
#: config/chroot_local-includes/usr/local/bin/tails-virt-notify-user:53
msgid "Warning: virtual machine detected!"
1
0

[translation/tails-misc] Update translations for tails-misc
by translation@torproject.org 19 Apr '14
by translation@torproject.org 19 Apr '14
19 Apr '14
commit 6eda22c840bdea40f85df9b665ca74eb0b9874e4
Author: Translation commit bot <translation(a)torproject.org>
Date: Sat Apr 19 12:15:34 2014 +0000
Update translations for tails-misc
---
fr.po | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/fr.po b/fr.po
index 604df00..95bb303 100644
--- a/fr.po
+++ b/fr.po
@@ -15,7 +15,7 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-03-23 08:55+0100\n"
-"PO-Revision-Date: 2014-04-19 11:45+0000\n"
+"PO-Revision-Date: 2014-04-19 11:53+0000\n"
"Last-Translator: bassmax\n"
"Language-Team: French (http://www.transifex.com/projects/p/torproject/language/fr/)\n"
"MIME-Version: 1.0\n"
@@ -26,7 +26,7 @@ msgstr ""
#: config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready-notification.sh:43
msgid "Tor is ready"
-msgstr "Tor est prêt"
+msgstr "Tor est opérationnel"
#: config/chroot_local-includes/etc/NetworkManager/dispatcher.d/60-tor-ready-notification.sh:44
msgid "You can now access the Internet."
@@ -205,15 +205,15 @@ msgstr "Autres messages fournis par GnuPG :"
#: config/chroot_local-includes/usr/local/bin/iceweasel:12
msgid "Tor is not ready"
-msgstr "Tor n'est pas prêt"
+msgstr "Tor n'est pas opérationnel"
#: config/chroot_local-includes/usr/local/bin/iceweasel:13
msgid "Tor is not ready. Start Tor Browser anyway?"
-msgstr "Tor n'est pas prêt. Lancer tout de même le navigateur Tor?"
+msgstr "Tor n'est pas opérationnel. Démarrer malgré tout le navigateur Tor?"
#: config/chroot_local-includes/usr/local/bin/iceweasel:14
msgid "Start Tor Browser"
-msgstr "Lancer le navigateur Tor?"
+msgstr "Démarrer le navigateur Tor?"
#: config/chroot_local-includes/usr/local/bin/iceweasel:15
msgid "Cancel"
@@ -293,7 +293,7 @@ msgid ""
"MAC spoofing feature. For more information, see the <a "
"href=\\\"file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html#blocked\\\">MAC"
" spoofing documentation</a>."
-msgstr "Il semble que votre connexion au réseau est bloquée. Cela peut être lié à la fonction d'usurpation d'adresse MAC. Pour plus d'informations, reportez vous à la <a href=\\\"file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html#blocked\\\">documentation (en) sur l'usurpation d'adresse MAC</a>."
+msgstr "Il semble que votre connexion au réseau est bloquée. Cela peut être lié à la fonction d'usurpation d'adresse MAC. Pour plus d'informations, reportez vous à la <a href=\\\"file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html#blocked\\\">documentation sur l'usurpation d'adresse MAC</a>."
#: config/chroot_local-includes/usr/local/bin/tails-security-check:145
msgid "This version of Tails has known security issues:"
@@ -309,7 +309,7 @@ msgstr "Carte réseau ${nic} désactivée"
msgid ""
"MAC spoofing failed for network card ${nic_name} (${nic}) so it is temporarily disabled.\n"
"You might prefer to restart Tails and disable MAC spoofing. See the <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation</a>."
-msgstr "L'usurpation MAC a échoué pour la carte réseau ${nic_name} (${nic}), cette fonctionnalité est donc temporairement désactivée.\nSi vous le préférez vous pouvez redémarrer Tails et désactiver complètement l'usurpation MAC. Consultez la <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation (en)</a>."
+msgstr "L'usurpation MAC a échoué pour la carte réseau ${nic_name} (${nic}), cette fonctionnalité est donc temporairement désactivée.\nVous pouvez néanmoins redémarrer Tails et désactiver complètement la fonctionnalité d'usurpation MAC. Consultez la <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation</a>."
#: config/chroot_local-includes/usr/local/sbin/tails-spoof-mac:39
msgid "All networking disabled"
@@ -320,7 +320,7 @@ msgstr "Toutes les connexions réseau sont désactivées"
msgid ""
"MAC spoofing failed for network card ${nic_name} (${nic}). The error recovery also failed so all networking is disabled.\n"
"You might prefer to restart Tails and disable MAC spoofing. See the <a href='file:///usr/share/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation</a>."
-msgstr "L'usurpation MAC a échoué pour la carte réseau ${nic_name} (${nic}). La récupération d'erreur a également échouée, les fonctionnalités réseau sont donc désactivées.\nVous pouvez redémarrer Tails et désactiver l'usurpation MAC. Consultez la <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation (en)</a>."
+msgstr "L'usurpation MAC a échoué pour la carte réseau ${nic_name} (${nic}). La récupération d'erreur a également échouée et les fonctionnalités réseau ont donc été désactivées.\nVous pouvez redémarrer Tails et désactiver l'usurpation MAC. Consultez la <a href='file:///usr/share/doc/tails/website/doc/first_steps/startup_options/mac_spoofing.en.html'>documentation</a>."
#: config/chroot_local-includes/usr/local/bin/tails-start-i2p:62
msgid "Starting I2P..."
@@ -368,7 +368,7 @@ msgid ""
"\n"
"Or do a manual upgrade.\n"
"See https://tails.boum.org/doc/first_steps/upgrade#manual"
-msgstr "<b>Pas assez de mémoire système pour vérifier les mises à jour.</b>\n\nAssurez vous que votre système correspond aux pré-requis pour lancer Tails.\nAllez sur file:///usr/share/doc/tails/website/doc/about/requirements.en.html\n\nEssayez de redémarrer Tails afin de vérifier les mises à jour à nouveau.\n\nOu bien exécutez la mise à jour manuellement.\nAllez ici: https://tails.boum.org/doc/first_steps/upgrade#manual"
+msgstr "<b>Pas assez de mémoire disponible pour vérifier les mises à jour.</b>\n\nAssurez vous que votre système correspond aux pré-requis pour lancer Tails.\nAllez sur file:///usr/share/doc/tails/website/doc/about/requirements.en.html\n\nEssayez de redémarrer Tails afin de vérifier les mises à jour à nouveau.\n\nOu bien exécutez la mise à jour manuellement.\nAllez ici: https://tails.boum.org/doc/first_steps/upgrade#manual"
#: config/chroot_local-includes/usr/local/bin/tails-virt-notify-user:53
msgid "Warning: virtual machine detected!"
1
0

[translation/tails-misc_completed] Update translations for tails-misc_completed
by translation@torproject.org 19 Apr '14
by translation@torproject.org 19 Apr '14
19 Apr '14
commit 7def182f5ce24a8965ac23b31f76f10fd3e1613c
Author: Translation commit bot <translation(a)torproject.org>
Date: Sat Apr 19 11:45:38 2014 +0000
Update translations for tails-misc_completed
---
fr.po | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/fr.po b/fr.po
index 8b1bc1d..604df00 100644
--- a/fr.po
+++ b/fr.po
@@ -15,8 +15,8 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-03-23 08:55+0100\n"
-"PO-Revision-Date: 2014-04-04 08:51+0000\n"
-"Last-Translator: runasand <runa.sandvik(a)gmail.com>\n"
+"PO-Revision-Date: 2014-04-19 11:45+0000\n"
+"Last-Translator: bassmax\n"
"Language-Team: French (http://www.transifex.com/projects/p/torproject/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -350,7 +350,7 @@ msgstr "Quelque chose s'est mal passé lors du démarrage de I2P. Vérifiez les
#: config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper:19
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:57
msgid "error:"
-msgstr "erreur:"
+msgstr "erreur :"
#: config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper:20
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:58
@@ -396,7 +396,7 @@ msgid ""
"Network activity within the Unsafe Browser is <b>not anonymous</b>. Only use"
" the Unsafe Browser if necessary, for example if you have to login or "
"register to activate your Internet connection."
-msgstr "La navigation via le Navigateur Non-sécurisé n'est <b>pas anonyme</b>. N'utilisez le Navigateur Non-sécurisé que si c'est nécessaire, par exemple si vous devez vous identifier ou vous enregistrer pour avoir accès à Internet."
+msgstr "La navigation via le Navigateur Non-sécurisé n'est <b>pas anonyme</b>. N'utilisez le Navigateur Non-sécurisé que si c'est nécessaire, par exemple si vous devez vous identifier ou vous enregistrer pour activer votre accès à Internet."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:71
msgid "_Launch"
@@ -408,11 +408,11 @@ msgstr "_Sortir"
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:82
msgid "Starting the Unsafe Browser..."
-msgstr "Lancement du Navigateur Non-sécurisé..."
+msgstr "Démarrage du Navigateur Non-sécurisé..."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:83
msgid "This may take a while, so please be patient."
-msgstr "Ceci peut prendre du temps, merci d'être patient."
+msgstr "Ceci peut prendre un certain temps, veuillez patienter."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:101
msgid "Failed to setup chroot."
@@ -421,7 +421,7 @@ msgstr "L'exécution de chroot a échoué"
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:175
#: ../config/chroot_local-includes/usr/share/applications/unsafe-browser.desktop.in.h:1
msgid "Unsafe Browser"
-msgstr "Navigateur Non-sécurisé..."
+msgstr "Navigateur Non-sécurisé"
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:215
msgid "Shutting down the Unsafe Browser..."
@@ -431,7 +431,7 @@ msgstr "Fermeture du Navigateur Non-sécurisé..."
msgid ""
"This may take a while, and you may not restart the Unsafe Browser until it "
"is properly shut down."
-msgstr "Ceci peut prendre du temps, il vaut mieux ne pas relancer le Navigateur Non-sécurisé avant sa fermeture complète."
+msgstr "Ceci peut prendre un certain temps, et vous ne devriez pas redémarrer le Navigateur Non-sécurisé avant son arrêt complet."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:228
msgid "Failed to restart Tor."
@@ -441,13 +441,13 @@ msgstr "Le redémarrage de Tor a échoué."
msgid ""
"Another Unsafe Browser is currently running, or being cleaned up. Please "
"retry in a while."
-msgstr "Un autre Navigateur Non-sécurisé est en cours d'utilisation, ou en train d'être nettoyé. Merci d'essayer à nouveau dans un instant."
+msgstr "Un autre Navigateur Non-sécurisé est en cours d'utilisation ou de fermeture. Veuillez réessayer dans un instant."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:249
msgid ""
"No DNS server was obtained through DHCP or manually configured in "
"NetworkManager."
-msgstr "Aucun serveur DNS n'a été obtenu en DHCP ou via une configuration manuelle dans NetworkManager."
+msgstr "Aucun serveur DNS n'a été obtenu par DHCP ou via une configuration manuelle dans NetworkManager."
#: config/chroot_local-includes/usr/share/tails/truecrypt-wrapper.disabled:11
msgid "TrueCrypt will soon be removed from Tails"
1
0

[translation/tails-misc] Update translations for tails-misc
by translation@torproject.org 19 Apr '14
by translation@torproject.org 19 Apr '14
19 Apr '14
commit 0a103cc5e0761d1494a5c826abff5483c3f0999c
Author: Translation commit bot <translation(a)torproject.org>
Date: Sat Apr 19 11:45:34 2014 +0000
Update translations for tails-misc
---
fr.po | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/fr.po b/fr.po
index 8b1bc1d..604df00 100644
--- a/fr.po
+++ b/fr.po
@@ -15,8 +15,8 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-03-23 08:55+0100\n"
-"PO-Revision-Date: 2014-04-04 08:51+0000\n"
-"Last-Translator: runasand <runa.sandvik(a)gmail.com>\n"
+"PO-Revision-Date: 2014-04-19 11:45+0000\n"
+"Last-Translator: bassmax\n"
"Language-Team: French (http://www.transifex.com/projects/p/torproject/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -350,7 +350,7 @@ msgstr "Quelque chose s'est mal passé lors du démarrage de I2P. Vérifiez les
#: config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper:19
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:57
msgid "error:"
-msgstr "erreur:"
+msgstr "erreur :"
#: config/chroot_local-includes/usr/local/bin/tails-upgrade-frontend-wrapper:20
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:58
@@ -396,7 +396,7 @@ msgid ""
"Network activity within the Unsafe Browser is <b>not anonymous</b>. Only use"
" the Unsafe Browser if necessary, for example if you have to login or "
"register to activate your Internet connection."
-msgstr "La navigation via le Navigateur Non-sécurisé n'est <b>pas anonyme</b>. N'utilisez le Navigateur Non-sécurisé que si c'est nécessaire, par exemple si vous devez vous identifier ou vous enregistrer pour avoir accès à Internet."
+msgstr "La navigation via le Navigateur Non-sécurisé n'est <b>pas anonyme</b>. N'utilisez le Navigateur Non-sécurisé que si c'est nécessaire, par exemple si vous devez vous identifier ou vous enregistrer pour activer votre accès à Internet."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:71
msgid "_Launch"
@@ -408,11 +408,11 @@ msgstr "_Sortir"
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:82
msgid "Starting the Unsafe Browser..."
-msgstr "Lancement du Navigateur Non-sécurisé..."
+msgstr "Démarrage du Navigateur Non-sécurisé..."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:83
msgid "This may take a while, so please be patient."
-msgstr "Ceci peut prendre du temps, merci d'être patient."
+msgstr "Ceci peut prendre un certain temps, veuillez patienter."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:101
msgid "Failed to setup chroot."
@@ -421,7 +421,7 @@ msgstr "L'exécution de chroot a échoué"
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:175
#: ../config/chroot_local-includes/usr/share/applications/unsafe-browser.desktop.in.h:1
msgid "Unsafe Browser"
-msgstr "Navigateur Non-sécurisé..."
+msgstr "Navigateur Non-sécurisé"
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:215
msgid "Shutting down the Unsafe Browser..."
@@ -431,7 +431,7 @@ msgstr "Fermeture du Navigateur Non-sécurisé..."
msgid ""
"This may take a while, and you may not restart the Unsafe Browser until it "
"is properly shut down."
-msgstr "Ceci peut prendre du temps, il vaut mieux ne pas relancer le Navigateur Non-sécurisé avant sa fermeture complète."
+msgstr "Ceci peut prendre un certain temps, et vous ne devriez pas redémarrer le Navigateur Non-sécurisé avant son arrêt complet."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:228
msgid "Failed to restart Tor."
@@ -441,13 +441,13 @@ msgstr "Le redémarrage de Tor a échoué."
msgid ""
"Another Unsafe Browser is currently running, or being cleaned up. Please "
"retry in a while."
-msgstr "Un autre Navigateur Non-sécurisé est en cours d'utilisation, ou en train d'être nettoyé. Merci d'essayer à nouveau dans un instant."
+msgstr "Un autre Navigateur Non-sécurisé est en cours d'utilisation ou de fermeture. Veuillez réessayer dans un instant."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:249
msgid ""
"No DNS server was obtained through DHCP or manually configured in "
"NetworkManager."
-msgstr "Aucun serveur DNS n'a été obtenu en DHCP ou via une configuration manuelle dans NetworkManager."
+msgstr "Aucun serveur DNS n'a été obtenu par DHCP ou via une configuration manuelle dans NetworkManager."
#: config/chroot_local-includes/usr/share/tails/truecrypt-wrapper.disabled:11
msgid "TrueCrypt will soon be removed from Tails"
1
0

19 Apr '14
commit bb1d0569bb8dd618b44281f7e90e3f7d9e783e00
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Sat Apr 19 10:21:20 2014 +0200
Create node index in background thread.
---
etc/web.xml.template | 14 +-
src/org/torproject/onionoo/ApplicationFactory.java | 11 +
src/org/torproject/onionoo/NodeIndexer.java | 438 ++++++++++++++++++++
src/org/torproject/onionoo/RequestHandler.java | 321 ++------------
src/org/torproject/onionoo/ResourceServlet.java | 38 +-
src/org/torproject/onionoo/ResponseBuilder.java | 16 +-
.../torproject/onionoo/ResourceServletTest.java | 23 +-
7 files changed, 526 insertions(+), 335 deletions(-)
diff --git a/etc/web.xml.template b/etc/web.xml.template
index f69314f..988d47a 100644
--- a/etc/web.xml.template
+++ b/etc/web.xml.template
@@ -12,10 +12,6 @@
org.torproject.onionoo.ResourceServlet
</servlet-class>
<init-param>
- <param-name>outDir</param-name>
- <param-value>/srv/onionoo/out/</param-value>
- </init-param>
- <init-param>
<param-name>maintenance</param-name>
<param-value>0</param-value>
</init-param>
@@ -45,5 +41,15 @@
<url-pattern>/uptime</url-pattern>
</servlet-mapping>
+ <context-param>
+ <param-name>outDir</param-name>
+ <param-value>/srv/onionoo.torproject.org/onionoo/out/</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>
+ org.torproject.onionoo.NodeIndexer
+ </listener-class>
+ </listener>
</web-app>
diff --git a/src/org/torproject/onionoo/ApplicationFactory.java b/src/org/torproject/onionoo/ApplicationFactory.java
index 98952df..44f2c17 100644
--- a/src/org/torproject/onionoo/ApplicationFactory.java
+++ b/src/org/torproject/onionoo/ApplicationFactory.java
@@ -37,4 +37,15 @@ public class ApplicationFactory {
}
return documentStoreInstance;
}
+
+ private static NodeIndexer nodeIndexerInstance;
+ public static void setNodeIndexer(NodeIndexer nodeIndexer) {
+ nodeIndexerInstance = nodeIndexer;
+ }
+ public static NodeIndexer getNodeIndexer() {
+ if (nodeIndexerInstance == null) {
+ nodeIndexerInstance = new NodeIndexer();
+ }
+ return nodeIndexerInstance;
+ }
}
diff --git a/src/org/torproject/onionoo/NodeIndexer.java b/src/org/torproject/onionoo/NodeIndexer.java
new file mode 100644
index 0000000..87ecf9f
--- /dev/null
+++ b/src/org/torproject/onionoo/NodeIndexer.java
@@ -0,0 +1,438 @@
+package org.torproject.onionoo;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.SortedSet;
+import java.util.TreeMap;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+class NodeIndex {
+
+ private String relaysPublishedString;
+ public void setRelaysPublishedString(String relaysPublishedString) {
+ this.relaysPublishedString = relaysPublishedString;
+ }
+ public String getRelaysPublishedString() {
+ return relaysPublishedString;
+ }
+
+ private String bridgesPublishedString;
+ public void setBridgesPublishedString(String bridgesPublishedString) {
+ this.bridgesPublishedString = bridgesPublishedString;
+ }
+ public String getBridgesPublishedString() {
+ return bridgesPublishedString;
+ }
+
+ private List<String> relaysByConsensusWeight;
+ public void setRelaysByConsensusWeight(
+ List<String> relaysByConsensusWeight) {
+ this.relaysByConsensusWeight = relaysByConsensusWeight;
+ }
+ public List<String> getRelaysByConsensusWeight() {
+ return relaysByConsensusWeight;
+ }
+
+ private Map<String, String> relayFingerprintSummaryLines;
+ public void setRelayFingerprintSummaryLines(
+ Map<String, String> relayFingerprintSummaryLines) {
+ this.relayFingerprintSummaryLines = relayFingerprintSummaryLines;
+ }
+ public Map<String, String> getRelayFingerprintSummaryLines() {
+ return this.relayFingerprintSummaryLines;
+ }
+
+ private Map<String, String> bridgeFingerprintSummaryLines;
+ public void setBridgeFingerprintSummaryLines(
+ Map<String, String> bridgeFingerprintSummaryLines) {
+ this.bridgeFingerprintSummaryLines = bridgeFingerprintSummaryLines;
+ }
+ public Map<String, String> getBridgeFingerprintSummaryLines() {
+ return this.bridgeFingerprintSummaryLines;
+ }
+
+ private Map<String, Set<String>> relaysByCountryCode = null;
+ public void setRelaysByCountryCode(
+ Map<String, Set<String>> relaysByCountryCode) {
+ this.relaysByCountryCode = relaysByCountryCode;
+ }
+ public Map<String, Set<String>> getRelaysByCountryCode() {
+ return relaysByCountryCode;
+ }
+
+ private Map<String, Set<String>> relaysByASNumber = null;
+ public void setRelaysByASNumber(
+ Map<String, Set<String>> relaysByASNumber) {
+ this.relaysByASNumber = relaysByASNumber;
+ }
+ public Map<String, Set<String>> getRelaysByASNumber() {
+ return relaysByASNumber;
+ }
+
+ private Map<String, Set<String>> relaysByFlag = null;
+ public void setRelaysByFlag(Map<String, Set<String>> relaysByFlag) {
+ this.relaysByFlag = relaysByFlag;
+ }
+ public Map<String, Set<String>> getRelaysByFlag() {
+ return relaysByFlag;
+ }
+
+ private Map<String, Set<String>> bridgesByFlag = null;
+ public void setBridgesByFlag(Map<String, Set<String>> bridgesByFlag) {
+ this.bridgesByFlag = bridgesByFlag;
+ }
+ public Map<String, Set<String>> getBridgesByFlag() {
+ return bridgesByFlag;
+ }
+
+ private Map<String, Set<String>> relaysByContact = null;
+ public void setRelaysByContact(
+ Map<String, Set<String>> relaysByContact) {
+ this.relaysByContact = relaysByContact;
+ }
+ public Map<String, Set<String>> getRelaysByContact() {
+ return relaysByContact;
+ }
+
+ private SortedMap<Integer, Set<String>> relaysByFirstSeenDays;
+ public void setRelaysByFirstSeenDays(
+ SortedMap<Integer, Set<String>> relaysByFirstSeenDays) {
+ this.relaysByFirstSeenDays = relaysByFirstSeenDays;
+ }
+ public SortedMap<Integer, Set<String>> getRelaysByFirstSeenDays() {
+ return relaysByFirstSeenDays;
+ }
+
+ private SortedMap<Integer, Set<String>> bridgesByFirstSeenDays;
+ public void setBridgesByFirstSeenDays(
+ SortedMap<Integer, Set<String>> bridgesByFirstSeenDays) {
+ this.bridgesByFirstSeenDays = bridgesByFirstSeenDays;
+ }
+ public SortedMap<Integer, Set<String>> getBridgesByFirstSeenDays() {
+ return bridgesByFirstSeenDays;
+ }
+
+ private SortedMap<Integer, Set<String>> relaysByLastSeenDays;
+ public void setRelaysByLastSeenDays(
+ SortedMap<Integer, Set<String>> relaysByLastSeenDays) {
+ this.relaysByLastSeenDays = relaysByLastSeenDays;
+ }
+ public SortedMap<Integer, Set<String>> getRelaysByLastSeenDays() {
+ return relaysByLastSeenDays;
+ }
+
+ private SortedMap<Integer, Set<String>> bridgesByLastSeenDays;
+ public void setBridgesByLastSeenDays(
+ SortedMap<Integer, Set<String>> bridgesByLastSeenDays) {
+ this.bridgesByLastSeenDays = bridgesByLastSeenDays;
+ }
+ public SortedMap<Integer, Set<String>> getBridgesByLastSeenDays() {
+ return bridgesByLastSeenDays;
+ }
+}
+
+public class NodeIndexer implements ServletContextListener, Runnable {
+
+ public void contextInitialized(ServletContextEvent contextEvent) {
+ ServletContext servletContext = contextEvent.getServletContext();
+ File outDir = new File(servletContext.getInitParameter("outDir"));
+ DocumentStore documentStore = ApplicationFactory.getDocumentStore();
+ documentStore.setOutDir(outDir);
+ /* The servlet container created us, and we need to avoid that
+ * ApplicationFactory creates another instance of us. */
+ ApplicationFactory.setNodeIndexer(this);
+ this.startIndexing();
+ }
+
+ public void contextDestroyed(ServletContextEvent contextEvent) {
+ this.stopIndexing();
+ }
+
+ private long lastIndexed = -1L;
+
+ private NodeIndex latestNodeIndex = null;
+
+ private Thread nodeIndexerThread = null;
+
+ public synchronized long getLastIndexed(long timeoutMillis) {
+ if (this.lastIndexed == 0L && this.nodeIndexerThread != null &&
+ timeoutMillis > 0L) {
+ try {
+ this.wait(timeoutMillis);
+ } catch (InterruptedException e) {
+ }
+ }
+ return this.lastIndexed;
+ }
+
+ public synchronized NodeIndex getLatestNodeIndex(long timeoutMillis) {
+ if (this.latestNodeIndex == null && this.nodeIndexerThread != null &&
+ timeoutMillis > 0L) {
+ try {
+ this.wait(timeoutMillis);
+ } catch (InterruptedException e) {
+ }
+ }
+ return this.latestNodeIndex;
+ }
+
+ public synchronized void startIndexing() {
+ if (this.nodeIndexerThread == null) {
+ this.nodeIndexerThread = new Thread(this);
+ this.nodeIndexerThread.setDaemon(true);
+ this.nodeIndexerThread.start();
+ }
+ }
+
+ public void run() {
+ while (this.nodeIndexerThread != null) {
+ this.indexNodeStatuses();
+ try {
+ Thread.sleep(DateTimeHelper.ONE_MINUTE);
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+
+ public synchronized void stopIndexing() {
+ Thread indexerThread = this.nodeIndexerThread;
+ this.nodeIndexerThread = null;
+ indexerThread.interrupt();
+ }
+
+ private void indexNodeStatuses() {
+ long updateStatusMillis = -1L;
+ DocumentStore documentStore = ApplicationFactory.getDocumentStore();
+ UpdateStatus updateStatus = documentStore.retrieve(UpdateStatus.class,
+ false);
+ if (updateStatus != null &&
+ updateStatus.getDocumentString() != null) {
+ String updateString = updateStatus.getDocumentString();
+ try {
+ updateStatusMillis = Long.parseLong(updateString.trim());
+ } catch (NumberFormatException e) {
+ /* Handle below. */
+ }
+ }
+ synchronized (this) {
+ if (updateStatusMillis <= this.lastIndexed) {
+ return;
+ }
+ }
+ List<String> newRelaysByConsensusWeight = new ArrayList<String>();
+ Map<String, String>
+ newRelayFingerprintSummaryLines = new HashMap<String, String>(),
+ newBridgeFingerprintSummaryLines = new HashMap<String, String>();
+ Map<String, Set<String>>
+ newRelaysByCountryCode = new HashMap<String, Set<String>>(),
+ newRelaysByASNumber = new HashMap<String, Set<String>>(),
+ newRelaysByFlag = new HashMap<String, Set<String>>(),
+ newBridgesByFlag = new HashMap<String, Set<String>>(),
+ newRelaysByContact = new HashMap<String, Set<String>>();
+ SortedMap<Integer, Set<String>>
+ newRelaysByFirstSeenDays = new TreeMap<Integer, Set<String>>(),
+ newBridgesByFirstSeenDays = new TreeMap<Integer, Set<String>>(),
+ newRelaysByLastSeenDays = new TreeMap<Integer, Set<String>>(),
+ newBridgesByLastSeenDays = new TreeMap<Integer, Set<String>>();
+ Set<NodeStatus> currentRelays = new HashSet<NodeStatus>(),
+ currentBridges = new HashSet<NodeStatus>();
+ SortedSet<String> fingerprints = documentStore.list(NodeStatus.class,
+ false);
+ long relaysLastValidAfterMillis = 0L, bridgesLastPublishedMillis = 0L;
+ for (String fingerprint : fingerprints) {
+ NodeStatus node = documentStore.retrieve(NodeStatus.class, true,
+ fingerprint);
+ if (node.isRelay()) {
+ relaysLastValidAfterMillis = Math.max(
+ relaysLastValidAfterMillis, node.getLastSeenMillis());
+ currentRelays.add(node);
+ } else {
+ bridgesLastPublishedMillis = Math.max(
+ bridgesLastPublishedMillis, node.getLastSeenMillis());
+ currentBridges.add(node);
+ }
+ }
+ Time time = ApplicationFactory.getTime();
+ List<String> orderRelaysByConsensusWeight = new ArrayList<String>();
+ for (NodeStatus entry : currentRelays) {
+ String fingerprint = entry.getFingerprint().toUpperCase();
+ String hashedFingerprint = entry.getHashedFingerprint().
+ toUpperCase();
+ entry.setRunning(entry.getLastSeenMillis() ==
+ relaysLastValidAfterMillis);
+ String line = formatRelaySummaryLine(entry);
+ newRelayFingerprintSummaryLines.put(fingerprint, line);
+ newRelayFingerprintSummaryLines.put(hashedFingerprint, line);
+ long consensusWeight = entry.getConsensusWeight();
+ orderRelaysByConsensusWeight.add(String.format("%020d %s",
+ consensusWeight, fingerprint));
+ orderRelaysByConsensusWeight.add(String.format("%020d %s",
+ consensusWeight, hashedFingerprint));
+ if (entry.getCountryCode() != null) {
+ String countryCode = entry.getCountryCode();
+ if (!newRelaysByCountryCode.containsKey(countryCode)) {
+ newRelaysByCountryCode.put(countryCode,
+ new HashSet<String>());
+ }
+ newRelaysByCountryCode.get(countryCode).add(fingerprint);
+ newRelaysByCountryCode.get(countryCode).add(hashedFingerprint);
+ }
+ if (entry.getASNumber() != null) {
+ String aSNumber = entry.getASNumber();
+ if (!newRelaysByASNumber.containsKey(aSNumber)) {
+ newRelaysByASNumber.put(aSNumber, new HashSet<String>());
+ }
+ newRelaysByASNumber.get(aSNumber).add(fingerprint);
+ newRelaysByASNumber.get(aSNumber).add(hashedFingerprint);
+ }
+ for (String flag : entry.getRelayFlags()) {
+ String flagLowerCase = flag.toLowerCase();
+ if (!newRelaysByFlag.containsKey(flagLowerCase)) {
+ newRelaysByFlag.put(flagLowerCase, new HashSet<String>());
+ }
+ newRelaysByFlag.get(flagLowerCase).add(fingerprint);
+ newRelaysByFlag.get(flagLowerCase).add(hashedFingerprint);
+ }
+ int daysSinceFirstSeen = (int) ((time.currentTimeMillis()
+ - entry.getFirstSeenMillis()) / DateTimeHelper.ONE_DAY);
+ if (!newRelaysByFirstSeenDays.containsKey(daysSinceFirstSeen)) {
+ newRelaysByFirstSeenDays.put(daysSinceFirstSeen,
+ new HashSet<String>());
+ }
+ newRelaysByFirstSeenDays.get(daysSinceFirstSeen).add(fingerprint);
+ newRelaysByFirstSeenDays.get(daysSinceFirstSeen).add(
+ hashedFingerprint);
+ int daysSinceLastSeen = (int) ((time.currentTimeMillis()
+ - entry.getLastSeenMillis()) / DateTimeHelper.ONE_DAY);
+ if (!newRelaysByLastSeenDays.containsKey(daysSinceLastSeen)) {
+ newRelaysByLastSeenDays.put(daysSinceLastSeen,
+ new HashSet<String>());
+ }
+ newRelaysByLastSeenDays.get(daysSinceLastSeen).add(fingerprint);
+ newRelaysByLastSeenDays.get(daysSinceLastSeen).add(
+ hashedFingerprint);
+ String contact = entry.getContact();
+ if (!newRelaysByContact.containsKey(contact)) {
+ newRelaysByContact.put(contact, new HashSet<String>());
+ }
+ newRelaysByContact.get(contact).add(fingerprint);
+ newRelaysByContact.get(contact).add(hashedFingerprint);
+ }
+ Collections.sort(orderRelaysByConsensusWeight);
+ newRelaysByConsensusWeight = new ArrayList<String>();
+ for (String relay : orderRelaysByConsensusWeight) {
+ newRelaysByConsensusWeight.add(relay.split(" ")[1]);
+ }
+ for (NodeStatus entry : currentBridges) {
+ String hashedFingerprint = entry.getFingerprint().toUpperCase();
+ String hashedHashedFingerprint = entry.getHashedFingerprint().
+ toUpperCase();
+ entry.setRunning(entry.getRelayFlags().contains("Running") &&
+ entry.getLastSeenMillis() == bridgesLastPublishedMillis);
+ String line = formatBridgeSummaryLine(entry);
+ newBridgeFingerprintSummaryLines.put(hashedFingerprint, line);
+ newBridgeFingerprintSummaryLines.put(hashedHashedFingerprint,
+ line);
+ for (String flag : entry.getRelayFlags()) {
+ String flagLowerCase = flag.toLowerCase();
+ if (!newBridgesByFlag.containsKey(flagLowerCase)) {
+ newBridgesByFlag.put(flagLowerCase, new HashSet<String>());
+ }
+ newBridgesByFlag.get(flagLowerCase).add(hashedFingerprint);
+ newBridgesByFlag.get(flagLowerCase).add(
+ hashedHashedFingerprint);
+ }
+ int daysSinceFirstSeen = (int) ((time.currentTimeMillis()
+ - entry.getFirstSeenMillis()) / DateTimeHelper.ONE_DAY);
+ if (!newBridgesByFirstSeenDays.containsKey(daysSinceFirstSeen)) {
+ newBridgesByFirstSeenDays.put(daysSinceFirstSeen,
+ new HashSet<String>());
+ }
+ newBridgesByFirstSeenDays.get(daysSinceFirstSeen).add(
+ hashedFingerprint);
+ newBridgesByFirstSeenDays.get(daysSinceFirstSeen).add(
+ hashedHashedFingerprint);
+ int daysSinceLastSeen = (int) ((time.currentTimeMillis()
+ - entry.getLastSeenMillis()) / DateTimeHelper.ONE_DAY);
+ if (!newBridgesByLastSeenDays.containsKey(daysSinceLastSeen)) {
+ newBridgesByLastSeenDays.put(daysSinceLastSeen,
+ new HashSet<String>());
+ }
+ newBridgesByLastSeenDays.get(daysSinceLastSeen).add(
+ hashedFingerprint);
+ newBridgesByLastSeenDays.get(daysSinceLastSeen).add(
+ hashedHashedFingerprint);
+ }
+ NodeIndex newNodeIndex = new NodeIndex();
+ newNodeIndex.setRelaysByConsensusWeight(newRelaysByConsensusWeight);
+ newNodeIndex.setRelayFingerprintSummaryLines(
+ newRelayFingerprintSummaryLines);
+ newNodeIndex.setBridgeFingerprintSummaryLines(
+ newBridgeFingerprintSummaryLines);
+ newNodeIndex.setRelaysByCountryCode(newRelaysByCountryCode);
+ newNodeIndex.setRelaysByASNumber(newRelaysByASNumber);
+ newNodeIndex.setRelaysByFlag(newRelaysByFlag);
+ newNodeIndex.setBridgesByFlag(newBridgesByFlag);
+ newNodeIndex.setRelaysByContact(newRelaysByContact);
+ newNodeIndex.setRelaysByFirstSeenDays(newRelaysByFirstSeenDays);
+ newNodeIndex.setRelaysByLastSeenDays(newRelaysByLastSeenDays);
+ newNodeIndex.setBridgesByFirstSeenDays(newBridgesByFirstSeenDays);
+ newNodeIndex.setBridgesByLastSeenDays(newBridgesByLastSeenDays);
+ newNodeIndex.setRelaysPublishedString(DateTimeHelper.format(
+ relaysLastValidAfterMillis));
+ newNodeIndex.setBridgesPublishedString(DateTimeHelper.format(
+ bridgesLastPublishedMillis));
+ synchronized (this) {
+ this.lastIndexed = updateStatusMillis;
+ this.latestNodeIndex = newNodeIndex;
+ 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 89871ae..f0e58da 100644
--- a/src/org/torproject/onionoo/RequestHandler.java
+++ b/src/org/torproject/onionoo/RequestHandler.java
@@ -10,278 +10,13 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedMap;
-import java.util.SortedSet;
-import java.util.TreeMap;
public class RequestHandler {
- private static long summaryFileLastModified = -1L;
- private static DocumentStore documentStore;
- private static Time time;
- private static boolean successfullyReadSummaryFile = false;
- private static String relaysPublishedString, bridgesPublishedString;
- private static List<String> relaysByConsensusWeight = null;
- private static Map<String, String> relayFingerprintSummaryLines = null,
- bridgeFingerprintSummaryLines = null;
- private static Map<String, Set<String>> relaysByCountryCode = null,
- relaysByASNumber = null, relaysByFlag = null, bridgesByFlag = null,
- relaysByContact = null;
- private static SortedMap<Integer, Set<String>>
- relaysByFirstSeenDays = null, bridgesByFirstSeenDays = null,
- relaysByLastSeenDays = null, bridgesByLastSeenDays = null;
- private static final long SUMMARY_MAX_AGE = DateTimeHelper.SIX_HOURS;
-
- public static void initialize() {
- documentStore = ApplicationFactory.getDocumentStore();
- time = ApplicationFactory.getTime();
- readSummaryFile();
- }
-
- public static boolean update() {
- readSummaryFile();
- return successfullyReadSummaryFile;
- }
-
- private static void readSummaryFile() {
- long newSummaryFileLastModified = -1L;
- UpdateStatus updateStatus = documentStore.retrieve(UpdateStatus.class,
- false);
- if (updateStatus != null &&
- updateStatus.getDocumentString() != null) {
- String updateString = updateStatus.getDocumentString();
- try {
- newSummaryFileLastModified = Long.parseLong(updateString.trim());
- } catch (NumberFormatException e) {
- /* Handle below. */
- }
- }
- if (newSummaryFileLastModified < 0L) {
- // TODO Does this actually solve anything? Should we instead
- // switch to a variant of the maintenance mode and re-check when
- // the next requests comes in that happens x seconds after this one?
- successfullyReadSummaryFile = false;
- return;
- }
- if (newSummaryFileLastModified + SUMMARY_MAX_AGE
- < time.currentTimeMillis()) {
- // TODO Does this actually solve anything? Should we instead
- // switch to a variant of the maintenance mode and re-check when
- // the next requests comes in that happens x seconds after this one?
- successfullyReadSummaryFile = false;
- return;
- }
- if (newSummaryFileLastModified > summaryFileLastModified) {
- List<String> newRelaysByConsensusWeight = new ArrayList<String>();
- Map<String, String>
- newRelayFingerprintSummaryLines = new HashMap<String, String>(),
- newBridgeFingerprintSummaryLines =
- new HashMap<String, String>();
- Map<String, Set<String>>
- newRelaysByCountryCode = new HashMap<String, Set<String>>(),
- newRelaysByASNumber = new HashMap<String, Set<String>>(),
- newRelaysByFlag = new HashMap<String, Set<String>>(),
- newBridgesByFlag = new HashMap<String, Set<String>>(),
- newRelaysByContact = new HashMap<String, Set<String>>();
- SortedMap<Integer, Set<String>>
- newRelaysByFirstSeenDays = new TreeMap<Integer, Set<String>>(),
- newBridgesByFirstSeenDays = new TreeMap<Integer, Set<String>>(),
- newRelaysByLastSeenDays = new TreeMap<Integer, Set<String>>(),
- newBridgesByLastSeenDays = new TreeMap<Integer, Set<String>>();
- long relaysLastValidAfterMillis = -1L,
- bridgesLastPublishedMillis = -1L;
- String newRelaysPublishedString, newBridgesPublishedString;
- Set<NodeStatus> currentRelays = new HashSet<NodeStatus>(),
- currentBridges = new HashSet<NodeStatus>();
- SortedSet<String> fingerprints = documentStore.list(
- NodeStatus.class, false);
- // TODO We should be able to learn if something goes wrong when
- // reading the summary file, rather than silently having an empty
- // list of fingerprints.
- for (String fingerprint : fingerprints) {
- NodeStatus node = documentStore.retrieve(NodeStatus.class, true,
- fingerprint);
- if (node.isRelay()) {
- relaysLastValidAfterMillis = Math.max(
- relaysLastValidAfterMillis, node.getLastSeenMillis());
- currentRelays.add(node);
- } else {
- bridgesLastPublishedMillis = Math.max(
- bridgesLastPublishedMillis, node.getLastSeenMillis());
- currentBridges.add(node);
- }
- }
- newRelaysPublishedString = DateTimeHelper.format(
- relaysLastValidAfterMillis);
- newBridgesPublishedString = DateTimeHelper.format(
- bridgesLastPublishedMillis);
- List<String> orderRelaysByConsensusWeight = new ArrayList<String>();
- for (NodeStatus entry : currentRelays) {
- String fingerprint = entry.getFingerprint().toUpperCase();
- String hashedFingerprint = entry.getHashedFingerprint().
- toUpperCase();
- entry.setRunning(entry.getLastSeenMillis() ==
- relaysLastValidAfterMillis);
- String line = formatRelaySummaryLine(entry);
- newRelayFingerprintSummaryLines.put(fingerprint, line);
- newRelayFingerprintSummaryLines.put(hashedFingerprint, line);
- long consensusWeight = entry.getConsensusWeight();
- orderRelaysByConsensusWeight.add(String.format("%020d %s",
- consensusWeight, fingerprint));
- orderRelaysByConsensusWeight.add(String.format("%020d %s",
- consensusWeight, hashedFingerprint));
- if (entry.getCountryCode() != null) {
- String countryCode = entry.getCountryCode();
- if (!newRelaysByCountryCode.containsKey(countryCode)) {
- newRelaysByCountryCode.put(countryCode,
- new HashSet<String>());
- }
- newRelaysByCountryCode.get(countryCode).add(fingerprint);
- newRelaysByCountryCode.get(countryCode).add(hashedFingerprint);
- }
- if (entry.getASNumber() != null) {
- String aSNumber = entry.getASNumber();
- if (!newRelaysByASNumber.containsKey(aSNumber)) {
- newRelaysByASNumber.put(aSNumber, new HashSet<String>());
- }
- newRelaysByASNumber.get(aSNumber).add(fingerprint);
- newRelaysByASNumber.get(aSNumber).add(hashedFingerprint);
- }
- for (String flag : entry.getRelayFlags()) {
- String flagLowerCase = flag.toLowerCase();
- if (!newRelaysByFlag.containsKey(flagLowerCase)) {
- newRelaysByFlag.put(flagLowerCase, new HashSet<String>());
- }
- newRelaysByFlag.get(flagLowerCase).add(fingerprint);
- newRelaysByFlag.get(flagLowerCase).add(hashedFingerprint);
- }
- int daysSinceFirstSeen = (int) ((newSummaryFileLastModified
- - entry.getFirstSeenMillis()) / 86400000L);
- if (!newRelaysByFirstSeenDays.containsKey(daysSinceFirstSeen)) {
- newRelaysByFirstSeenDays.put(daysSinceFirstSeen,
- new HashSet<String>());
- }
- newRelaysByFirstSeenDays.get(daysSinceFirstSeen).add(fingerprint);
- newRelaysByFirstSeenDays.get(daysSinceFirstSeen).add(
- hashedFingerprint);
- int daysSinceLastSeen = (int) ((newSummaryFileLastModified
- - entry.getLastSeenMillis()) / 86400000L);
- if (!newRelaysByLastSeenDays.containsKey(daysSinceLastSeen)) {
- newRelaysByLastSeenDays.put(daysSinceLastSeen,
- new HashSet<String>());
- }
- newRelaysByLastSeenDays.get(daysSinceLastSeen).add(fingerprint);
- newRelaysByLastSeenDays.get(daysSinceLastSeen).add(
- hashedFingerprint);
- String contact = entry.getContact();
- if (!newRelaysByContact.containsKey(contact)) {
- newRelaysByContact.put(contact, new HashSet<String>());
- }
- newRelaysByContact.get(contact).add(fingerprint);
- newRelaysByContact.get(contact).add(hashedFingerprint);
- }
- Collections.sort(orderRelaysByConsensusWeight);
- newRelaysByConsensusWeight = new ArrayList<String>();
- for (String relay : orderRelaysByConsensusWeight) {
- newRelaysByConsensusWeight.add(relay.split(" ")[1]);
- }
- for (NodeStatus entry : currentBridges) {
- String hashedFingerprint = entry.getFingerprint().toUpperCase();
- String hashedHashedFingerprint = entry.getHashedFingerprint().
- toUpperCase();
- entry.setRunning(entry.getRelayFlags().contains("Running") &&
- entry.getLastSeenMillis() == bridgesLastPublishedMillis);
- String line = formatBridgeSummaryLine(entry);
- newBridgeFingerprintSummaryLines.put(hashedFingerprint, line);
- newBridgeFingerprintSummaryLines.put(hashedHashedFingerprint,
- line);
- for (String flag : entry.getRelayFlags()) {
- String flagLowerCase = flag.toLowerCase();
- if (!newBridgesByFlag.containsKey(flagLowerCase)) {
- newBridgesByFlag.put(flagLowerCase, new HashSet<String>());
- }
- newBridgesByFlag.get(flagLowerCase).add(hashedFingerprint);
- newBridgesByFlag.get(flagLowerCase).add(
- hashedHashedFingerprint);
- }
- int daysSinceFirstSeen = (int) ((newSummaryFileLastModified
- - entry.getFirstSeenMillis()) / 86400000L);
- if (!newBridgesByFirstSeenDays.containsKey(daysSinceFirstSeen)) {
- newBridgesByFirstSeenDays.put(daysSinceFirstSeen,
- new HashSet<String>());
- }
- newBridgesByFirstSeenDays.get(daysSinceFirstSeen).add(
- hashedFingerprint);
- newBridgesByFirstSeenDays.get(daysSinceFirstSeen).add(
- hashedHashedFingerprint);
- int daysSinceLastSeen = (int) ((newSummaryFileLastModified
- - entry.getLastSeenMillis()) / 86400000L);
- if (!newBridgesByLastSeenDays.containsKey(daysSinceLastSeen)) {
- newBridgesByLastSeenDays.put(daysSinceLastSeen,
- new HashSet<String>());
- }
- newBridgesByLastSeenDays.get(daysSinceLastSeen).add(
- hashedFingerprint);
- newBridgesByLastSeenDays.get(daysSinceLastSeen).add(
- hashedHashedFingerprint);
- }
- relaysByConsensusWeight = newRelaysByConsensusWeight;
- relayFingerprintSummaryLines = newRelayFingerprintSummaryLines;
- bridgeFingerprintSummaryLines = newBridgeFingerprintSummaryLines;
- relaysByCountryCode = newRelaysByCountryCode;
- relaysByASNumber = newRelaysByASNumber;
- relaysByFlag = newRelaysByFlag;
- bridgesByFlag = newBridgesByFlag;
- relaysByContact = newRelaysByContact;
- relaysByFirstSeenDays = newRelaysByFirstSeenDays;
- relaysByLastSeenDays = newRelaysByLastSeenDays;
- bridgesByFirstSeenDays = newBridgesByFirstSeenDays;
- bridgesByLastSeenDays = newBridgesByLastSeenDays;
- relaysPublishedString = newRelaysPublishedString;
- bridgesPublishedString = newBridgesPublishedString;
- }
- summaryFileLastModified = newSummaryFileLastModified;
- successfullyReadSummaryFile = true;
- }
-
- private static 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 static 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);
- }
+ private NodeIndex nodeIndex;
- public static long getLastModified() {
- readSummaryFile();
- return summaryFileLastModified;
+ public RequestHandler(NodeIndex nodeIndex) {
+ this.nodeIndex = nodeIndex;
}
private String resourceType;
@@ -368,8 +103,10 @@ public class RequestHandler {
new HashMap<String, String>();
public void handleRequest() {
- this.filteredRelays.putAll(relayFingerprintSummaryLines);
- this.filteredBridges.putAll(bridgeFingerprintSummaryLines);
+ this.filteredRelays.putAll(
+ this.nodeIndex.getRelayFingerprintSummaryLines());
+ this.filteredBridges.putAll(
+ this.nodeIndex.getBridgeFingerprintSummaryLines());
this.filterByResourceType();
this.filterByType();
this.filterByRunning();
@@ -531,11 +268,12 @@ public class RequestHandler {
return;
}
String countryCode = this.country.toLowerCase();
- if (!relaysByCountryCode.containsKey(countryCode)) {
+ if (!this.nodeIndex.getRelaysByCountryCode().containsKey(
+ countryCode)) {
this.filteredRelays.clear();
} else {
Set<String> relaysWithCountryCode =
- relaysByCountryCode.get(countryCode);
+ this.nodeIndex.getRelaysByCountryCode().get(countryCode);
Set<String> removeRelays = new HashSet<String>();
for (Map.Entry<String, String> e : this.filteredRelays.entrySet()) {
String fingerprint = e.getKey();
@@ -558,11 +296,11 @@ public class RequestHandler {
if (!aSNumber.startsWith("AS")) {
aSNumber = "AS" + aSNumber;
}
- if (!relaysByASNumber.containsKey(aSNumber)) {
+ if (!this.nodeIndex.getRelaysByASNumber().containsKey(aSNumber)) {
this.filteredRelays.clear();
} else {
Set<String> relaysWithASNumber =
- relaysByASNumber.get(aSNumber);
+ this.nodeIndex.getRelaysByASNumber().get(aSNumber);
Set<String> removeRelays = new HashSet<String>();
for (Map.Entry<String, String> e : this.filteredRelays.entrySet()) {
String fingerprint = e.getKey();
@@ -582,10 +320,11 @@ public class RequestHandler {
return;
}
String flag = this.flag.toLowerCase();
- if (!relaysByFlag.containsKey(flag)) {
+ if (!this.nodeIndex.getRelaysByFlag().containsKey(flag)) {
this.filteredRelays.clear();
} else {
- Set<String> relaysWithFlag = relaysByFlag.get(flag);
+ 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();
@@ -597,10 +336,11 @@ public class RequestHandler {
this.filteredRelays.remove(fingerprint);
}
}
- if (!bridgesByFlag.containsKey(flag)) {
+ if (!this.nodeIndex.getBridgesByFlag().containsKey(flag)) {
this.filteredBridges.clear();
} else {
- Set<String> bridgesWithFlag = bridgesByFlag.get(flag);
+ Set<String> bridgesWithFlag = this.nodeIndex.getBridgesByFlag().get(
+ flag);
Set<String> removeBridges = new HashSet<String>();
for (Map.Entry<String, String> e :
this.filteredBridges.entrySet()) {
@@ -619,20 +359,20 @@ public class RequestHandler {
if (this.firstSeenDays == null) {
return;
}
- filterNodesByDays(this.filteredRelays, relaysByFirstSeenDays,
- this.firstSeenDays);
- filterNodesByDays(this.filteredBridges, bridgesByFirstSeenDays,
- this.firstSeenDays);
+ filterNodesByDays(this.filteredRelays,
+ this.nodeIndex.getRelaysByFirstSeenDays(), this.firstSeenDays);
+ filterNodesByDays(this.filteredBridges,
+ this.nodeIndex.getBridgesByFirstSeenDays(), this.firstSeenDays);
}
private void filterNodesByLastSeenDays() {
if (this.lastSeenDays == null) {
return;
}
- filterNodesByDays(this.filteredRelays, relaysByLastSeenDays,
- this.lastSeenDays);
- filterNodesByDays(this.filteredBridges, bridgesByLastSeenDays,
- this.lastSeenDays);
+ filterNodesByDays(this.filteredRelays,
+ this.nodeIndex.getRelaysByLastSeenDays(), this.lastSeenDays);
+ filterNodesByDays(this.filteredBridges,
+ this.nodeIndex.getBridgesByLastSeenDays(), this.lastSeenDays);
}
private void filterNodesByDays(Map<String, String> filteredNodes,
@@ -657,7 +397,8 @@ public class RequestHandler {
return;
}
Set<String> removeRelays = new HashSet<String>();
- for (Map.Entry<String, Set<String>> e : relaysByContact.entrySet()) {
+ for (Map.Entry<String, Set<String>> e :
+ this.nodeIndex.getRelaysByContact().entrySet()) {
String contact = e.getKey();
for (String contactPart : this.contact) {
if (contact == null ||
@@ -676,7 +417,7 @@ public class RequestHandler {
private void order() {
if (this.order != null && this.order.length == 1) {
List<String> orderBy = new ArrayList<String>(
- relaysByConsensusWeight);
+ this.nodeIndex.getRelaysByConsensusWeight());
if (this.order[0].startsWith("-")) {
Collections.reverse(orderBy);
}
@@ -747,10 +488,10 @@ public class RequestHandler {
}
public String getRelaysPublishedString() {
- return relaysPublishedString;
+ return this.nodeIndex.getRelaysPublishedString();
}
public String getBridgesPublishedString() {
- return bridgesPublishedString;
+ return this.nodeIndex.getBridgesPublishedString();
}
}
diff --git a/src/org/torproject/onionoo/ResourceServlet.java b/src/org/torproject/onionoo/ResourceServlet.java
index dcfefc5..f2f3005 100644
--- a/src/org/torproject/onionoo/ResourceServlet.java
+++ b/src/org/torproject/onionoo/ResourceServlet.java
@@ -2,7 +2,6 @@
* See LICENSE for licensing information */
package org.torproject.onionoo;
-import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
@@ -27,30 +26,17 @@ public class ResourceServlet extends HttpServlet {
/* Called by servlet container, not by test class. */
public void init(ServletConfig config) throws ServletException {
super.init(config);
- boolean maintenanceMode =
- config.getInitParameter("maintenance") != null
- && config.getInitParameter("maintenance").equals("1");
- File outDir = new File(config.getInitParameter("outDir"));
- DocumentStore documentStore = ApplicationFactory.getDocumentStore();
- documentStore.setOutDir(outDir);
- this.init(maintenanceMode);
- }
-
- /* Called (indirectly) by servlet container and (directly) by test
- * class. */
- protected void init(boolean maintenanceMode) {
- this.maintenanceMode = maintenanceMode;
- if (!maintenanceMode) {
- RequestHandler.initialize();
- ResponseBuilder.initialize();
- }
+ this.maintenanceMode =
+ config.getInitParameter("maintenance") != null &&
+ config.getInitParameter("maintenance").equals("1");
}
public long getLastModified(HttpServletRequest request) {
if (this.maintenanceMode) {
return super.getLastModified(request);
} else {
- return RequestHandler.getLastModified();
+ return ApplicationFactory.getNodeIndexer().getLastIndexed(
+ DateTimeHelper.TEN_SECONDS);
}
}
@@ -109,7 +95,16 @@ public class ResourceServlet extends HttpServlet {
return;
}
- if (!RequestHandler.update()) {
+ if (ApplicationFactory.getNodeIndexer().getLastIndexed(
+ DateTimeHelper.TEN_SECONDS) + DateTimeHelper.SIX_HOURS
+ < ApplicationFactory.getTime().currentTimeMillis()) {
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+ return;
+ }
+
+ NodeIndex nodeIndex = ApplicationFactory.getNodeIndexer().
+ getLatestNodeIndex(DateTimeHelper.TEN_SECONDS);
+ if (nodeIndex == null) {
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
return;
}
@@ -135,7 +130,8 @@ public class ResourceServlet extends HttpServlet {
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
return;
}
- RequestHandler rh = new RequestHandler();
+
+ RequestHandler rh = new RequestHandler(nodeIndex);
rh.setResourceType(resourceType);
/* Extract parameters either from the old-style URI or from request
diff --git a/src/org/torproject/onionoo/ResponseBuilder.java b/src/org/torproject/onionoo/ResponseBuilder.java
index a841d29..d14ee5b 100644
--- a/src/org/torproject/onionoo/ResponseBuilder.java
+++ b/src/org/torproject/onionoo/ResponseBuilder.java
@@ -9,10 +9,10 @@ import java.util.Scanner;
public class ResponseBuilder {
- private static DocumentStore documentStore;
+ private DocumentStore documentStore;
- public static void initialize() {
- documentStore = ApplicationFactory.getDocumentStore();
+ public ResponseBuilder() {
+ this.documentStore = ApplicationFactory.getDocumentStore();
}
private String resourceType;
@@ -114,7 +114,7 @@ public class ResponseBuilder {
return "";
}
fingerprint = fingerprint.substring(0, 40);
- DetailsDocument detailsDocument = documentStore.retrieve(
+ DetailsDocument detailsDocument = this.documentStore.retrieve(
DetailsDocument.class, false, fingerprint);
if (detailsDocument != null &&
detailsDocument.getDocumentString() != null) {
@@ -184,7 +184,7 @@ public class ResponseBuilder {
return "";
}
fingerprint = fingerprint.substring(0, 40);
- BandwidthDocument bandwidthDocument = documentStore.retrieve(
+ BandwidthDocument bandwidthDocument = this.documentStore.retrieve(
BandwidthDocument.class, false, fingerprint);
if (bandwidthDocument != null &&
bandwidthDocument.getDocumentString() != null) {
@@ -208,7 +208,7 @@ public class ResponseBuilder {
return "";
}
fingerprint = fingerprint.substring(0, 40);
- WeightsDocument weightsDocument = documentStore.retrieve(
+ WeightsDocument weightsDocument = this.documentStore.retrieve(
WeightsDocument.class, false, fingerprint);
if (weightsDocument != null &&
weightsDocument.getDocumentString() != null) {
@@ -231,7 +231,7 @@ public class ResponseBuilder {
return "";
}
fingerprint = fingerprint.substring(0, 40);
- ClientsDocument clientsDocument = documentStore.retrieve(
+ ClientsDocument clientsDocument = this.documentStore.retrieve(
ClientsDocument.class, false, fingerprint);
if (clientsDocument != null &&
clientsDocument.getDocumentString() != null) {
@@ -257,7 +257,7 @@ public class ResponseBuilder {
return "";
}
fingerprint = fingerprint.substring(0, 40);
- UptimeDocument uptimeDocument = documentStore.retrieve(
+ UptimeDocument uptimeDocument = this.documentStore.retrieve(
UptimeDocument.class, false, fingerprint);
if (uptimeDocument != null &&
uptimeDocument.getDocumentString() != null) {
diff --git a/test/org/torproject/onionoo/ResourceServletTest.java b/test/org/torproject/onionoo/ResourceServletTest.java
index cbe787c..f5395ed 100644
--- a/test/org/torproject/onionoo/ResourceServletTest.java
+++ b/test/org/torproject/onionoo/ResourceServletTest.java
@@ -32,12 +32,8 @@ public class ResourceServletTest {
private SortedMap<String, String> relays, bridges;
- // 2013-04-24 12:22:22
- private static long lastModified = 1366806142000L;
-
- private long currentTimeMillis = 1366806142000L;
-
- private boolean maintenanceMode = false;
+ private long currentTimeMillis = DateTimeHelper.parse(
+ "2013-04-24 12:22:22");
private class TestingHttpServletRequestWrapper
extends HttpServletRequestWrapper {
@@ -149,6 +145,7 @@ public class ResourceServletTest {
try {
this.createDummyTime();
this.createDummyDocumentStore();
+ this.createNodeIndexer();
this.makeRequest(requestURI, parameterMap);
this.parseResponse();
} catch (IOException e) {
@@ -162,13 +159,10 @@ public class ResourceServletTest {
}
private void createDummyDocumentStore() {
- /* TODO Incrementing static lastModified is necessary for
- * ResponseBuilder to read state from the newly created DocumentStore.
- * Otherwise, ResponseBuilder would use data from the previous test
- * run. This is bad design and should be fixed. */
DummyDocumentStore documentStore = new DummyDocumentStore();
UpdateStatus updateStatus = new UpdateStatus();
- updateStatus.setDocumentString(String.valueOf(lastModified++));
+ updateStatus.setDocumentString(String.valueOf(
+ this.currentTimeMillis));
documentStore.addDocument(updateStatus, null);
for (Map.Entry<String, String> e : relays.entrySet()) {
documentStore.addDocument(NodeStatus.fromString(e.getValue()),
@@ -181,10 +175,15 @@ public class ResourceServletTest {
ApplicationFactory.setDocumentStore(documentStore);
}
+ private void createNodeIndexer() {
+ NodeIndexer newNodeIndexer = new NodeIndexer();
+ newNodeIndexer.startIndexing();
+ ApplicationFactory.setNodeIndexer(newNodeIndexer);
+ }
+
private void makeRequest(String requestURI,
Map<String, String[]> parameterMap) throws IOException {
ResourceServlet rs = new ResourceServlet();
- rs.init(this.maintenanceMode);
this.request = new TestingHttpServletRequestWrapper(requestURI,
parameterMap);
this.response = new TestingHttpServletResponseWrapper();
1
0

[doctor/java] Replaces redundant HTML with classes and CSS to reduce document size
by karsten@torproject.org 19 Apr '14
by karsten@torproject.org 19 Apr '14
19 Apr '14
commit f52767148a039bc292a86f0c2bcd59d80251eee8
Author: Michael Wolf <mikewolf(a)riseup.net>
Date: Sat Apr 19 05:08:15 2014 -0400
Replaces redundant HTML with classes and CSS to reduce document size
* Replaces the many instances of <font color="[color]> with an appropriate class.
* Removes <br> and <b></b> tags in the header of the relay list, replacing <td> with <th> and adding "tbl-hdr" class to <tr>
* Implements parts 1 and 2 of Ticket #11563
---
.../torproject/doctor/MetricsWebsiteReport.java | 153 +++++++++++---------
1 file changed, 81 insertions(+), 72 deletions(-)
diff --git a/src/org/torproject/doctor/MetricsWebsiteReport.java b/src/org/torproject/doctor/MetricsWebsiteReport.java
index 761c068..428bee2 100644
--- a/src/org/torproject/doctor/MetricsWebsiteReport.java
+++ b/src/org/torproject/doctor/MetricsWebsiteReport.java
@@ -116,6 +116,20 @@ public class MetricsWebsiteReport {
+ " 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"
@@ -136,9 +150,9 @@ public class MetricsWebsiteReport {
+ " <p>Consensus was published ");
if (this.downloadedConsensus.getValidAfterMillis() <
System.currentTimeMillis() - 3L * 60L * 60L * 1000L) {
- this.bw.write("<font color=\"red\">"
+ this.bw.write("<span class=\"oiv\">"
+ dateTimeFormat.format(
- this.downloadedConsensus.getValidAfterMillis()) + "</font>");
+ this.downloadedConsensus.getValidAfterMillis()) + "</span>");
} else {
this.bw.write(dateTimeFormat.format(
this.downloadedConsensus.getValidAfterMillis()));
@@ -175,13 +189,12 @@ public class MetricsWebsiteReport {
}
}
this.bw.write(" <tr>\n"
- + " <td><font color=\"blue\">consensus</font>"
- + "</td>\n"
- + " <td><font color=\"blue\">known-flags");
+ + " <td class=\"ic\">consensus</td>\n"
+ + " <td class=\"ic\">known-flags");
for (String knownFlag : this.downloadedConsensus.getKnownFlags()) {
this.bw.write(" " + knownFlag);
}
- this.bw.write("</font></td>\n"
+ this.bw.write("</td>\n"
+ " </tr>\n"
+ " </table>\n");
}
@@ -228,11 +241,10 @@ public class MetricsWebsiteReport {
}
}
this.bw.write(" <tr>\n"
- + " <td><font color=\"blue\">consensus</font>"
- + "</td>\n"
+ + " <td class=\"ic\">consensus</td>\n"
+ " <td/>\n"
- + " <td><font color=\"blue\">" + runningRelays
- + " Running</font></td>\n"
+ + " <td class=\"ic\">" + runningRelays
+ + " Running</td>\n"
+ " </tr>\n"
+ " </table>\n");
}
@@ -268,24 +280,23 @@ public class MetricsWebsiteReport {
+ " </tr>\n");
} else {
this.bw.write(" <tr>\n"
- + " <td><font color=\"red\">"
- + vote.getNickname() + "</font></td>\n"
- + " <td><font color=\"red\">"
+ + " <td><span class=\"oiv\">"
+ + vote.getNickname() + "</span></td>\n"
+ + " <td><span class=\"oiv\">"
+ "consensus-methods");
for (int consensusMethod : consensusMethods) {
this.bw.write(" " + String.valueOf(consensusMethod));
}
- this.bw.write("</font></td>\n"
+ this.bw.write("</span></td>\n"
+ " </tr>\n");
}
}
}
this.bw.write(" <tr>\n"
- + " <td><font color=\"blue\">consensus</font>"
- + "</td>\n"
- + " <td><font color=\"blue\">consensus-method "
+ + " <td class=\"ic\">consensus</td>\n"
+ + " <td class=\"ic\">consensus-method "
+ this.downloadedConsensus.getConsensusMethod()
- + "</font></td>\n"
+ + "</td>\n"
+ " </tr>\n"
+ " </table>\n");
}
@@ -323,15 +334,15 @@ public class MetricsWebsiteReport {
+ " </tr>\n");
} else {
this.bw.write(" <tr>\n"
- + " <td><font color=\"red\">"
+ + " <td><span class=\"oiv\">"
+ vote.getNickname()
- + "</font></td>\n"
- + " <td><font color=\"red\">client-versions ");
+ + "</span></td>\n"
+ + " <td><span class=\"oiv\">client-versions ");
int i = 0;
for (String version : voteRecommendedClientVersions) {
this.bw.write((i++ > 0 ? "," : "") + version);
}
- this.bw.write("</font></td>\n"
+ this.bw.write("</span></td>\n"
+ " </tr>\n");
}
}
@@ -352,37 +363,36 @@ public class MetricsWebsiteReport {
} else {
this.bw.write(" <tr>\n"
+ " <td></td>\n"
- + " <td><font color=\"red\">server-versions ");
+ + " <td><span class=\"oiv\">server-versions ");
int i = 0;
for (String version : voteRecommendedServerVersions) {
this.bw.write((i++ > 0 ? "," : "") + version);
}
- this.bw.write("</font></td>\n"
+ this.bw.write("</span></td>\n"
+ " </tr>\n");
}
}
}
}
this.bw.write(" <tr>\n"
- + " <td><font color=\"blue\">consensus</font>"
- + "</td>\n"
- + " <td><font color=\"blue\">client-versions ");
+ + " <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("</font></td>\n"
+ this.bw.write("</td>\n"
+ " </tr>\n"
+ " <tr>\n"
+ " <td></td>\n"
- + " <td><font color=\"blue\">server-versions ");
+ + " <td class=\"ic\">server-versions ");
i = 0;
for (String version :
downloadedConsensus.getRecommendedServerVersions()) {
this.bw.write((i++ > 0 ? "," : "") + version);
}
- this.bw.write("</font></td>\n"
+ this.bw.write("</td>\n"
+ " </tr>\n"
+ " </table>\n");
}
@@ -431,14 +441,14 @@ public class MetricsWebsiteReport {
}
if (conflictOrInvalid) {
this.bw.write(" <tr>\n"
- + " <td><font color=\"red\">"
- + vote.getNickname() + "</font></td>\n"
- + " <td><font color=\"red\">params");
+ + " <td><span class=\"oiv\">"
+ + vote.getNickname() + "</span></td>\n"
+ + " <td><span class=\"oiv\">params");
for (Map.Entry<String, Integer> e :
voteConsensusParams.entrySet()) {
this.bw.write(" " + e.getKey() + "=" + e.getValue());
}
- this.bw.write("</font></td>\n"
+ this.bw.write("</span></td>\n"
+ " </tr>\n");
} else {
this.bw.write(" <tr>\n"
@@ -454,14 +464,13 @@ public class MetricsWebsiteReport {
}
}
this.bw.write(" <tr>\n"
- + " <td><font color=\"blue\">consensus</font>"
- + "</td>\n"
- + " <td><font color=\"blue\">params");
+ + " <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("</font></td>\n"
+ this.bw.write("</td>\n"
+ " </tr>\n"
+ " </table>\n");
}
@@ -487,11 +496,11 @@ public class MetricsWebsiteReport {
if (voteDirKeyExpiresMillis - 14L * 24L * 60L * 60L * 1000L <
System.currentTimeMillis()) {
this.bw.write(" <tr>\n"
- + " <td><font color=\"red\">"
- + vote.getNickname() + "</font></td>\n"
- + " <td><font color=\"red\">dir-key-expires "
+ + " <td><span class=\"oiv\">"
+ + vote.getNickname() + "</span></td>\n"
+ + " <td><span class=\"oiv\">dir-key-expires "
+ dateTimeFormat.format(voteDirKeyExpiresMillis)
- + "</font></td>\n"
+ + "</span></td>\n"
+ " </tr>\n");
} else {
this.bw.write(" <tr>\n"
@@ -614,13 +623,13 @@ public class MetricsWebsiteReport {
+ " <col width=\"100\">\n"
+ " <col width=\"100\">\n"
+ " </colgroup>\n"
- + " <tr><td><b>Authority</b></td>"
- + "<td><b>Minimum</b></td>"
- + "<td><b>1st Quartile</b></td>"
- + "<td><b>Median</b></td>"
- + "<td><b>3rd Quartile</b></td>"
- + "<td><b>Maximum</b></td>"
- + "<td><b>Timeouts</b></td></tr>\n");
+ + " <tr><th>Authority</th>"
+ + "<th>Minimum</th>"
+ + "<th>1st Quartile</th>"
+ + "<th>Median</th>"
+ + "<th>3rd Quartile</th>"
+ + "<th>Maximum</th>"
+ + "<th>Timeouts</th></tr>\n");
for (String authority : knownAuthorities) {
this.bw.write(" <tr>\n"
+ " <td>" + authority + "</td>\n"
@@ -655,17 +664,17 @@ public class MetricsWebsiteReport {
+ "matches flag in consensus, or relay is not listed in "
+ "consensus (because it doesn't have the Running "
+ "flag)</li>\n"
- + " <li><b><font color=\"red\">Only in "
- + "vote:</font></b> Flag in vote, but missing in the "
+ + " <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><font color=\"gray\"><s>Only in "
- + "consensus:</s></font></b> Flag in consensus, but missing "
+ + " <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><font color=\"blue\">In "
- + "consensus:</font></b> Flag in consensus</li>\n"
+ + " <li><b><span class=\"ic\">In "
+ + "consensus:</span></b> Flag in consensus</li>\n"
+ " </ul>\n"
+ " <br>\n"
+ " <table border=\"0\" cellpadding=\"4\" "
@@ -706,15 +715,15 @@ public class MetricsWebsiteReport {
/* 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><td><br><b>Fingerprint</b></td>"
- + "<td><br><b>Nickname</b></td>\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("<td><br><b>" + shortDirName + "</b></td>");
+ this.bw.write("<th>" + shortDirName + "</th>");
}
- this.bw.write("<td><br><b>consensus</b></td></tr>\n");
+ this.bw.write("<th>consensus</th></tr>\n");
}
/* Write a single row in the table of relay flags. */
@@ -756,13 +765,13 @@ public class MetricsWebsiteReport {
consensusFlags.contains(flag)) {
this.bw.write(flag);
} else {
- this.bw.write("<font color=\"red\">" + flag + "</font>");
+ this.bw.write("<span class=\"oiv\">" + flag + "</span>");
}
} else if (consensusFlags != null &&
vote.getKnownFlags().contains(flag) &&
consensusFlags.contains(flag)) {
- this.bw.write("<font color=\"gray\"><s>" + flag
- + "</s></font>");
+ this.bw.write("<span class=\"oic\">" + flag
+ + "</span>");
}
}
this.bw.write("</td>\n");
@@ -771,12 +780,12 @@ public class MetricsWebsiteReport {
}
}
if (consensusFlags != null) {
- this.bw.write(" <td>");
+ this.bw.write(" <td class=\"ic\">");
int flagsWritten = 0;
for (String flag : relevantFlags) {
this.bw.write(flagsWritten++ > 0 ? "<br>" : "");
if (consensusFlags.contains(flag)) {
- this.bw.write("<font color=\"blue\">" + flag + "</font>");
+ this.bw.write(flag);
}
}
this.bw.write("</td>\n");
@@ -799,13 +808,13 @@ public class MetricsWebsiteReport {
+ "matches flag in consensus, or relay is not listed in "
+ "consensus (because it doesn't have the Running "
+ "flag)</li>\n"
- + " <li><b><font color=\"red\">Only in "
- + "vote:</font></b> Flag in vote, but missing in the "
+ + " <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><font color=\"gray\"><s>Only in "
- + "consensus:</s></font></b> Flag in consensus, but missing "
+ + " <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"
@@ -881,9 +890,9 @@ public class MetricsWebsiteReport {
+ "</td>\n");
if (flagsLost.containsKey(dir) &&
flagsLost.get(dir).containsKey(flag)) {
- this.bw.write(" <td><font color=\"red\"> "
+ this.bw.write(" <td><span class=\"oiv\"> "
+ flagsLost.get(dir).get(flag) + " " + flag
- + "</font></td>\n");
+ + "</span></td>\n");
} else {
this.bw.write(" <td></td>\n");
}
@@ -896,9 +905,9 @@ public class MetricsWebsiteReport {
}
if (flagsMissing.containsKey(dir) &&
flagsMissing.get(dir).containsKey(flag)) {
- this.bw.write(" <td><font color=\"gray\"><s>"
+ this.bw.write(" <td><span class=\"oic\">"
+ flagsMissing.get(dir).get(flag) + " " + flag
- + "</s></font></td>\n");
+ + "</span></td>\n");
} else {
this.bw.write(" <td></td>\n");
}
1
0

r26718: {website} put back one, since it doesn't need to be rotated (website/trunk/docs/en)
by Roger Dingledine 19 Apr '14
by Roger Dingledine 19 Apr '14
19 Apr '14
Author: arma
Date: 2014-04-19 02:19:51 +0000 (Sat, 19 Apr 2014)
New Revision: 26718
Modified:
website/trunk/docs/en/tor-hidden-service.wml
Log:
put back one, since it doesn't need to be rotated
Modified: website/trunk/docs/en/tor-hidden-service.wml
===================================================================
--- website/trunk/docs/en/tor-hidden-service.wml 2014-04-19 01:30:22 UTC (rev 26717)
+++ website/trunk/docs/en/tor-hidden-service.wml 2014-04-19 02:19:51 UTC (rev 26718)
@@ -19,6 +19,11 @@
you can run a hidden service from behind your firewall.
</p>
+ <p>If you have Tor installed, you can see hidden services in action
+ by visiting this <a href="http://duskgytldkxiuqc6.onion/">sample
+ site</a>.
+ </p>
+
<p>
This page describes the steps for setting up your own hidden service
website. For the technical details of how the hidden service protocol
1
0

r26717: {website} remove sample hidden services since keys need to be rotated. (website/trunk/docs/en)
by Andrew Lewman 19 Apr '14
by Andrew Lewman 19 Apr '14
19 Apr '14
Author: phobos
Date: 2014-04-19 01:30:22 +0000 (Sat, 19 Apr 2014)
New Revision: 26717
Modified:
website/trunk/docs/en/tor-hidden-service.wml
Log:
remove sample hidden services since keys need to be rotated.
Modified: website/trunk/docs/en/tor-hidden-service.wml
===================================================================
--- website/trunk/docs/en/tor-hidden-service.wml 2014-04-18 18:31:20 UTC (rev 26716)
+++ website/trunk/docs/en/tor-hidden-service.wml 2014-04-19 01:30:22 UTC (rev 26717)
@@ -19,20 +19,6 @@
you can run a hidden service from behind your firewall.
</p>
- <p>If you have Tor installed, you can see hidden services
- in action by visiting one of our official hidden services:
- <ul>
- <li><a href="http://idnxcnkne4qt76tg.onion/">The Tor Project Website</a></li>
- <li><a href="http://j6im4v42ur6dpic3.onion/">The Tor Package Archive</a></li>
- <li><a href="http://p3igkncehackjtib.onion/">The Tor Media Archive</a></li>
- </ul>
-
- Others run reliable hidden services, such as <a
- href="http://3g2upl4pq6kufc4m.onion/">The Duck Duck
- Go</a> search engine and someone hosting a <a
- href="http://duskgytldkxiuqc6.onion/">sample site</a>.
- </p>
-
<p>
This page describes the steps for setting up your own hidden service
website. For the technical details of how the hidden service protocol
1
0

[translation/tails-persistence-setup_completed] Update translations for tails-persistence-setup_completed
by translation@torproject.org 18 Apr '14
by translation@torproject.org 18 Apr '14
18 Apr '14
commit 7c772c8b09c7cfb1cc343d015775621a905d2059
Author: Translation commit bot <translation(a)torproject.org>
Date: Fri Apr 18 21:15:25 2014 +0000
Update translations for tails-persistence-setup_completed
---
pl/pl.po | 52 ++++++++++++++++++++++++++--------------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/pl/pl.po b/pl/pl.po
index 86c1b6b..d2f235f 100644
--- a/pl/pl.po
+++ b/pl/pl.po
@@ -4,14 +4,14 @@
#
# Translators:
# bogdrozd <bog.d(a)gazeta.pl>, 2013
-# sebx, 2013
+# sebx, 2013-2014
msgid ""
msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: Tails developers <tails(a)boum.org>\n"
-"POT-Creation-Date: 2013-11-07 16:37+0100\n"
-"PO-Revision-Date: 2013-11-15 09:19+0000\n"
-"Last-Translator: runasand <runa.sandvik(a)gmail.com>\n"
+"POT-Creation-Date: 2014-04-16 21:26+0200\n"
+"PO-Revision-Date: 2014-04-18 21:09+0000\n"
+"Last-Translator: sebx\n"
"Language-Team: Polish (http://www.transifex.com/projects/p/torproject/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -120,67 +120,67 @@ msgstr "Zrób dowiązania w $HOME do każdego pliku lub katalogu znajdującego s
msgid "Setup Tails persistent volume"
msgstr "Ustaw wolumen przechowywania danych Tails"
-#: ../lib/Tails/Persistence/Setup.pm:331
+#: ../lib/Tails/Persistence/Setup.pm:337
#, perl-format
msgid "Device %s already has a persistent volume."
msgstr "Urządzenie %s już ma wolumen przechowywania danych."
-#: ../lib/Tails/Persistence/Setup.pm:339
+#: ../lib/Tails/Persistence/Setup.pm:345
#, perl-format
msgid "Device %s has not enough unallocated space."
msgstr "Urządzenie %s nie ma wystarczająco wolnego miejsca."
-#: ../lib/Tails/Persistence/Setup.pm:347 ../lib/Tails/Persistence/Setup.pm:361
+#: ../lib/Tails/Persistence/Setup.pm:353 ../lib/Tails/Persistence/Setup.pm:367
#, perl-format
msgid "Device %s has no persistent volume."
msgstr "Urządzenie %s nie ma wolumenu przechowywania danych."
-#: ../lib/Tails/Persistence/Setup.pm:353
+#: ../lib/Tails/Persistence/Setup.pm:359
msgid ""
"Cannot delete the persistent volume while in use. You should restart Tails "
"without persistence."
msgstr "Nie można usunąć wolumenu przechowywania danych, gdy jest używany. Powinno się ponownie uruchomić Tails bez przechowywania danych."
-#: ../lib/Tails/Persistence/Setup.pm:372
+#: ../lib/Tails/Persistence/Setup.pm:378
msgid "Persistence volume is not unlocked."
msgstr "Wolumen przechowywania danych nie jest odblokowany."
-#: ../lib/Tails/Persistence/Setup.pm:377
+#: ../lib/Tails/Persistence/Setup.pm:383
msgid "Persistence volume is not mounted."
msgstr "Wolumen przechowywania danych nie jest zamontowany."
-#: ../lib/Tails/Persistence/Setup.pm:382
+#: ../lib/Tails/Persistence/Setup.pm:388
msgid "Persistence volume is not readable. Permissions or ownership problems?"
msgstr "Nie można odczytać wolumenu przechowywania danych. Problemy z uprawnieniami lub własnością?"
-#: ../lib/Tails/Persistence/Setup.pm:387
+#: ../lib/Tails/Persistence/Setup.pm:393
msgid "Persistence volume is not writable. Maybe it was mounted read-only?"
msgstr "Nie można zapisać wolumenu przechowywania danych. Może został zamontowany tylko do odczytu?"
-#: ../lib/Tails/Persistence/Setup.pm:396
+#: ../lib/Tails/Persistence/Setup.pm:402
#, perl-format
msgid "Tails is running from non-USB / non-SDIO device %s."
msgstr "Tails nie jest uruchomiony z USB / karty SD %s."
-#: ../lib/Tails/Persistence/Setup.pm:402
+#: ../lib/Tails/Persistence/Setup.pm:408
#, perl-format
msgid "Device %s is optical."
msgstr "Urządzenie %s jest napędem optycznym."
-#: ../lib/Tails/Persistence/Setup.pm:409
+#: ../lib/Tails/Persistence/Setup.pm:415
#, perl-format
-msgid "Device %s was not created using Tails USB installer."
-msgstr "Urządzenie %s nie zostało utworzone instalatorem Tails USB."
+msgid "Device %s was not created using Tails Installer."
+msgstr "Urządzenie %s nie zostało utworzone przy użyciu Tails Installer."
-#: ../lib/Tails/Persistence/Setup.pm:444
+#: ../lib/Tails/Persistence/Setup.pm:450
msgid "Error"
msgstr "Błąd"
-#: ../lib/Tails/Persistence/Setup.pm:680
+#: ../lib/Tails/Persistence/Setup.pm:670
msgid "Persistence wizard - Finished"
msgstr "Kreator przechowywania danych - Koniec"
-#: ../lib/Tails/Persistence/Setup.pm:683
+#: ../lib/Tails/Persistence/Setup.pm:673
msgid ""
"Any changes you have made will only take effect after restarting Tails.\n"
"\n"
@@ -289,28 +289,28 @@ msgstr "Zapisywanie..."
msgid "Saving persistence configuration..."
msgstr "Zapisywanie konfiguracji przechowywania danych"
-#: ../lib/Tails/Persistence/Step/Delete.pm:40
+#: ../lib/Tails/Persistence/Step/Delete.pm:41
msgid "Persistence wizard - Persistent volume deletion"
msgstr "Kreator przechowywania danych - Usuwanie wolumenu przechowywania danych"
-#: ../lib/Tails/Persistence/Step/Delete.pm:43
+#: ../lib/Tails/Persistence/Step/Delete.pm:44
msgid "Your persistent data will be deleted."
msgstr "Twoje zachowane dane zostaną skasowane."
-#: ../lib/Tails/Persistence/Step/Delete.pm:47
+#: ../lib/Tails/Persistence/Step/Delete.pm:48
#, perl-format
msgid ""
"The persistent volume %s (%s), on the <b>%s %s</b> device, will be deleted."
msgstr "Wolumen przechowywania danych %s (%s), na urządzeniu <b>%s %s</b>, zostanie skasowany."
-#: ../lib/Tails/Persistence/Step/Delete.pm:53
+#: ../lib/Tails/Persistence/Step/Delete.pm:54
msgid "Delete"
msgstr "Usuń"
-#: ../lib/Tails/Persistence/Step/Delete.pm:91
+#: ../lib/Tails/Persistence/Step/Delete.pm:101
msgid "Deleting..."
msgstr "Usuwanie..."
-#: ../lib/Tails/Persistence/Step/Delete.pm:94
+#: ../lib/Tails/Persistence/Step/Delete.pm:104
msgid "Deleting the persistent volume..."
msgstr "Usuwanie wolumenu przechowywania danych..."
1
0