[tor-commits] [translation/tails-greeter-2_completed] Update translations for tails-greeter-2_completed

2017-02-24 Thread translation
commit c327525c3ea5e9dcabcb426fc23905407d62812f
Author: Translation commit bot 
Date:   Fri Feb 24 23:48:14 2017 +

Update translations for tails-greeter-2_completed
---
 pt_BR/pt_BR.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pt_BR/pt_BR.po b/pt_BR/pt_BR.po
index ab0d184..47cff07 100644
--- a/pt_BR/pt_BR.po
+++ b/pt_BR/pt_BR.po
@@ -162,7 +162,7 @@ msgstr "Configurar o Dispositivo de Armazenamento 
Persistente"
 msgid "Enter your passphrase to unlock the persistent storage"
 msgstr ""
 "Inserir a sua frase-senha para abrir o dispositivo de armazenamento "
-"Persistente"
+"persistente"
 
 #: ../data/greeter.ui.h:33 ../tailsgreeter/gui.py:460
 #: ../tailsgreeter/gui.py:510
@@ -171,7 +171,7 @@ msgstr "Abrir"
 
 #: ../data/greeter.ui.h:34
 msgid "Relock Persistent Storage"
-msgstr "Fechar o Dispositivo de Armazenamento Persistente de novo"
+msgstr "Bloquear o Dispositivo de Armazenamento Persistente de novo"
 
 #: ../data/greeter.ui.h:35
 msgid "Your persistent storage is unlocked. Restart Tails to lock it again."

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-greeter-2] Update translations for tails-greeter-2

2017-02-24 Thread translation
commit 53d3de82ace16d1f88d4fa07d70a3ef1c62966eb
Author: Translation commit bot 
Date:   Fri Feb 24 23:48:11 2017 +

Update translations for tails-greeter-2
---
 pt_BR/pt_BR.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pt_BR/pt_BR.po b/pt_BR/pt_BR.po
index ab0d184..47cff07 100644
--- a/pt_BR/pt_BR.po
+++ b/pt_BR/pt_BR.po
@@ -162,7 +162,7 @@ msgstr "Configurar o Dispositivo de Armazenamento 
Persistente"
 msgid "Enter your passphrase to unlock the persistent storage"
 msgstr ""
 "Inserir a sua frase-senha para abrir o dispositivo de armazenamento "
-"Persistente"
+"persistente"
 
 #: ../data/greeter.ui.h:33 ../tailsgreeter/gui.py:460
 #: ../tailsgreeter/gui.py:510
@@ -171,7 +171,7 @@ msgstr "Abrir"
 
 #: ../data/greeter.ui.h:34
 msgid "Relock Persistent Storage"
-msgstr "Fechar o Dispositivo de Armazenamento Persistente de novo"
+msgstr "Bloquear o Dispositivo de Armazenamento Persistente de novo"
 
 #: ../data/greeter.ui.h:35
 msgid "Your persistent storage is unlocked. Restart Tails to lock it again."

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-persistence-setup] Update translations for tails-persistence-setup

2017-02-24 Thread translation
commit a5db06dcef29a27f2e12a39802020cd3bca74dea
Author: Translation commit bot 
Date:   Fri Feb 24 23:45:33 2017 +

Update translations for tails-persistence-setup
---
 pt_BR/pt_BR.po | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pt_BR/pt_BR.po b/pt_BR/pt_BR.po
index a56de47..686f431 100644
--- a/pt_BR/pt_BR.po
+++ b/pt_BR/pt_BR.po
@@ -3,7 +3,7 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Communia , 2013-2016
+# Communia , 2013-2017
 # Bruno Geronimo , 2012
 # carlo giusepe tadei valente sasaki , 2014
 # Communia , 2013
@@ -21,7 +21,7 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: Tails developers \n"
 "POT-Creation-Date: 2016-05-25 02:27+0200\n"
-"PO-Revision-Date: 2016-12-12 23:38+\n"
+"PO-Revision-Date: 2017-02-24 23:36+\n"
 "Last-Translator: Communia \n"
 "Language-Team: Portuguese (Brazil) 
(http://www.transifex.com/otf/torproject/language/pt_BR/)\n"
 "MIME-Version: 1.0\n"
@@ -166,7 +166,7 @@ msgstr "Não é possível suprimir o volume persistente 
durante o seu uso. Reini
 
 #: ../lib/Tails/Persistence/Setup.pm:385
 msgid "Persistence volume is not unlocked."
-msgstr "O volume Persistent não está aberto."
+msgstr "O volume persistente não está aberto."
 
 #: ../lib/Tails/Persistence/Setup.pm:390
 msgid "Persistence volume is not mounted."

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-persistence-setup_completed] Update translations for tails-persistence-setup_completed

2017-02-24 Thread translation
commit eef489e8ffcb488ed83c0544d9919521bd97fafe
Author: Translation commit bot 
Date:   Fri Feb 24 23:45:38 2017 +

Update translations for tails-persistence-setup_completed
---
 pt_BR/pt_BR.po | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pt_BR/pt_BR.po b/pt_BR/pt_BR.po
index a56de47..686f431 100644
--- a/pt_BR/pt_BR.po
+++ b/pt_BR/pt_BR.po
@@ -3,7 +3,7 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Communia , 2013-2016
+# Communia , 2013-2017
 # Bruno Geronimo , 2012
 # carlo giusepe tadei valente sasaki , 2014
 # Communia , 2013
@@ -21,7 +21,7 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: Tails developers \n"
 "POT-Creation-Date: 2016-05-25 02:27+0200\n"
-"PO-Revision-Date: 2016-12-12 23:38+\n"
+"PO-Revision-Date: 2017-02-24 23:36+\n"
 "Last-Translator: Communia \n"
 "Language-Team: Portuguese (Brazil) 
(http://www.transifex.com/otf/torproject/language/pt_BR/)\n"
 "MIME-Version: 1.0\n"
@@ -166,7 +166,7 @@ msgstr "Não é possível suprimir o volume persistente 
durante o seu uso. Reini
 
 #: ../lib/Tails/Persistence/Setup.pm:385
 msgid "Persistence volume is not unlocked."
-msgstr "O volume Persistent não está aberto."
+msgstr "O volume persistente não está aberto."
 
 #: ../lib/Tails/Persistence/Setup.pm:390
 msgid "Persistence volume is not mounted."

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-greeter-2_completed] Update translations for tails-greeter-2_completed

2017-02-24 Thread translation
commit 52d47371af18a763d6bcb96a5d0dc5c49e196c0f
Author: Translation commit bot 
Date:   Fri Feb 24 23:18:14 2017 +

Update translations for tails-greeter-2_completed
---
 pt_BR/pt_BR.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pt_BR/pt_BR.po b/pt_BR/pt_BR.po
index a08066a..ab0d184 100644
--- a/pt_BR/pt_BR.po
+++ b/pt_BR/pt_BR.po
@@ -176,8 +176,8 @@ msgstr "Fechar o Dispositivo de Armazenamento Persistente 
de novo"
 #: ../data/greeter.ui.h:35
 msgid "Your persistent storage is unlocked. Restart Tails to lock it again."
 msgstr ""
-"O seu volume de armazenamento persitente está aberto. Reiniciar Tails para "
-"trancá-lo novamente."
+"O seu volume de armazenamento persistente está aberto. Reiniciar Tails para "
+"bloqueá-lo novamente."
 
 #: ../data/greeter.ui.h:36 ../tailsgreeter/gui.py:554
 msgid "Additional Settings"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-greeter-2] Update translations for tails-greeter-2

2017-02-24 Thread translation
commit 0df539321adbe2f35469706d5087d0eb57029509
Author: Translation commit bot 
Date:   Fri Feb 24 23:18:10 2017 +

Update translations for tails-greeter-2
---
 pt_BR/pt_BR.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pt_BR/pt_BR.po b/pt_BR/pt_BR.po
index a08066a..ab0d184 100644
--- a/pt_BR/pt_BR.po
+++ b/pt_BR/pt_BR.po
@@ -176,8 +176,8 @@ msgstr "Fechar o Dispositivo de Armazenamento Persistente 
de novo"
 #: ../data/greeter.ui.h:35
 msgid "Your persistent storage is unlocked. Restart Tails to lock it again."
 msgstr ""
-"O seu volume de armazenamento persitente está aberto. Reiniciar Tails para "
-"trancá-lo novamente."
+"O seu volume de armazenamento persistente está aberto. Reiniciar Tails para "
+"bloqueá-lo novamente."
 
 #: ../data/greeter.ui.h:36 ../tailsgreeter/gui.py:554
 msgid "Additional Settings"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [torsocks/master] Add a -q/--quiet to torsocks

2017-02-24 Thread dgoulet
commit 0b199d9e173a7c88adbf804a484c8320a802d74e
Author: David Goulet 
Date:   Fri Feb 24 15:14:23 2017 -0500

Add a -q/--quiet to torsocks

This option disables all logging by setting TORSOCKS_LOG_LEVEL=1.

Signed-off-by: David Goulet 
---
 doc/torsocks.1  | 3 +++
 src/bin/torsocks.in | 4 
 2 files changed, 7 insertions(+)

diff --git a/doc/torsocks.1 b/doc/torsocks.1
index e4ac628..4a691e1 100644
--- a/doc/torsocks.1
+++ b/doc/torsocks.1
@@ -61,6 +61,9 @@ and Password MUST NOT be set.
 .BR "\-d, \-\-debug"
 Activate the debug mode. Output will be written on stderr.
 .TP
+.BR "\-q, \-\-quiet"
+Suppress every log messages (even errors).
+.TP
 .BR "on | off"
 This option adds or removes \fBtorsocks(8)\fP from the LD_PRELOAD environment
 variable for the current shell. If you want to use this option, you HAVE to
diff --git a/src/bin/torsocks.in b/src/bin/torsocks.in
index 15ffbfc..fe8b67a 100644
--- a/src/bin/torsocks.in
+++ b/src/bin/torsocks.in
@@ -294,6 +294,10 @@ do
# Set full DEBUG with 5 being the highest possible 
level.
export TORSOCKS_LOG_LEVEL=5
;;
+   -q|--quiet)
+   # Silence logging.
+   export TORSOCKS_LOG_LEVEL=1
+   ;;
--shell)
tor_shell
break

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/torbutton-torbuttonproperties] Update translations for torbutton-torbuttonproperties

2017-02-24 Thread translation
commit d5ff137e3a809a879e682141578f29630172aea0
Author: Translation commit bot 
Date:   Fri Feb 24 19:16:34 2017 +

Update translations for torbutton-torbuttonproperties
---
 fr/torbutton.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fr/torbutton.properties b/fr/torbutton.properties
index e4ce25e..51421c9 100644
--- a/fr/torbutton.properties
+++ b/fr/torbutton.properties
@@ -19,7 +19,7 @@ torbutton.popup.launch = Télécharger le fichier
 torbutton.popup.cancel = Annuler
 torbutton.popup.dontask = Télécharger automatiquement à partir de maintenant
 torbutton.popup.prompted_language = Pour renforcer votre anonymat, BoutonTor 
peut demander la version anglaise des pages Web. Les pages que vous préférez 
lire dans votre langue préférée pourraient alors s'afficher en 
anglais.\n\nVoulez-vous demander des pages Web en anglais pour améliorer votre 
anonymat ?
-torbutton.popup.no_newnym = BoutonTor ne peut pas vous délivrer une nouvelle 
identité de façon sûre. Il n'a pas accès au port de contrôle de 
Tor.\n\nUtilisez-vous le paquet de navigation Tor ?
+torbutton.popup.no_newnym = BoutonTor ne peut pas vous délivrer une nouvelle 
identité de façon sûre. Il n'a pas accès au port de contrôle de 
Tor.\n\nUtilisez-vous l'offre groupée de navigation Tor ?
 torbutton.title.prompt_torbrowser = Informations importantes concernant 
BoutonTor
 torbutton.popup.prompt_torbrowser = BoutonTor fonctionne différemment 
maintenant : vous ne pouvez plus le désactiver.\n\nNous avons effectué ce 
changement car il n'est pas sécuritaire d'utiliser BoutonTor dans un 
navigateur qui est également utiliser pour une navigation sans Tor. Trop de 
bogues ne pouvaient être réglés autrement.\n\nSi vous voulez continuer à 
utiliser Firefox normalement, vous devriez désinstaller BoutonTor et 
télécharger l'offre groupée de navigation Tor. Les propriétés de 
confidentialité du navigateur Tor sont aussi supérieures à celles de 
Firefox, même s'il est utilisé avec BoutonTor.\n\nPour enlever BoutonTor, 
allez dans Outils->Modules complémentaires->Extensions et cliquer sur 
Supprimer à coté de BoutonTor.
 torbutton.popup.short_torbrowser = Informations importantes concernant 
BoutonTor !\n\nBoutonTor est dorénavant toujours activé.\n\nCliquer sur 
BoutonTor pour plus d'informations.

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [torsocks/master] tests: Add a check for a running Tor

2017-02-24 Thread dgoulet
commit c5cde94da6cc627b7538d54d7388038e857de631
Author: David Goulet 
Date:   Fri Feb 24 13:46:24 2017 -0500

tests: Add a check for a running Tor

With this check, we can skip tests that need a running tor when none is
present.

Also update the maatuska hostname for the DNS test.

Signed-off-by: David Goulet 
---
 tests/Makefile.am|  6 --
 tests/helpers.c  | 48 
 tests/helpers.h  | 23 +++
 tests/test_dns.c | 14 +++---
 tests/test_getpeername.c |  8 
 5 files changed, 94 insertions(+), 5 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index a1ee8b1..e703168 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -17,9 +17,11 @@ LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
 
 LIBTORSOCKS=$(top_builddir)/src/lib/libtorsocks.la
 
+HELPER_SOURCES = helpers.c helpers.h
+
 noinst_PROGRAMS = test_dns test_socket test_connect test_fd_passing 
test_getpeername
 
-test_dns_SOURCES = test_dns.c
+test_dns_SOURCES = test_dns.c $(HELPER_SOURCES)
 test_dns_LDADD = $(LIBTAP) $(LIBTORSOCKS)
 
 test_socket_SOURCES = test_socket.c
@@ -31,5 +33,5 @@ test_connect_LDADD = $(LIBTAP) $(LIBTORSOCKS)
 test_fd_passing_SOURCES = test_fd_passing.c
 test_fd_passing_LDADD = $(LIBTAP) $(LIBTORSOCKS) -lpthread
 
-test_getpeername_SOURCES = test_getpeername.c
+test_getpeername_SOURCES = test_getpeername.c $(HELPER_SOURCES)
 test_getpeername_LDADD = $(LIBTAP) $(LIBTORSOCKS)
diff --git a/tests/helpers.c b/tests/helpers.c
new file mode 100644
index 000..1029e0a
--- /dev/null
+++ b/tests/helpers.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2017 - David Goulet 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License, version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include 
+
+#include "lib/torsocks.h"
+
+#include "helpers.h"
+
+/* Try to connect to SocksPort localhost:9050 and if we can't skip. This is
+ * to avoid to have failing test if no tor daemon is available. Return 1 if
+ * true else 0. */
+int
+helper_is_default_tor_running(void)
+{
+  int ret, fd;
+  struct sockaddr_in sa;
+
+  fd = tsocks_libc_socket(AF_INET, SOCK_STREAM, 0);
+  if (fd < 0) {
+goto end;
+  }
+  sa.sin_family = AF_INET;
+  sa.sin_port = htons(9050);
+  sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+  ret = tsocks_libc_connect(fd, (const struct sockaddr *) , sizeof(sa));
+  close(fd);
+  if (ret < 0) {
+goto end;
+  }
+  return 1;
+end:
+  return 0;
+}
diff --git a/tests/helpers.h b/tests/helpers.h
new file mode 100644
index 000..8cd0adb
--- /dev/null
+++ b/tests/helpers.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 - David Goulet 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License, version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef TORSOCKS_HELPERS_H
+#define TORSOCKS_HELPERS_H
+
+int helper_is_default_tor_running(void);
+
+#endif /* TORSOCKS_HELPERS_H */
diff --git a/tests/test_dns.c b/tests/test_dns.c
index 1ca3827..2d87744 100644
--- a/tests/test_dns.c
+++ b/tests/test_dns.c
@@ -24,6 +24,7 @@
 #include 
 
 #include 
+#include "helpers.h"
 
 #define NUM_TESTS 4
 
@@ -46,7 +47,7 @@ static const struct test_host tor_dir_auth1 = {
 
 /* maatuska directory authority. */
 static const struct test_host tor_dir_auth2 = {
-   .name = "ehlo.4711.se",
+   .name = "maatuska.4711.se",
.ip = "171.25.193.9",
 };
 
@@ -135,13 +136,20 @@ static void test_getaddrinfo(const struct test_host *host)
 
 int main(int argc, char **argv)
 {
+   /* Try to connect to SocksPort localhost:9050 and if we can't skip. 
This is
+* to avoid to have failing test if no tor daemon is available. */
+   if (!helper_is_default_tor_running()) {
+   goto end;
+   

[tor-commits] [torsocks/master] Make cpp conditional for definition of handle_mmap match use

2017-02-24 Thread dgoulet
commit 6520a009e1ba3c5f0c3a4e875aa4c8b396a3f2bc
Author: Taylor R Campbell 
Date:   Fri Feb 24 12:41:53 2017 -0500

Make cpp conditional for definition of handle_mmap match use

Signed-off-by: David Goulet 
---
 src/lib/syscall.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/syscall.c b/src/lib/syscall.c
index d0fdaaa..41cba28 100644
--- a/src/lib/syscall.c
+++ b/src/lib/syscall.c
@@ -84,7 +84,7 @@ static LIBC_ACCEPT_RET_TYPE handle_accept(va_list args)
return tsocks_accept(sockfd, addr, );
 }
 
-#if (defined(__linux__) || defined(__darwin__) || (defined(__FreeBSD_kernel__) 
&& defined(__i386__)) || defined(__NetBSD__))
+#if !((defined(__NetBSD__) || defined(__FreeBSD__) || 
defined(__FreeBSD_kernel__)) && defined(__x86_64))
 /*
  * Handle mmap(2) syscall.
  */
@@ -104,7 +104,7 @@ static LIBC_SYSCALL_RET_TYPE handle_mmap(va_list args)
 
return (LIBC_SYSCALL_RET_TYPE) mmap(addr, len, prot, flags, fd, offset);
 }
-#endif /* __linux__, __darwin__, __FreeBSD_kernel__, __i386__, __NetBSD__ */
+#endif /* __NetBSD__, __FreeBSD__, __FreeBSD_kernel__, __x86_64 */
 
 /*
  * Handle munmap(2) syscall.

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [torsocks/master] utils: Add useful function for later use

2017-02-24 Thread dgoulet
commit 98e84212f96bcda222e61dd8ad7bce98f08717c1
Author: David Goulet 
Date:   Fri Feb 24 12:33:32 2017 -0500

utils: Add useful function for later use

Signed-off-by: David Goulet 
---
 src/common/utils.c | 28 
 src/common/utils.h |  7 ---
 2 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/src/common/utils.c b/src/common/utils.c
index 8fe9c6e..f02b1b4 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -366,3 +366,31 @@ int utils_get_port_from_addr(const struct sockaddr *sa)
 
return port;
 }
+
+/*
+ * For a given sockaddr, return a const pointer to the address data structure.
+ * Return NULL if family is not IPv4 or IPv6.
+ */
+ATTR_HIDDEN
+const char *utils_get_addr_from_sockaddr(const struct sockaddr *sa)
+{
+  static char buf[256];
+  const void *addrp;
+
+  assert(sa);
+
+  memset(buf, 0, sizeof(buf));
+
+  if (sa->sa_family == AF_INET) {
+addrp = &((const struct sockaddr_in *) sa)->sin_addr;
+  } else if (sa->sa_family == AF_INET6) {
+addrp = &((const struct sockaddr_in6 *) sa)->sin6_addr;
+  } else {
+goto end;
+  }
+
+  inet_ntop(sa->sa_family, addrp, buf, sizeof(buf));
+
+end:
+  return buf;
+}
diff --git a/src/common/utils.h b/src/common/utils.h
index 83ea825..74f4f5e 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -1,7 +1,7 @@
 /*
- * Copyright (C) 2000-2008 - Shaun Clowes  
- *  2008-2011 - Robert Hogan 

- *   2013 - David Goulet 

+ * Copyright (C) 2000-2008 - Shaun Clowes 
+ *   2008-2011 - Robert Hogan 
+ *   2013 - David Goulet 
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License, version 2 only, as
@@ -34,5 +34,6 @@ int utils_sockaddr_is_localhost(const struct sockaddr *sa);
 int utils_localhost_resolve(const char *name, int af, void *buf, size_t len);
 int utils_is_addr_any(const struct sockaddr *sa);
 int utils_get_port_from_addr(const struct sockaddr *sa);
+const char *utils_get_addr_from_sockaddr(const struct sockaddr *sa);
 
 #endif /* TORSOCKS_UTILS_H */



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [torsocks/master] man: Some words were missing

2017-02-24 Thread dgoulet
commit 3891910fc6f089f7088582c722bac68ddacd9537
Author: David Goulet 
Date:   Fri Feb 24 12:00:55 2017 -0500

man: Some words were missing

Signed-off-by: David Goulet 
---
 doc/torsocks.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/torsocks.8 b/doc/torsocks.8
index c3f477f..7ba5a7f 100644
--- a/doc/torsocks.8
+++ b/doc/torsocks.8
@@ -137,7 +137,7 @@ This introduces overhead and should only be used when 
needed.
 Torsocks uses ELF dynamic loader features to intercept dynamic function calls
 from programs in which it is embedded. As a result, non-ELF executables, or
 executables that make system calls directly with the system call trap (int
-0x80).
+0x80) are not supported.
 
 .SH FILES
 /etc/tor/torsocks.conf - default torsocks configuration file

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [torsocks/master] Remove clang warnings

2017-02-24 Thread dgoulet
commit a495bf1ef231da351a7e7430380699492a4ccd7c
Author: David Goulet 
Date:   Fri Feb 24 11:57:03 2017 -0500

Remove clang warnings

The ht.h generated functions are now flagged with ATTR_UNUSED so the
compiler knows to ignore the warnings if unused.

Remove -fno-strict-overflow as well. Not needed for gcc and clang
doesn't have it.

Signed-off-by: David Goulet 
---
 configure.ac|  3 ---
 src/common/ht.h | 27 ++-
 src/common/macros.h |  4 
 3 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/configure.ac b/configure.ac
index f5dd992..f6fdb0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -252,9 +252,6 @@ AX_CHECK_COMPILE_FLAG([--param ssp-buffer-size=1],
 AX_CHECK_COMPILE_FLAG([-fstack-protector-all],
[CFLAGS="$CFLAGS -fstack-protector-all"],[],[]
 )
-AX_CHECK_COMPILE_FLAG([-fno-strict-overflow],
-   [CFLAGS="$CFLAGS -fno-strict-overflow"],[],[]
-)
 
 dnl Add hardening linker flags
 AX_CHECK_LINK_FLAG([-pie],[LDFLAGS="$LDFLAGS -pie"],[],[])
diff --git a/src/common/ht.h b/src/common/ht.h
index e2fb809..b3d858e 100644
--- a/src/common/ht.h
+++ b/src/common/ht.h
@@ -133,7 +133,7 @@ ht_string_hash(const char *s)
   int name##_HT_GROW(struct name *ht, unsigned min_capacity);   \
   void name##_HT_CLEAR(struct name *ht);\
   int name##_HT_REP_IS_BAD_(const struct name *ht); \
-  static inline void\
+  ATTR_UNUSED static inline void\
   name##_HT_INIT(struct name *head) {   \
 head->hth_table_length = 0; \
 head->hth_table = NULL; \
@@ -143,7 +143,7 @@ ht_string_hash(const char *s)
   } \
   /* Helper: returns a pointer to the right location in the table   \
* 'head' to find or insert the element 'elm'. */ \
-  static inline struct type **  \
+  ATTR_UNUSED static inline struct type **  \
   name##_HT_FIND_P_(struct name *head, struct type *elm)\
   { \
 struct type **p;\
@@ -157,9 +157,9 @@ ht_string_hash(const char *s)
 }   \
 return p;   \
   } \
-  /* Return a pointer to the element in the table 'head' matching 'elm', \
-   * or NULL if no such element exists */   \
-  static inline struct type *   \
+  /* Return a pointer to the element in the table 'head' matching   \
+   * 'elm', or NULL if no such element exists */\
+  ATTR_UNUSED static inline struct type *   \
   name##_HT_FIND(const struct name *head, struct type *elm) \
   { \
 struct type **p;\
@@ -170,11 +170,12 @@ ht_string_hash(const char *s)
   } \
   /* Insert the element 'elm' into the table 'head'.  Do not call this  \
* function if the table might already contain a matching element. */ \
-  static inline void\
+  ATTR_UNUSED static inline void\
   name##_HT_INSERT(struct name *head, struct type *elm) \
   { \
 struct type **p;\
-if (!head->hth_table || head->hth_n_entries >= head->hth_load_limit) \
+if (!head->hth_table || \
+head->hth_n_entries >= head->hth_load_limit)\
   name##_HT_GROW(head, head->hth_n_entries+1);  \
 ++head->hth_n_entries;  \
 HT_SET_HASH_(elm, field, hashfn);   \
@@ -185,7 +186,7 @@ ht_string_hash(const char *s)
   /* Insert the element 'elm' into the table 'head'. If there already   \
* a matching element in the table, replace that element and return   \
* it. */ \
-  static inline struct type *   \
+  ATTR_UNUSED static inline struct type *   \
   

[tor-commits] [tor/master] Whitespace fix.

2017-02-24 Thread nickm
commit 619771f60bde6b69eeaad4efbd844705ec5bcb83
Author: Nick Mathewson 
Date:   Fri Feb 24 11:37:33 2017 -0500

Whitespace fix.
---
 src/or/rendservice.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 522f33e..cb87624 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -3175,8 +3175,8 @@ count_intro_point_circuits(const rend_service_t *service)
  */
 STATIC ssize_t
 encode_establish_intro_cell_legacy(char *cell_body_out,
-   size_t cell_body_out_len,
-   crypto_pk_t *intro_key, char 
*rend_circ_nonce)
+ size_t cell_body_out_len,
+ crypto_pk_t *intro_key, char *rend_circ_nonce)
 {
   int retval = -1;
   int r;



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] hs: Fix bad use of sizeof() when encoding ESTABLISH_INTRO legacy cell

2017-02-24 Thread nickm
commit 4ed10e5053ebef31d5f922933f7236a6ab743bf9
Author: David Goulet 
Date:   Fri Feb 24 09:48:14 2017 -0500

hs: Fix bad use of sizeof() when encoding ESTABLISH_INTRO legacy cell

When encoding a legacy ESTABLISH_INTRO cell, we were using the sizeof() on a
pointer instead of using the real size of the destination buffer leading to 
an
overflow passing an enormous value to the signing digest function.
Fortunately, that value was only used to make sure the destination buffer
length was big enough for the key size and in this case it always was 
because
of the overflow.

Fixes #21553

Signed-off-by: David Goulet 
---
 changes/bug21553  |  7 +++
 src/or/rendservice.c  | 12 +++-
 src/or/rendservice.h  |  1 +
 src/test/test_hs_intropoint.c |  1 +
 4 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/changes/bug21553 b/changes/bug21553
new file mode 100644
index 000..6ffa3e2
--- /dev/null
+++ b/changes/bug21553
@@ -0,0 +1,7 @@
+  o Minor bugfixes (hidden service):
+- When encoding a legacy ESTABLISH_INTRO cell, we were using the sizeof()
+  on a pointer instead of real size of the destination buffer leading to
+  an overflow passing an enormous value to the signing digest function.
+  Fortunately, that value was only used to make sure the destination
+  buffer length was big enough for the key size and in this case it was.
+  Fixes bug 21553; bugfix on tor-0.3.0.1-alpha.
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 1d6fc0f..522f33e 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -3174,8 +3174,9 @@ count_intro_point_circuits(const rend_service_t *service)
of bytes written. On fail, return -1.
  */
 STATIC ssize_t
-encode_establish_intro_cell_legacy(char *cell_body_out, crypto_pk_t *intro_key,
-   char *rend_circ_nonce)
+encode_establish_intro_cell_legacy(char *cell_body_out,
+   size_t cell_body_out_len,
+   crypto_pk_t *intro_key, char 
*rend_circ_nonce)
 {
   int retval = -1;
   int r;
@@ -3202,7 +3203,7 @@ encode_establish_intro_cell_legacy(char *cell_body_out, 
crypto_pk_t *intro_key,
   len += 20;
   note_crypto_pk_op(REND_SERVER);
   r = crypto_pk_private_sign_digest(intro_key, cell_body_out+len,
-sizeof(cell_body_out)-len,
+cell_body_out_len - len,
 cell_body_out, len);
   if (r<0) {
 log_warn(LD_BUG, "Internal error: couldn't sign introduction request.");
@@ -3313,8 +3314,9 @@ rend_service_intro_has_opened(origin_circuit_t *circuit)
   /* Send the ESTABLISH_INTRO cell */
   {
 ssize_t len;
-len = encode_establish_intro_cell_legacy(buf, circuit->intro_key,
-circuit->cpath->prev->rend_circ_nonce);
+len = encode_establish_intro_cell_legacy(buf, sizeof(buf),
+  circuit->intro_key,
+  circuit->cpath->prev->rend_circ_nonce);
 if (len < 0) {
   reason = END_CIRC_REASON_INTERNAL;
   goto err;
diff --git a/src/or/rendservice.h b/src/or/rendservice.h
index 3bfac0b..85daaae 100644
--- a/src/or/rendservice.h
+++ b/src/or/rendservice.h
@@ -130,6 +130,7 @@ STATIC int rend_service_poison_new_single_onion_dir(
   const rend_service_t *s,
   const or_options_t* options);
 STATIC ssize_t encode_establish_intro_cell_legacy(char *cell_body_out,
+  size_t cell_body_out_len,
   crypto_pk_t *intro_key,
   char *rend_circ_nonce);
 STATIC void prune_services_on_reload(smartlist_t *old_service_list,
diff --git a/src/test/test_hs_intropoint.c b/src/test/test_hs_intropoint.c
index ea12aeb..b207cd4 100644
--- a/src/test/test_hs_intropoint.c
+++ b/src/test/test_hs_intropoint.c
@@ -489,6 +489,7 @@ helper_establish_intro_v2(or_circuit_t *intro_circ)
 
   /* Use old circuit_key_material why not */
   cell_len = encode_establish_intro_cell_legacy((char*)cell_body,
+sizeof(cell_body),
 key1,
 (char *) circuit_key_material);
   tt_int_op(cell_len, >, 0);



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.0'

2017-02-24 Thread nickm
commit d73755e36e83f30e9a961029b6eaba34c3935845
Merge: efa5bba 4ed10e5
Author: Nick Mathewson 
Date:   Fri Feb 24 11:37:04 2017 -0500

Merge branch 'maint-0.3.0'

 changes/bug21553  |  7 +++
 src/or/rendservice.c  | 12 +++-
 src/or/rendservice.h  |  1 +
 src/test/test_hs_intropoint.c |  1 +
 4 files changed, 16 insertions(+), 5 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.0'

2017-02-24 Thread nickm
commit 02aaa7f9edd333a40d364fd99f3c141dfe85b651
Merge: d73755e 619771f
Author: Nick Mathewson 
Date:   Fri Feb 24 11:37:41 2017 -0500

Merge branch 'maint-0.3.0'

 src/or/rendservice.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.0] hs: Fix bad use of sizeof() when encoding ESTABLISH_INTRO legacy cell

2017-02-24 Thread nickm
commit 4ed10e5053ebef31d5f922933f7236a6ab743bf9
Author: David Goulet 
Date:   Fri Feb 24 09:48:14 2017 -0500

hs: Fix bad use of sizeof() when encoding ESTABLISH_INTRO legacy cell

When encoding a legacy ESTABLISH_INTRO cell, we were using the sizeof() on a
pointer instead of using the real size of the destination buffer leading to 
an
overflow passing an enormous value to the signing digest function.
Fortunately, that value was only used to make sure the destination buffer
length was big enough for the key size and in this case it always was 
because
of the overflow.

Fixes #21553

Signed-off-by: David Goulet 
---
 changes/bug21553  |  7 +++
 src/or/rendservice.c  | 12 +++-
 src/or/rendservice.h  |  1 +
 src/test/test_hs_intropoint.c |  1 +
 4 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/changes/bug21553 b/changes/bug21553
new file mode 100644
index 000..6ffa3e2
--- /dev/null
+++ b/changes/bug21553
@@ -0,0 +1,7 @@
+  o Minor bugfixes (hidden service):
+- When encoding a legacy ESTABLISH_INTRO cell, we were using the sizeof()
+  on a pointer instead of real size of the destination buffer leading to
+  an overflow passing an enormous value to the signing digest function.
+  Fortunately, that value was only used to make sure the destination
+  buffer length was big enough for the key size and in this case it was.
+  Fixes bug 21553; bugfix on tor-0.3.0.1-alpha.
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 1d6fc0f..522f33e 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -3174,8 +3174,9 @@ count_intro_point_circuits(const rend_service_t *service)
of bytes written. On fail, return -1.
  */
 STATIC ssize_t
-encode_establish_intro_cell_legacy(char *cell_body_out, crypto_pk_t *intro_key,
-   char *rend_circ_nonce)
+encode_establish_intro_cell_legacy(char *cell_body_out,
+   size_t cell_body_out_len,
+   crypto_pk_t *intro_key, char 
*rend_circ_nonce)
 {
   int retval = -1;
   int r;
@@ -3202,7 +3203,7 @@ encode_establish_intro_cell_legacy(char *cell_body_out, 
crypto_pk_t *intro_key,
   len += 20;
   note_crypto_pk_op(REND_SERVER);
   r = crypto_pk_private_sign_digest(intro_key, cell_body_out+len,
-sizeof(cell_body_out)-len,
+cell_body_out_len - len,
 cell_body_out, len);
   if (r<0) {
 log_warn(LD_BUG, "Internal error: couldn't sign introduction request.");
@@ -3313,8 +3314,9 @@ rend_service_intro_has_opened(origin_circuit_t *circuit)
   /* Send the ESTABLISH_INTRO cell */
   {
 ssize_t len;
-len = encode_establish_intro_cell_legacy(buf, circuit->intro_key,
-circuit->cpath->prev->rend_circ_nonce);
+len = encode_establish_intro_cell_legacy(buf, sizeof(buf),
+  circuit->intro_key,
+  circuit->cpath->prev->rend_circ_nonce);
 if (len < 0) {
   reason = END_CIRC_REASON_INTERNAL;
   goto err;
diff --git a/src/or/rendservice.h b/src/or/rendservice.h
index 3bfac0b..85daaae 100644
--- a/src/or/rendservice.h
+++ b/src/or/rendservice.h
@@ -130,6 +130,7 @@ STATIC int rend_service_poison_new_single_onion_dir(
   const rend_service_t *s,
   const or_options_t* options);
 STATIC ssize_t encode_establish_intro_cell_legacy(char *cell_body_out,
+  size_t cell_body_out_len,
   crypto_pk_t *intro_key,
   char *rend_circ_nonce);
 STATIC void prune_services_on_reload(smartlist_t *old_service_list,
diff --git a/src/test/test_hs_intropoint.c b/src/test/test_hs_intropoint.c
index ea12aeb..b207cd4 100644
--- a/src/test/test_hs_intropoint.c
+++ b/src/test/test_hs_intropoint.c
@@ -489,6 +489,7 @@ helper_establish_intro_v2(or_circuit_t *intro_circ)
 
   /* Use old circuit_key_material why not */
   cell_len = encode_establish_intro_cell_legacy((char*)cell_body,
+sizeof(cell_body),
 key1,
 (char *) circuit_key_material);
   tt_int_op(cell_len, >, 0);



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.0] Whitespace fix.

2017-02-24 Thread nickm
commit 619771f60bde6b69eeaad4efbd844705ec5bcb83
Author: Nick Mathewson 
Date:   Fri Feb 24 11:37:33 2017 -0500

Whitespace fix.
---
 src/or/rendservice.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 522f33e..cb87624 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -3175,8 +3175,8 @@ count_intro_point_circuits(const rend_service_t *service)
  */
 STATIC ssize_t
 encode_establish_intro_cell_legacy(char *cell_body_out,
-   size_t cell_body_out_len,
-   crypto_pk_t *intro_key, char 
*rend_circ_nonce)
+ size_t cell_body_out_len,
+ crypto_pk_t *intro_key, char *rend_circ_nonce)
 {
   int retval = -1;
   int r;

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [torsocks/master] Add missing quotes to variable in torsocks.in

2017-02-24 Thread dgoulet
commit 5a5b72fa0aef2315c369cedc5f448ee473be5e4f
Author: David Goulet 
Date:   Fri Feb 24 11:26:27 2017 -0500

Add missing quotes to variable in torsocks.in

Fixes #19376

Signed-off-by: David Goulet 
---
 src/bin/torsocks.in | 42 +-
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/bin/torsocks.in b/src/bin/torsocks.in
index 552a516..15ffbfc 100644
--- a/src/bin/torsocks.in
+++ b/src/bin/torsocks.in
@@ -73,7 +73,7 @@ set_ld_preload ()
if [ -z "$@LDPRELOAD@" ]; then
export @LDPRELOAD@="${SHLIB}"
else
-   echo $@LDPRELOAD@ | grep -q "${SHLIB}" || \
+   echo "$@LDPRELOAD@" | grep -q "${SHLIB}" || \
export @LDPRELOAD@="${SHLIB} $@LDPRELOAD@"
fi
 
@@ -130,13 +130,13 @@ tor_shell ()
 
 torify_app ()
 {
-   local app_path=`which $1`
-   local getcap=`PATH="$PATH:/usr/sbin:/sbin" which getcap`
+   local app_path="`which $1`"
+   local getcap="`PATH="$PATH:/usr/sbin:/sbin" which getcap`"
local caps=
 
-   if [ -z $1 ]; then
+   if [ -z "$1" ]; then
echo "Please provide an application to torify." >&2
-   elif [ -z $app_path ]; then
+   elif [ -z "$app_path" ]; then
echo "ERROR: $1 cannot be found." >&2
exit 1
fi
@@ -144,20 +144,20 @@ torify_app ()
# This must be before torifying because getcap uses cap_get_file(3)
# via syscall(2) which breaks torsocks.
if [ -n "$getcap" ]; then
-   caps=`$getcap $app_path 2>/dev/null`
+   caps="`$getcap $app_path 2>/dev/null`"
fi
 
# Check if Apple's System Integrity Protection is enabled if the user is
# running on macOS.
-   macos_sip_check $app_path
+   macos_sip_check "$app_path"
 
# NEVER remove that line or else nothing it torified.
set_ld_preload
 
-   if [ -u $app_path ]; then
+   if [ -u "$app_path" ]; then
echo "ERROR: $1 is setuid. torsocks will not work on a setuid 
executable." >&2
exit 1
-   elif [ -g $app_path ]; then
+   elif [ -g "$app_path" ]; then
echo "ERROR: $1 is setgid. torsocks will not work on a setgid 
executable." >&2
exit 1
elif [ -n "$caps" ]; then
@@ -219,7 +219,7 @@ if [ $# -eq 0 ] ; then
 fi
 
 # Ensure libtorsocks exists,
-if [ ! -f $SHLIB ]; then
+if [ ! -f "$SHLIB" ]; then
echo "$0: $SHLIB does not exist! Try re-installing torsocks."
exit
 fi
@@ -228,14 +228,14 @@ while true;
 do
case "$1" in
on)
-   check_script_sourced $1
+   check_script_sourced "$1"
set_ld_preload
echo "Tor mode activated. Every command will be 
torified for this shell."
break
;;
off)
-   check_script_sourced $1
-   export @LDPRELOAD@=`echo -n $@LDPRELOAD@ | sed 
"s#$SHLIB *##"`
+   check_script_sourced "$1"
+   export @LDPRELOAD@="`echo -n $@LDPRELOAD@ | sed 
"s#$SHLIB *##"`"
if [ -z "$@LDPRELOAD@" ]; then
unset @LDPRELOAD@
case "$OSTYPE" in
@@ -256,35 +256,35 @@ do
break
;;
-u|--user)
-   if [ -z $2 ]; then
+   if [ -z "$2" ]; then
echo "Missing username to -u" >&2
exit 1
fi
-   export TORSOCKS_USERNAME=$2
+   export TORSOCKS_USERNAME="$2"
shift
;;
-p|--pass)
-   if [ -z $2 ]; then
+   if [ -z "$2" ]; then
echo "Missing password to -p" >&2
exit 1
fi
-   export TORSOCKS_PASSWORD=$2
+   export TORSOCKS_PASSWORD="$2"
shift
;;
-a|--address)
-   if [ -z $2 ]; then
+   if [ -z "$2" ]; then
echo "Missing address to -a" >&2
exit 1
fi
-   export TORSOCKS_TOR_ADDRESS=$2
+   export TORSOCKS_TOR_ADDRESS="$2"
shift
;;
-P|--port)
-   if [ -z $2 ]; then
+   if [ -z "$2" ]; then
echo "Missing port to -P" >&2
exit 1
   

[tor-commits] [torspec/master] Four new proposals based on experiments with download size

2017-02-24 Thread nickm
commit 2e5e0cb3f87f6813b789f09459daea6ebcaa4eb4
Author: Nick Mathewson 
Date:   Fri Feb 24 11:23:31 2017 -0500

Four new proposals based on experiments with download size
---
 proposals/000-index.txt  |   8 ++
 proposals/274-rotate-onion-keys-less.txt | 113 +
 proposals/275-md-published-time-is-silly.txt | 119 +++
 proposals/276-lower-bw-granularity.txt   |  70 
 proposals/277-detect-id-sharing.txt  |  59 +
 5 files changed, 369 insertions(+)

diff --git a/proposals/000-index.txt b/proposals/000-index.txt
index 4e400c8..d3a4100 100644
--- a/proposals/000-index.txt
+++ b/proposals/000-index.txt
@@ -194,6 +194,10 @@ Proposals by number:
 271  Another algorithm for guard selection [CLOSED]
 272  Listed routers should be Valid, Running, and treated as such [FINISHED]
 273  Exit relay pinning for web services [DRAFT]
+274  Rotate onion keys less frequently [OPEN]
+275  Stop including meaningful "published" time in microdescriptor consensus 
[OPEN]
+276  Report bandwidth with lower granularity in consensus documents [OPEN]
+277  Detect multiple relay instances running with same ID [OPEN]
 
 
 Proposals by status:
@@ -249,6 +253,10 @@ Proposals by status:
256  Key revocation for relays and authorities
261  AEZ for relay cryptography
262  Re-keying live circuits with new cryptographic material
+   274  Rotate onion keys less frequently [for 0.3.1.x-alpha]
+   275  Stop including meaningful "published" time in microdescriptor 
consensus [for 0.3.1.x-alpha]
+   276  Report bandwidth with lower granularity in consensus documents [for 
0.3.1.x-alpha]
+   277  Detect multiple relay instances running with same ID [for 0.3.??]
  ACCEPTED:
140  Provide diffs between consensuses
172  GETINFO controller option for circuit information
diff --git a/proposals/274-rotate-onion-keys-less.txt 
b/proposals/274-rotate-onion-keys-less.txt
new file mode 100644
index 000..0d61d5d
--- /dev/null
+++ b/proposals/274-rotate-onion-keys-less.txt
@@ -0,0 +1,113 @@
+Filename: 274-rotate-onion-keys-less.txt
+Title: Rotate onion keys less frequently.
+Author: Nick Mathewson
+Created: 20-Feb-2017
+Status: Open
+Target: 0.3.1.x-alpha
+
+1. Overview
+
+   This document proposes that, in order to limit the bandwidth needed
+   for microdescriptor listing and transmission, we reduce the onion key
+   rotation rate from the current value (7 days) to something closer to
+   28 days.
+
+   Doing this will reduce the total microdescriptor download volume
+   by approximately 70%.
+
+2. Motivation
+
+   Currently, clients must download a networkstatus consensus document
+   once an hour, and must download every unfamiliar microdescriptor
+   listed in that document.  Therefore, we can reduce client directory
+   bandwidth if we can cause microdescriptors to change less often.
+
+   Furthermore, we are planning (in proposal 140) to implement a
+   diff-based mechanism for clients to download only the parts of each
+   consensus that have changed.  If we do that, then by having the
+   microdescriptor for each router change less often, we can make these
+   consensus diffs smaller as well.
+
+3. Analysis
+
+   I analyzed microdescriptor changes over the month of January
+   2017, and found that 94.5% of all microdescriptor transitions
+   were changes in onion key alone.
+
+   Therefore, we could reduce the number of changed "m" lines in
+   consensus diffs by approximately 94.5% * (3/4) =~ 70%,
+   if we were to rotate onion keys one-fourth as often.
+
+   The number of microdescriptors to actually download should
+   decrease by a similar number.
+
+   This amount to a significant reduction: currently, by
+   back-of-the-envelope estimates, an always-on client that downloads
+   all the directory info in a month downloads about 449MB of compressed
+   consensuses and something around 97 MB of compressed
+   microdescriptors.  This proposal would save that user about 12% of
+   their total directory bandwidth.
+
+   If we assume that consensus diffs are implemented (see proposal 140),
+   then the user's compressed consensus downloads fall to something
+   closer to 27 MB.  Under that analysis, the microdescriptors will
+   dominate again at 97 MB -- so lowering the number of microdescriptors
+   to fetch would save more like 55% of the remaining bandwidth.
+
+   [Back-of-the-envelope technique: assume every consensus is
+   downloaded, and every microdesc is downloaded, and microdescs are
+   downloaded in groups of 61, which works out to a constant rate.]
+
+   We'll need to do more analysis to assess the impact on clients that
+   connect to the network infrequently enough to miss microdescriptors:
+   nonetheless, the 70% figure above ought to apply to clients that connect
+   at least weekly.
+
+   ( Better results pending feedback from ahf's analysis.)
+
+4. Security analysis
+
+   The 

[tor-commits] [torsocks/master] Fix check_addr() to return either 0 or 1

2017-02-24 Thread dgoulet
commit 4dbf57e2c829ce67e88a629407469d58c2df1e10
Author: David Goulet 
Date:   Fri Feb 24 11:02:13 2017 -0500

Fix check_addr() to return either 0 or 1

This function is used by utils_is_address_ipv4/6 and has to return 0 on
error or 1 on success.

Fixes #20871

Signed-off-by: David Goulet 
---
 src/common/utils.c| 11 ++-
 tests/unit/test_config-file.c |  4 ++--
 tests/unit/test_utils.c   |  8 
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/common/utils.c b/src/common/utils.c
index 82479af..8fe9c6e 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -45,8 +45,8 @@ static const char *localhost_names_v6[] = {
 };
 
 /*
- * Return 1 if the given IP belongs in the af domain else return a negative
- * value.
+ * Return 1 if the given IP belongs in the af domain else return 0 if the
+ * given ip is not a valid address or the af value is unknown.
  */
 static int check_addr(const char *ip, int af)
 {
@@ -56,9 +56,10 @@ static int check_addr(const char *ip, int af)
assert(ip);
 
ret = inet_pton(af, ip, buf);
-   if (ret != 1) {
-   ret = -1;
-   }
+  if (ret == -1) {
+/* Possible if the af value is unknown to inet_pton. */
+ret = 0;
+  }
 
return ret;
 }
diff --git a/tests/unit/test_config-file.c b/tests/unit/test_config-file.c
index 59e3115..b48094c 100644
--- a/tests/unit/test_config-file.c
+++ b/tests/unit/test_config-file.c
@@ -104,13 +104,13 @@ static void test_config_file_read_invalid_values(void)
 
memset(, 0x0, sizeof(config));
ret = config_file_read(fixture("config4"), );
-   ok(ret == -1 &&
+   ok(ret == 0 &&
config.conf_file.tor_address == NULL,
"TorAddress invalid IPv4 returns -1");
 
memset(, 0x0, sizeof(config));
ret = config_file_read(fixture("config5"), );
-   ok(ret == -1 &&
+   ok(ret == 0 &&
config.conf_file.tor_address == NULL,
"TorAddress invalid IPv6 returns -1");
 
diff --git a/tests/unit/test_utils.c b/tests/unit/test_utils.c
index dc5b0ca..95469d8 100644
--- a/tests/unit/test_utils.c
+++ b/tests/unit/test_utils.c
@@ -36,10 +36,10 @@ static void test_is_address_ipv4(void)
ok(ret == 1, "Valid IPv4 address");
 
ret = utils_is_address_ipv4("127.0.0.256");
-   ok(ret == -1, "Invalid IPv4 address");
+   ok(ret == 0, "Invalid IPv4 address");
 
ret = utils_is_address_ipv4("::1");
-   ok(ret == -1, "Invalid IPv4 address when IPv6");
+   ok(ret == 0, "Invalid IPv4 address when IPv6");
 }
 
 static void test_is_address_ipv6(void)
@@ -55,10 +55,10 @@ static void test_is_address_ipv6(void)
ok(ret == 1, "Valid IPv6 address");
 
ret = utils_is_address_ipv6("2001:DB8:0:0:8:800:200C:G");
-   ok(ret == -1, "Invalid IPv6 address");
+   ok(ret == 0, "Invalid IPv6 address");
 
ret = utils_is_address_ipv6("192.168.0.1");
-   ok(ret == -1, "Invalid IPv6 address when IPv4");
+   ok(ret == 0, "Invalid IPv6 address when IPv4");
 }
 
 static void test_localhost_resolve(void)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [torsocks/master] Ignore stderr for getcap command

2017-02-24 Thread dgoulet
commit 6228eabd72eda576403bf6f199881a6d39c1148e
Author: David Goulet 
Date:   Fri Feb 24 10:47:33 2017 -0500

Ignore stderr for getcap command

On a filesystem not supporting capabilities, an error is thrown out on
stderr which is undesirable and confusing for the user.

This commit throws stderr to /dev/null. The point of this getcap is to
actually see if any capabilities are enabled or none. In the context of
an error, there are none.

Fixes #21088

Signed-off-by: David Goulet 
---
 src/bin/torsocks.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/torsocks.in b/src/bin/torsocks.in
index d8522e2..552a516 100644
--- a/src/bin/torsocks.in
+++ b/src/bin/torsocks.in
@@ -144,7 +144,7 @@ torify_app ()
# This must be before torifying because getcap uses cap_get_file(3)
# via syscall(2) which breaks torsocks.
if [ -n "$getcap" ]; then
-   caps=`$getcap $app_path`
+   caps=`$getcap $app_path 2>/dev/null`
fi
 
# Check if Apple's System Integrity Protection is enabled if the user is



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [onionoo/master] Update to latest metrics-base.

2017-02-24 Thread karsten
commit 6b674fe7f3c31cc1e903abb9832ac8444abcd0e1
Author: Karsten Loesing 
Date:   Fri Feb 24 17:08:14 2017 +0100

Update to latest metrics-base.
---
 src/build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/build b/src/build
index bb0e1e5..6940759 16
--- a/src/build
+++ b/src/build
@@ -1 +1 @@
-Subproject commit bb0e1e50ba75dfa15add334706d8ce288fbf2b0b
+Subproject commit 6940759436bbd3bdb117572886f6104f78c3b469

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-messenger-prefsdtd_completed] Update translations for tor-messenger-prefsdtd_completed

2017-02-24 Thread translation
commit c13aff1ade2f614c7a95b031e248bdf475901039
Author: Translation commit bot 
Date:   Fri Feb 24 15:47:55 2017 +

Update translations for tor-messenger-prefsdtd_completed
---
 pt/prefs.dtd | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/pt/prefs.dtd b/pt/prefs.dtd
new file mode 100644
index 000..36a7866
--- /dev/null
+++ b/pt/prefs.dtd
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-messenger-prefsdtd] Update translations for tor-messenger-prefsdtd

2017-02-24 Thread translation
commit e3a215c1e79d1a1f0383a77bc7dde9c007266ace
Author: Translation commit bot 
Date:   Fri Feb 24 15:47:52 2017 +

Update translations for tor-messenger-prefsdtd
---
 pt/prefs.dtd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pt/prefs.dtd b/pt/prefs.dtd
index e7d46bd..36a7866 100644
--- a/pt/prefs.dtd
+++ b/pt/prefs.dtd
@@ -10,7 +10,7 @@
 
 
 
-
+
 
 
 
@@ -18,5 +18,5 @@
 
 
 
-
+
 
\ No newline at end of file

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/exoneratorproperties] Update translations for exoneratorproperties

2017-02-24 Thread translation
commit cb7852ed0b33e99fde5cf6982578a578dcd536dd
Author: Translation commit bot 
Date:   Fri Feb 24 15:48:20 2017 +

Update translations for exoneratorproperties
---
 pt/exonerator.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pt/exonerator.properties b/pt/exonerator.properties
index 9d25284..c28ebe1 100644
--- a/pt/exonerator.properties
+++ b/pt/exonerator.properties
@@ -45,8 +45,8 @@ footer.abouttor.body.text=Tor is an international software 
project to anonymize
 footer.abouttor.body.link1=encrypting packets and sending them through a 
series of hops before they reach their destination
 footer.abouttor.body.link2=saber mais sobre o Tor
 footer.abouttor.body.link3=contactar The Tor Project, Inc.
-footer.aboutexonerator.heading=About ExoneraTor
+footer.aboutexonerator.heading=Sobre ExoneraTor
 footer.aboutexonerator.body=The ExoneraTor service maintains a database of IP 
addresses that have been part of the Tor network. It answers the question 
whether there was a Tor relay running on a given IP address on a given 
date. ExoneraTor may store more than one IP address per relay if relays 
use a different IP address for exiting to the Internet than for registering in 
the Tor network, and it stores whether a relay permitted transit of Tor traffic 
to the open Internet at that time.
-footer.trademark.text="Tor" and the "Onion Logo" are %s of The Tor Project, 
Inc.
+footer.trademark.text="Tor" e "Logótipo Onion" são %s de The Tor Project, 
Inc.
 footer.trademark.link=marcas registadas
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-messenger-authproperties] Update translations for tor-messenger-authproperties

2017-02-24 Thread translation
commit c62737d7a147f484c6b69a44218da33ea53e9a75
Author: Translation commit bot 
Date:   Fri Feb 24 15:47:35 2017 +

Update translations for tor-messenger-authproperties
---
 pt/auth.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pt/auth.properties b/pt/auth.properties
index 26f37d3..712c859 100644
--- a/pt/auth.properties
+++ b/pt/auth.properties
@@ -1,7 +1,7 @@
 auth.title=Verificar identidade de %S
 auth.yourFingerprint=Identificador para si, %S:\n%S
-auth.theirFingerprint=Purported fingerprint for %S:\n%S
-auth.help=Verifying a contact's identity helps ensure that the person you are 
talking to is who they claim to be.
+auth.theirFingerprint=Identificador suposto para %S:\n%S
+auth.help=A verificação da identidade de um contacto ajuda a garantir que a 
pessoa com quem está a falar é quem alega ser.
 auth.helpTitle=Ajuda de verificação
 auth.question=Esta é uma questão colocada pelo seu contacto:\n\n%S\n\nInsira 
aqui a resposta secreta (sensível mai./min.):
 auth.secret=Insira aqui a resposta secreta:

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-messenger-fingerdtd_completed] Update translations for tor-messenger-fingerdtd_completed

2017-02-24 Thread translation
commit 82bb13e632895861d341bbe6731ca31337dede3e
Author: Translation commit bot 
Date:   Fri Feb 24 15:47:43 2017 +

Update translations for tor-messenger-fingerdtd_completed
---
 pt/finger.dtd | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pt/finger.dtd b/pt/finger.dtd
index def786e..6d8302e 100644
--- a/pt/finger.dtd
+++ b/pt/finger.dtd
@@ -7,4 +7,9 @@
 
 
 
-
\ No newline at end of file
+
+
+
+
+
+
\ No newline at end of file

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-messenger-fingerdtd] Update translations for tor-messenger-fingerdtd

2017-02-24 Thread translation
commit 99ab279e49723d92956476f10b1cb438d16b6bc1
Author: Translation commit bot 
Date:   Fri Feb 24 15:47:39 2017 +

Update translations for tor-messenger-fingerdtd
---
 pt/finger.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pt/finger.dtd b/pt/finger.dtd
index 2ce8dfc..6d8302e 100644
--- a/pt/finger.dtd
+++ b/pt/finger.dtd
@@ -12,4 +12,4 @@
 
 
 
-
\ No newline at end of file
+
\ No newline at end of file

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-messenger-authproperties_completed] Update translations for tor-messenger-authproperties_completed

2017-02-24 Thread translation
commit bd7dc4bbd651d074599ae055412e5aa930469326
Author: Translation commit bot 
Date:   Fri Feb 24 15:47:32 2017 +

Update translations for tor-messenger-authproperties_completed
---
 pt/auth.properties | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/pt/auth.properties b/pt/auth.properties
new file mode 100644
index 000..712c859
--- /dev/null
+++ b/pt/auth.properties
@@ -0,0 +1,7 @@
+auth.title=Verificar identidade de %S
+auth.yourFingerprint=Identificador para si, %S:\n%S
+auth.theirFingerprint=Identificador suposto para %S:\n%S
+auth.help=A verificação da identidade de um contacto ajuda a garantir que a 
pessoa com quem está a falar é quem alega ser.
+auth.helpTitle=Ajuda de verificação
+auth.question=Esta é uma questão colocada pelo seu contacto:\n\n%S\n\nInsira 
aqui a resposta secreta (sensível mai./min.):
+auth.secret=Insira aqui a resposta secreta:

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [torspec/master] document sha256 digest in extra-info-digest

2017-02-24 Thread nickm
commit 0f03581e748d4867a009d3d9473d61a400a3f5c1
Author: Nick Mathewson 
Date:   Fri Feb 24 10:43:27 2017 -0500

document sha256 digest in extra-info-digest
---
 dir-spec.txt | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/dir-spec.txt b/dir-spec.txt
index d91f76f..9c8fd4a 100644
--- a/dir-spec.txt
+++ b/dir-spec.txt
@@ -658,16 +658,20 @@
 
[Versions before 0.2.0.1-alpha don't recognize this]
 
-   "extra-info-digest" digest NL
+   "extra-info-digest" SP sha1digest [SP sha256-digest] NL
 
[At most once]
 
-   "Digest" is a hex-encoded digest (using upper-case characters) of the
-   router's extra-info document, as signed in the router's extra-info
+   "sha1-digest" is a hex-encoded digest (using upper-case characters) of
+   the router's extra-info document, as signed in the router's extra-info
(that is, not including the signature).  (If this field is absent, the
router is not uploading a corresponding extra-info document.)
 
-   [Versions before 0.2.0.1-alpha don't recognize this]
+   "sha256-digest" is a base64-encoded SHA256 digest of the extra-info
+   document, computed over the same data.
+
+   [Versions before 0.2.7.2-alpha did not include a SHA256 digest.]
+   [Versions before 0.2.0.1-alpha don't recognize this field at all.]
 
"hidden-service-dir" *(SP VersionNum) NL
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [collector/master] Remove formats page.

2017-02-24 Thread karsten
commit ea3c64648c9cf7e903d059ed5bd7677e967582df
Author: Karsten Loesing 
Date:   Tue Feb 21 11:35:15 2017 +0100

Remove formats page.
---
 src/main/webapp/formats.html | 28 
 1 file changed, 28 deletions(-)

diff --git a/src/main/webapp/formats.html b/src/main/webapp/formats.html
deleted file mode 100644
index c000202..000
--- a/src/main/webapp/formats.html
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-  
-
-
-
-CollecTor
-
-
-  
-  
-
-  
-
-  
-The page you requested doesn't exist anymore
-Sorry, but the content on this page was moved to the
-   start page.
-Please update your bookmarks to point to
-  https://collector.torproject.org/.
-
-This page will be removed after October 31, 2016.
-  
-
-  
-
-  
-

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-greeter-2] Update translations for tails-greeter-2

2017-02-24 Thread translation
commit e059174014012ee41eaa6cefb618102c36439000
Author: Translation commit bot 
Date:   Fri Feb 24 12:18:10 2017 +

Update translations for tails-greeter-2
---
 vi/vi.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vi/vi.po b/vi/vi.po
index 323fff7..6a362ea 100644
--- a/vi/vi.po
+++ b/vi/vi.po
@@ -171,7 +171,7 @@ msgstr "Khóa dung lượng bền vững lại"
 #: ../data/greeter.ui.h:35
 msgid "Your persistent storage is unlocked. Restart Tails to lock it again."
 msgstr ""
-"Phân vùng lưu trữ bền vững của bạn bị mở khoá. Khởi 
độnt lại Tails để khoá "
+"Phân vùng lưu trữ bền vững của bạn bị mở khoá. Khởi 
động lại Tails để khoá "
 "nó lại."
 
 #: ../data/greeter.ui.h:36 ../tailsgreeter/gui.py:554

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-greeter-2_completed] Update translations for tails-greeter-2_completed

2017-02-24 Thread translation
commit dd3e6ece635d75d172419177603576376a0d274a
Author: Translation commit bot 
Date:   Fri Feb 24 12:18:13 2017 +

Update translations for tails-greeter-2_completed
---
 vi/vi.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vi/vi.po b/vi/vi.po
index 323fff7..6a362ea 100644
--- a/vi/vi.po
+++ b/vi/vi.po
@@ -171,7 +171,7 @@ msgstr "Khóa dung lượng bền vững lại"
 #: ../data/greeter.ui.h:35
 msgid "Your persistent storage is unlocked. Restart Tails to lock it again."
 msgstr ""
-"Phân vùng lưu trữ bền vững của bạn bị mở khoá. Khởi 
độnt lại Tails để khoá "
+"Phân vùng lưu trữ bền vững của bạn bị mở khoá. Khởi 
động lại Tails để khoá "
 "nó lại."
 
 #: ../data/greeter.ui.h:36 ../tailsgreeter/gui.py:554

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-browser-manual] Update translations for tor-browser-manual

2017-02-24 Thread translation
commit d5d2508f6f813766e84785695a13a22432231424
Author: Translation commit bot 
Date:   Fri Feb 24 12:18:22 2017 +

Update translations for tor-browser-manual
---
 vi/vi.po | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/vi/vi.po b/vi/vi.po
index bd37042..421758f 100644
--- a/vi/vi.po
+++ b/vi/vi.po
@@ -781,6 +781,9 @@ msgid ""
 " you do not need to worry about connecting"
 " over HTTPS."
 msgstr ""
+"Toàn bộ tín hiệu truyền giữa những người dùng Tor và các 
dịch vụ onion được "
+"mã hoá end-to-end, vì vậy bạn không cần phải lo lắng về việc kết nối qua HTTPS."
 
 #: onionsites.page:36
 msgid ""
@@ -789,6 +792,9 @@ msgid ""
 " that it is connecting to the right location and that the connection is not "
 "being tampered with."
 msgstr ""
+"Địa chỉ của một dịch vụ onion được tạo một cách tự 
động, vì vậy không cần "
+"phải mua một tên miền; cái URL .onion đó cũng giúp Tor đảm 
bảo rằng nó đang "
+"kết nối đến đúng địa chỉ và kết nối đó không bị 
chỉnh sửa."
 
 #: onionsites.page:46
 msgid "How to access an onion service"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-greeter-2_completed] Update translations for tails-greeter-2_completed

2017-02-24 Thread translation
commit e7637e5e79b215d4ca9ff9702834ab8bbe978462
Author: Translation commit bot 
Date:   Fri Feb 24 11:48:16 2017 +

Update translations for tails-greeter-2_completed
---
 vi/vi.po | 218 ++-
 1 file changed, 105 insertions(+), 113 deletions(-)

diff --git a/vi/vi.po b/vi/vi.po
index a29c918..323fff7 100644
--- a/vi/vi.po
+++ b/vi/vi.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-11-18 00:07+\n"
+"POT-Creation-Date: 2017-01-31 10:47+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: Acooldude , 2016\n"
 "Language-Team: Vietnamese (https://www.transifex.com/otf/teams/1519/vi/)\n"
@@ -47,27 +47,30 @@ msgstr "Xác nhận mật khẩu quản trị của bạn"
 msgid "Disable"
 msgstr "Vô hiệu"
 
-#: ../data/greeter.ui.h:7
+#. This string will never be displayed in the 1st version of the greeter.
+#: ../data/greeter.ui.h:8
 msgid "Windows Camouflage"
 msgstr "Ngụy trang Windows"
 
-#: ../data/greeter.ui.h:8
+#. This string will never be displayed in the 1st version of the greeter.
+#: ../data/greeter.ui.h:10
 msgid ""
 "This option makes Tails look like Microsoft Windows 10. This can be useful "
-"to avoid attracting suspiction in public places."
+"to avoid attracting suspicion in public places."
 msgstr ""
-"Tùy chọn này làm Tails nhìn giống Microsoft Windows 10. Việc này 
giúp tránh "
-"thu hút sự nghi ngờ nơi công cộng."
+"Tùy chọn này làm Talls trông giống như Microsoft Windows 10. Việc 
này hữu "
+"ích khi tránh việc thu hút những nghi ngờ ở nơi công cộng."
 
-#: ../data/greeter.ui.h:9
+#. This string will never be displayed in the 1st version of the greeter.
+#: ../data/greeter.ui.h:12
 msgid "Microsoft Windows 10 camouflage"
 msgstr "Sự ngụy trang Microsoft Windows 10"
 
-#: ../data/greeter.ui.h:10
+#: ../data/greeter.ui.h:13
 msgid "MAC Address Spoofing"
 msgstr "Sự làm giả địa chỉ MAC"
 
-#: ../data/greeter.ui.h:11
+#: ../data/greeter.ui.h:14
 msgid ""
 "MAC address spoofing hides the serial number of your network interface (Wi-"
 "Fi or wired) to the local network. Spoofing MAC addresses is generally safer"
@@ -79,111 +82,115 @@ msgstr ""
 "toàn ơn vì nó giúp bạn ẩn vị trí địa lý của mình. Nhưng 
nó có thể tạo ra "
 "những vấn đề về kết nối hoặc trông đáng nghi ngờ."
 
-#: ../data/greeter.ui.h:12
+#: ../data/greeter.ui.h:15
 msgid "Spoof all MAC addresses (default)"
 msgstr "Làm giả tất cả địa chỉ MAC (mặc định)"
 
-#: ../data/greeter.ui.h:13
+#: ../data/greeter.ui.h:16
 msgid "Don't spoof MAC addresses"
 msgstr "Không làm giả địa chỉ MAC"
 
-#: ../data/greeter.ui.h:14
+#: ../data/greeter.ui.h:17 ../tailsgreeter/gui.py:514
+msgid "Cannot unlock encrypted storage with this passphrase."
+msgstr "Không thể mở khóa vùng lưu trữ bị mã hóa với mật 
khẩu này."
+
+#: ../data/greeter.ui.h:18
+msgid ""
+"You will configure the Tor bridge and local proxy later on after connecting "
+"to a network."
+msgstr ""
+"Bạn sẽ cấu hình cầu nối Tor và ủy quyền nội bộ sau khi 
kết nối tới một mạng "
+"lưới."
+
+#: ../data/greeter.ui.h:19
 msgid "Welcome to Tails!"
 msgstr "Chào mừng đến với Tails!"
 
-#: ../data/greeter.ui.h:15
+#. This string will never be displayed in the 1st version of the greeter.
+#: ../data/greeter.ui.h:21
+msgctxt ""
 msgid ""
 "To get guided through Tails' settings, click on Take a Tour above"
 msgstr ""
 "Để được hướng dẫn về những cài đặt của Tails, bấm 
chuột vào Take a "
 "Tour ở trên"
 
-#: ../data/greeter.ui.h:16
+#: ../data/greeter.ui.h:22
 msgid "Language & Region"
 msgstr "Ngôn ngữ và Vùng"
 
-#: ../data/greeter.ui.h:17
+#: ../data/greeter.ui.h:23
 msgid "Default Settings"
 msgstr "Những cài đặt mặc định"
 
-#: ../data/greeter.ui.h:18
+#: ../data/greeter.ui.h:24
 msgid "Save Language & Region Settings"
 msgstr "Lưu những cài đặt về ngôn ngữ và vùng"
 
-#: ../data/greeter.ui.h:19
+#: ../data/greeter.ui.h:25
 msgid "Language"
 msgstr "Ngôn ngữ"
 
-#: ../data/greeter.ui.h:20
-msgid "English"
-msgstr "Tiếng Anh"
-
-#: ../data/greeter.ui.h:21
+#: ../data/greeter.ui.h:26
 msgid "Keyboard Layout"
 msgstr "Cách bố trí bàn phím"
 
-#: ../data/greeter.ui.h:22
-msgid "English (US)"
-msgstr "Tiếng Anh (Mỹ)"
-
-#: ../data/greeter.ui.h:23
+#: ../data/greeter.ui.h:27
 msgid "Formats"
 msgstr "Những khuôn mẫu"
 
-#: ../data/greeter.ui.h:24
-msgid "United States"
-msgstr "Mỹ"
-
-#: ../data/greeter.ui.h:25
+#: ../data/greeter.ui.h:28
 msgid "Time Zone"
 msgstr "Múi giờ"
 
-#: ../data/greeter.ui.h:26
-msgid "UTC"
-msgstr "UTC"
-
-#: ../data/greeter.ui.h:27
+#: ../data/greeter.ui.h:29
 msgid "Encrypted 

[tor-commits] [translation/tails-greeter-2] Update translations for tails-greeter-2

2017-02-24 Thread translation
commit 3520ba3f203923c61d2ac685585571284d9dd490
Author: Translation commit bot 
Date:   Fri Feb 24 11:48:10 2017 +

Update translations for tails-greeter-2
---
 vi/vi.po | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/vi/vi.po b/vi/vi.po
index 5e82ca3..323fff7 100644
--- a/vi/vi.po
+++ b/vi/vi.po
@@ -171,6 +171,8 @@ msgstr "Khóa dung lượng bền vững lại"
 #: ../data/greeter.ui.h:35
 msgid "Your persistent storage is unlocked. Restart Tails to lock it again."
 msgstr ""
+"Phân vùng lưu trữ bền vững của bạn bị mở khoá. Khởi 
độnt lại Tails để khoá "
+"nó lại."
 
 #: ../data/greeter.ui.h:36 ../tailsgreeter/gui.py:554
 msgid "Additional Settings"
@@ -182,7 +184,7 @@ msgstr "Lưu những cài đặt thêm"
 
 #: ../data/greeter.ui.h:38
 msgid "Add an additional setting"
-msgstr ""
+msgstr "Thêm một cài đặt nữa"
 
 #: ../data/greeter.ui.h:39
 msgid "Network Configuration"
@@ -301,6 +303,9 @@ msgid ""
 "{stdout}\n"
 "{stderr}"
 msgstr ""
+"Tính trực tiếp-bền vững đã hỏng với mã trả về 
{returncode}:\n"
+"{stdout}\n"
+"{stderr}"
 
 #: ../tailsgreeter/persistence.py:168
 #, python-brace-format

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-browser-manual] Update translations for tor-browser-manual

2017-02-24 Thread translation
commit e0716bbfc00abf88974348228f2120b2c9a7f823
Author: Translation commit bot 
Date:   Fri Feb 24 11:18:21 2017 +

Update translations for tor-browser-manual
---
 vi/vi.po | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/vi/vi.po b/vi/vi.po
index 67580d1..bd37042 100644
--- a/vi/vi.po
+++ b/vi/vi.po
@@ -792,7 +792,7 @@ msgstr ""
 
 #: onionsites.page:46
 msgid "How to access an onion service"
-msgstr "Làm thế nào để truy cập một dịch vụ Tor"
+msgstr "Làm thế nào để truy cập một dịch vụ onion"
 
 #. This is a reference to an external file such as an image or video. When
 #. the file changes, the md5 hash will change to let you know you need to
@@ -814,8 +814,8 @@ msgid ""
 "mostly random letters and numbers, followed by “.onion”."
 msgstr ""
 "Giống như bất kỳ trang web nào khác, bạn sẽ cần biết địa 
chỉ của một dịch vụ"
-" Tor để có thể kết nối. Một địa chỉ Tor là một dãy 
mười sáu chữ cái và con "
-"số gần như ngẫu nhiên, tiếp sau là “.onion”."
+" onion để có thể kết nối. Một địa chỉ onion là một dãy 
mười sáu chữ cái và "
+"con số gần như ngẫu nhiên, tiếp sau là “.onion”."
 
 #: onionsites.page:58 troubleshooting.page:10
 msgid "Troubleshooting"
@@ -827,9 +827,9 @@ msgid ""
 "entered the 16-character onion address correctly: even a small mistake will "
 "stop Tor Browser from being able to reach the site."
 msgstr ""
-"Nếu bạn không thể truy cập dịch vụ Tor mà bạn cần, hãy 
đảm bảo rằng bạn vừa "
-"nhập 16 ký tự của địa chỉ Tor một cách chính xác: thậm 
chí một lỗi nhỏ cũng "
-"sẽ cản trở Trình duyệt Tor kết nối với trang đó."
+"Nếu bạn không thể truy cập dịch vụ onion mà bạn cần, hãy 
đảm bảo rằng bạn "
+"vừa nhập 16 ký tự của địa chỉ onion đó một cách chính 
xác: thậm chí một lỗi "
+"nhỏ cũng sẽ cản trở Trình duyệt Tor kết nối với trang đó."
 
 #: onionsites.page:64
 msgid ""
@@ -837,9 +837,9 @@ msgid ""
 "later. There may be a temporary connection issue, or the site operators may "
 "have allowed it to go offline without warning."
 msgstr ""
-"Nếu bạn vẫn không thể kết nối với dịch vụ Tor, hãy thử 
lại sau. Có thể có "
-"một trục trặc tạm thời, hay trang web đó có thể đang ngắt 
kết nối mà không "
-"thông báo."
+"Nếu bạn vẫn không thể kết nối với dịch vụ onion đó, hãy 
thử lại sau. Có thể "
+"có một trục trặc tạm thời, hay trang web đó có thể đang 
ngắt kết nối mà "
+"không thông báo."
 
 #: onionsites.page:69
 msgid ""
@@ -847,7 +847,7 @@ msgid ""
 "connecting to http://3g2upl4pq6kufc4m.onion/\;>DuckDuckGo's "
 "Onion Service"
 msgstr ""
-"Bạn cũng có thể đảm bảo rằng bạn có thể truy cập các 
dịch vụ Tor khác bởi "
+"Bạn cũng có thể đảm bảo rằng bạn có thể truy cập các 
dịch vụ onion khác bởi "
 "kết nối đến http://3g2upl4pq6kufc4m.onion/\;>Dịch vụ 
Tor của "
 "DuckDuckGo"
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-greeter-2] Update translations for tails-greeter-2

2017-02-24 Thread translation
commit b1e704f876a56b49e9729ce70538812e22654cbb
Author: Translation commit bot 
Date:   Fri Feb 24 11:18:09 2017 +

Update translations for tails-greeter-2
---
 vi/vi.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vi/vi.po b/vi/vi.po
index d6f8dbe..5e82ca3 100644
--- a/vi/vi.po
+++ b/vi/vi.po
@@ -272,7 +272,7 @@ msgstr "Khởi động Tails"
 
 #: ../tailsgreeter/language.py:119
 msgid "default:LTR"
-msgstr ""
+msgstr "mặc định:LTR"
 
 #: ../tailsgreeter/persistence.py:89
 #, python-brace-format

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-browser-manual] Update translations for tor-browser-manual

2017-02-24 Thread translation
commit b7666c45c5d8178bca0fa0270d82e5206a699f77
Author: Translation commit bot 
Date:   Fri Feb 24 10:51:48 2017 +

Update translations for tor-browser-manual
---
 vi/vi.po | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/vi/vi.po b/vi/vi.po
index e4789e7..67580d1 100644
--- a/vi/vi.po
+++ b/vi/vi.po
@@ -792,7 +792,7 @@ msgstr ""
 
 #: onionsites.page:46
 msgid "How to access an onion service"
-msgstr ""
+msgstr "Làm thế nào để truy cập một dịch vụ Tor"
 
 #. This is a reference to an external file such as an image or video. When
 #. the file changes, the md5 hash will change to let you know you need to
@@ -804,6 +804,8 @@ msgid ""
 "external ref='media/onionsites/onion_url.png' "
 "md5='f97f7fe10f07c3959c4430934974bbaa'"
 msgstr ""
+"Tham chiếu ngoài ref='media/onionsites/onion_url.png' "
+"md5='f97f7fe10f07c3959c4430934974bbaa'"
 
 #: onionsites.page:50
 msgid ""
@@ -811,10 +813,13 @@ msgid ""
 "service in order to connect to it. An onion address is a string of sixteen "
 "mostly random letters and numbers, followed by “.onion”."
 msgstr ""
+"Giống như bất kỳ trang web nào khác, bạn sẽ cần biết địa 
chỉ của một dịch vụ"
+" Tor để có thể kết nối. Một địa chỉ Tor là một dãy 
mười sáu chữ cái và con "
+"số gần như ngẫu nhiên, tiếp sau là “.onion”."
 
 #: onionsites.page:58 troubleshooting.page:10
 msgid "Troubleshooting"
-msgstr ""
+msgstr "Giải quyết vấn đề"
 
 #: onionsites.page:59
 msgid ""

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-browser-build/master] Adding comment for binutils patch

2017-02-24 Thread gk
commit 0e8a1c7f0355cf074435bbc4fb5c9fd506ffc21f
Author: Georg Koppen 
Date:   Fri Feb 24 09:32:01 2017 +

Adding comment for binutils patch
---
 projects/binutils/build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/projects/binutils/build b/projects/binutils/build
index b7a6e72..cdd01a6 100644
--- a/projects/binutils/build
+++ b/projects/binutils/build
@@ -23,6 +23,7 @@ cd [% project %]-[% c("version") %]
 sed 's/= extern_rt_rel_d;/= extern_rt_rel_d;\n  memset (extern_rt_rel_d, 0, 
PE_IDATA5_SIZE);/' -i ld/pe-dll.c
 # Needed for the hardening...
 patch -p1 < ../enable-reloc-section-ld.patch
+# Zeroing timestamps in PE headers reliably, see bug 12753.
 patch -p1 < ../peXXigen.patch
 [% END -%]
 ./configure --prefix=$distdir [% c('var/configure_opt') %]

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [collector/master] Update to metrics-lib 1.6.0.

2017-02-24 Thread karsten
commit 3d5bfbf738b587016069cb6e3a42afb71f595159
Author: Karsten Loesing 
Date:   Fri Feb 24 09:59:47 2017 +0100

Update to metrics-lib 1.6.0.
---
 build.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.xml b/build.xml
index 2dc6c03..7b8bc42 100644
--- a/build.xml
+++ b/build.xml
@@ -11,7 +11,7 @@
   
   
   
-  
+  
   
 
   

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [collector/master] Update to latest metrics-base.

2017-02-24 Thread karsten
commit 9a416d83e74723660b4511b7f3435b3a1c95129e
Author: Karsten Loesing 
Date:   Thu Feb 23 14:14:30 2017 +0100

Update to latest metrics-base.
---
 src/build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/build b/src/build
index bb0e1e5..6940759 16
--- a/src/build
+++ b/src/build
@@ -1 +1 @@
-Subproject commit bb0e1e50ba75dfa15add334706d8ce288fbf2b0b
+Subproject commit 6940759436bbd3bdb117572886f6104f78c3b469



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [exonerator/master] Update to metrics-lib 1.6.0.

2017-02-24 Thread karsten
commit 192af41f2678695ee7593681b38a6724389c1692
Author: Karsten Loesing 
Date:   Fri Feb 24 10:00:39 2017 +0100

Update to metrics-lib 1.6.0.
---
 build.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.xml b/build.xml
index 246a87e..f5b2767 100644
--- a/build.xml
+++ b/build.xml
@@ -12,7 +12,7 @@
   
   
   
-  
+  
   
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [collector/master] Use Java 7's diamond operator wherever possible.

2017-02-24 Thread karsten
commit 56ea752af2b4f614f08b2ab1017e77bbf6a88f9a
Author: Karsten Loesing 
Date:   Thu Feb 23 14:17:27 2017 +0100

Use Java 7's diamond operator wherever possible.

Implements #21535.
---
 .../bridgedescs/BridgeSnapshotReader.java  |  6 ++---
 .../bridgedescs/SanitizedBridgesWriter.java| 13 +-
 .../collector/exitlists/ExitListDownloader.java|  8 +++
 .../collector/index/CreateIndexJson.java   |  8 +++
 .../collector/relaydescs/ArchiveReader.java| 10 
 .../collector/relaydescs/ArchiveWriter.java| 28 ++
 .../relaydescs/CachedRelayDescriptorReader.java|  8 +++
 .../collector/relaydescs/ReferenceChecker.java |  8 +++
 .../relaydescs/RelayDescriptorDownloader.java  | 17 +++--
 .../relaydescs/RelayDescriptorParser.java  | 10 
 .../collector/torperf/TorperfDownloader.java   | 16 ++---
 11 files changed, 61 insertions(+), 71 deletions(-)

diff --git 
a/src/main/java/org/torproject/collector/bridgedescs/BridgeSnapshotReader.java 
b/src/main/java/org/torproject/collector/bridgedescs/BridgeSnapshotReader.java
index 0552307..9ffdf10 100644
--- 
a/src/main/java/org/torproject/collector/bridgedescs/BridgeSnapshotReader.java
+++ 
b/src/main/java/org/torproject/collector/bridgedescs/BridgeSnapshotReader.java
@@ -45,7 +45,7 @@ public class BridgeSnapshotReader {
   throw new IllegalArgumentException();
 }
 
-SortedSet parsed = new TreeSet();
+SortedSet parsed = new TreeSet<>();
 File bdDir = bridgeDirectoriesDir;
 File pbdFile = new File(statsDirectory, "parsed-bridge-directories");
 boolean modified = false;
@@ -69,7 +69,7 @@ public class BridgeSnapshotReader {
   }
   logger.debug("Importing files in directory " + bridgeDirectoriesDir
   + "/...");
-  Set descriptorImportHistory = new HashSet();
+  Set descriptorImportHistory = new HashSet<>();
   int parsedFiles = 0;
   int skippedFiles = 0;
   int parsedStatuses = 0;
@@ -77,7 +77,7 @@ public class BridgeSnapshotReader {
   int skippedServerDescriptors = 0;
   int parsedExtraInfoDescriptors = 0;
   int skippedExtraInfoDescriptors = 0;
-  Stack filesInInputDir = new Stack();
+  Stack filesInInputDir = new Stack<>();
   filesInInputDir.add(bdDir);
   while (!filesInInputDir.isEmpty()) {
 File pop = filesInInputDir.pop();
diff --git 
a/src/main/java/org/torproject/collector/bridgedescs/SanitizedBridgesWriter.java
 
b/src/main/java/org/torproject/collector/bridgedescs/SanitizedBridgesWriter.java
index 45a7565..beeb944 100644
--- 
a/src/main/java/org/torproject/collector/bridgedescs/SanitizedBridgesWriter.java
+++ 
b/src/main/java/org/torproject/collector/bridgedescs/SanitizedBridgesWriter.java
@@ -152,7 +152,7 @@ public class SanitizedBridgesWriter extends CollecTorMain {
 
 /* Read hex-encoded secrets for replacing IP addresses with hashes
  * from disk. */
-this.secretsForHashingIpAddresses = new TreeMap();
+this.secretsForHashingIpAddresses = new TreeMap<>();
 this.bridgeIpSecretsFile = new File(statsDirectory,
 "bridge-ip-secrets");
 if (this.bridgeIpSecretsFile.exists()) {
@@ -291,7 +291,7 @@ public class SanitizedBridgesWriter extends CollecTorMain {
 /* Invalid IPv6 address. */
 return null;
   }
-  List hexParts = new ArrayList();
+  List hexParts = new ArrayList<>();
   for (String doubleColonSeparatedPart : doubleColonSeparatedParts) {
 StringBuilder hexPart = new StringBuilder();
 String[] parts = doubleColonSeparatedPart.split(":", -1);
@@ -461,8 +461,7 @@ public class SanitizedBridgesWriter extends CollecTorMain {
 
 /* Parse the given network status line by line. */
 StringBuilder header = new StringBuilder();
-SortedMap scrubbedLines =
-new TreeMap();
+SortedMap scrubbedLines = new TreeMap<>();
 try {
   StringBuilder scrubbed = new StringBuilder();
   BufferedReader br = new BufferedReader(new StringReader(new String(
@@ -692,7 +691,7 @@ public class SanitizedBridgesWriter extends CollecTorMain {
  * read the fingerprint. */
 } else if (line.startsWith("or-address ")) {
   if (orAddresses == null) {
-orAddresses = new ArrayList();
+orAddresses = new ArrayList<>();
   }
   orAddresses.add(line.substring("or-address ".length()));
 
@@ -732,7 +731,7 @@ public class SanitizedBridgesWriter extends CollecTorMain {
 scrubbedAddress = scrubIpv4Address(address, fingerprintBytes,
 published);
 if (orAddresses != null) {
-  scrubbedOrAddresses = new ArrayList();
+  scrubbedOrAddresses = new ArrayList<>();
   for (String orAddress : orAddresses) {
 String 

[tor-commits] [metrics-web/master] Reduce build redundancy.

2017-02-24 Thread karsten
commit 5c2b1f5ca68800117d1d3a047b2dafa6f46c2ea1
Author: iwakeh 
Date:   Thu Feb 23 13:30:27 2017 +

Reduce build redundancy.
---
 modules/advbwdist/build.xml| 15 +++
 modules/clients/build.xml  | 18 +++---
 modules/collectdescs/build.xml | 14 +++---
 modules/connbidirect/build.xml | 15 +++
 modules/hidserv/build.xml  | 15 +++
 modules/legacy/build.xml   | 15 +--
 modules/webstats/build.xml | 10 +++---
 shared/build-base.xml  | 13 +
 8 files changed, 36 insertions(+), 79 deletions(-)

diff --git a/modules/advbwdist/build.xml b/modules/advbwdist/build.xml
index 0493d8a..9a95bbf 100644
--- a/modules/advbwdist/build.xml
+++ b/modules/advbwdist/build.xml
@@ -1,20 +1,11 @@
 
 
+  
+
   
   
   
+  
 
-  
-
-
-  
-
-  
-
-  
-
-  
 
 
diff --git a/modules/clients/build.xml b/modules/clients/build.xml
index eb2d6e2..f67bdae 100644
--- a/modules/clients/build.xml
+++ b/modules/clients/build.xml
@@ -1,23 +1,11 @@
 
 
+  
+
   
   
   
+  
 
-  
-
-
-
-  
-
-  
-
-  
-
-  
-
-  
 
 
diff --git a/modules/collectdescs/build.xml b/modules/collectdescs/build.xml
index 7c7eb0f..1499df6 100644
--- a/modules/collectdescs/build.xml
+++ b/modules/collectdescs/build.xml
@@ -1,19 +1,11 @@
 
 
+  
+
   
   
   
+  
 
-  
-
-
-  
-
-  
-
-  
-
-  
 
 
diff --git a/modules/connbidirect/build.xml b/modules/connbidirect/build.xml
index 7bc1f32..4c9c1f4 100644
--- a/modules/connbidirect/build.xml
+++ b/modules/connbidirect/build.xml
@@ -1,22 +1,13 @@
 
 
+  
+
   
   
   
   
   
+  
 
-  
-
-
-  
-
-  
-
-  
-
-  
 
 
diff --git a/modules/hidserv/build.xml b/modules/hidserv/build.xml
index c997161..2a26ea2 100644
--- a/modules/hidserv/build.xml
+++ b/modules/hidserv/build.xml
@@ -1,20 +1,11 @@
 
 
+  
+
   
   
   
+  
 
-  
-
-
-  
-
-  
-
-  
-
-  
 
 
diff --git a/modules/legacy/build.xml b/modules/legacy/build.xml
index f4ef8e7..bc2b674 100644
--- a/modules/legacy/build.xml
+++ b/modules/legacy/build.xml
@@ -1,8 +1,11 @@
 
 
+  
+
   
   
   
+  
 
   
 
@@ -12,18 +15,10 @@
 
   
 
-  
-  
+  
+  
 
   
 
-  
-  
-
-  
-
-  
 
 
diff --git a/modules/webstats/build.xml b/modules/webstats/build.xml
index 3c3291f..3a9f9f5 100644
--- a/modules/webstats/build.xml
+++ b/modules/webstats/build.xml
@@ -1,9 +1,12 @@
 
 
+  
+
   
   
   
   
+  
 
   
 
@@ -13,12 +16,5 @@
 
   
 
-  
-
-  
-
-  
 
 
diff --git a/shared/build-base.xml b/shared/build-base.xml
index e6c09de..35a8139 100644
--- a/shared/build-base.xml
+++ b/shared/build-base.xml
@@ -24,6 +24,11 @@
 
   
 
+  
+
+
+  
+
   
 
 
@@ -89,5 +94,13 @@
 
   
 
+  
+
+  
+
+  
+
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [metrics-web/master] Use Java 7's diamond operator wherever possible.

2017-02-24 Thread karsten
commit 4065d3a792b7954ee3d43a5ef52ee4d104c8df9c
Author: Karsten Loesing 
Date:   Thu Feb 23 14:22:37 2017 +0100

Use Java 7's diamond operator wherever possible.

As part of this, set Java source and target version to 7 in two build
files and add a missing library for running tests.

Implements #21535.
---
 .../src/org/torproject/metrics/advbwdist/Main.java |  7 ++--
 .../src/org/torproject/metrics/clients/Main.java   |  6 ++--
 modules/connbidirect/build.xml |  9 ++---
 .../org/torproject/metrics/connbidirect/Main.java  | 17 -
 .../torproject/metrics/connbidirect/MainTest.java  | 35 ---
 .../org/torproject/metrics/hidserv/Aggregator.java |  6 ++--
 .../torproject/metrics/hidserv/DateTimeHelper.java |  2 +-
 .../torproject/metrics/hidserv/DocumentStore.java  |  5 ++-
 .../torproject/metrics/hidserv/Extrapolator.java   | 14 
 .../src/org/torproject/metrics/hidserv/Main.java   | 11 +++---
 .../src/org/torproject/metrics/hidserv/Parser.java | 20 ---
 .../org/torproject/metrics/hidserv/Simulate.java   | 40 ++
 .../org/torproject/ernie/cron/Configuration.java   |  3 +-
 .../cron/RelayDescriptorDatabaseImporter.java  | 10 +++---
 .../cron/network/ConsensusStatsFileHandler.java| 11 +++---
 .../ernie/cron/performance/TorperfProcessor.java   | 14 
 .../java/org/torproject/metrics/webstats/Main.java |  2 +-
 website/build.xml  |  4 +--
 .../src/org/torproject/metrics/web/AnyServlet.java |  2 +-
 .../torproject/metrics/web/ContentProvider.java|  6 ++--
 .../org/torproject/metrics/web/GraphServlet.java   |  7 ++--
 .../org/torproject/metrics/web/LinkServlet.java|  2 +-
 .../org/torproject/metrics/web/MetricServlet.java  | 25 +-
 .../org/torproject/metrics/web/NewsServlet.java|  9 +++--
 .../org/torproject/metrics/web/TableServlet.java   |  7 ++--
 .../metrics/web/graphs/BubblesServlet.java |  2 +-
 .../torproject/metrics/web/graphs/Countries.java   |  2 +-
 .../metrics/web/graphs/GraphParameterChecker.java  |  9 +++--
 .../metrics/web/graphs/RObjectGenerator.java   | 13 ---
 .../metrics/web/graphs/TableParameterChecker.java  |  7 ++--
 .../metrics/web/research/ResearchStatsServlet.java |  2 +-
 31 files changed, 132 insertions(+), 177 deletions(-)

diff --git a/modules/advbwdist/src/org/torproject/metrics/advbwdist/Main.java 
b/modules/advbwdist/src/org/torproject/metrics/advbwdist/Main.java
index 83c4934..7d7678d 100644
--- a/modules/advbwdist/src/org/torproject/metrics/advbwdist/Main.java
+++ b/modules/advbwdist/src/org/torproject/metrics/advbwdist/Main.java
@@ -38,8 +38,7 @@ public class Main {
 + "server-descriptors"));
 Iterator descriptorFiles =
 descriptorReader.readDescriptors();
-Map serverDescriptors =
-new HashMap();
+Map serverDescriptors = new HashMap<>();
 while (descriptorFiles.hasNext()) {
   DescriptorFile descriptorFile = descriptorFiles.next();
   for (Descriptor descriptor : descriptorFile.getDescriptors()) {
@@ -87,8 +86,8 @@ public class Main {
 (RelayNetworkStatusConsensus) descriptor;
 String validAfter = dateTimeFormat.format(
 consensus.getValidAfterMillis());
-List advertisedBandwidthsAllRelays = new ArrayList();
-List advertisedBandwidthsExitsOnly = new ArrayList();
+List advertisedBandwidthsAllRelays = new ArrayList<>();
+List advertisedBandwidthsExitsOnly = new ArrayList<>();
 for (NetworkStatusEntry relay
 : consensus.getStatusEntries().values()) {
   if (!relay.getFlags().contains("Running")) {
diff --git a/modules/clients/src/org/torproject/metrics/clients/Main.java 
b/modules/clients/src/org/torproject/metrics/clients/Main.java
index c9dc004..dff73f7 100644
--- a/modules/clients/src/org/torproject/metrics/clients/Main.java
+++ b/modules/clients/src/org/torproject/metrics/clients/Main.java
@@ -297,8 +297,7 @@ public class Main {
   SortedMap frequencies, long publishedMillis)
   throws IOException {
 double total = 0.0;
-SortedMap frequenciesCopy =
-new TreeMap();
+SortedMap frequenciesCopy = new TreeMap<>();
 if (frequencies != null) {
   for (Map.Entry e : frequencies.entrySet()) {
 if (e.getValue() < 4.0) {
@@ -399,8 +398,7 @@ public class Main {
 }
   }
 
-  private static Map openOutputFiles =
-  new HashMap();
+  private static Map openOutputFiles = new HashMap<>();
 
   private static void writeOutputLine(String fingerprint, String node,
   String metric, String country, String transport, String version,
diff --git a/modules/connbidirect/build.xml b/modules/connbidirect/build.xml