[tor-commits] [tor/release-0.4.6] Merge branch 'maint-0.4.6' into release-0.4.6

2021-10-20 Thread ahf
commit da02708be17546d591c6499f5e69d22ed38800df
Merge: 6edc9bcc13 1e08efdb58
Author: Alexander Færøy 
Date:   Wed Oct 20 21:47:26 2021 +

Merge branch 'maint-0.4.6' into release-0.4.6

 changes/ticket30477 | 4 
 1 file changed, 4 insertions(+)

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


[tor-commits] [tor/release-0.4.6] Announce URL to bridge status page when starting Tor as a bridge relay.

2021-10-20 Thread ahf
commit 73727397652f933c710d701c5b2e27cbac12af49
Author: Alexander Færøy 
Date:   Mon Nov 23 23:41:17 2020 +

Announce URL to bridge status page when starting Tor as a bridge relay.

This patch makes Tor announce the relay specific bridge status page URL
when Tor is starting up before bootstrap occours.

See: tor#30477
---
 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --git a/changes/ticket30477 b/changes/ticket30477
new file mode 100644
index 00..379fc4e7eb
--- /dev/null
+++ b/changes/ticket30477
@@ -0,0 +1,4 @@
+  o Minor features (bridge):
+- We now announce the URL to Tor's new bridge status at
+  https://bridges.torproject.org/ when Tor is configured to run as a bridge
+  relay. Closes ticket 30477.
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 283f7c326b..7ea2a4e719 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -803,6 +803,25 @@ router_initialize_tls_context(void)
   (unsigned int)lifetime);
 }
 
+/** Announce URL to bridge status page. */
+STATIC void
+router_announce_bridge_status_page(void)
+{
+  char fingerprint[FINGERPRINT_LEN + 1];
+
+  if (crypto_pk_get_hashed_fingerprint(get_server_identity_key(),
+   fingerprint) < 0) {
+// LCOV_EXCL_START
+log_err(LD_GENERAL, "Unable to compute bridge fingerprint");
+return;
+// LCOV_EXCL_STOP
+  }
+
+  log_notice(LD_GENERAL, "You can check the status of your bridge relay at "
+ "https://bridges.torproject.org/status?id=%s;,
+ fingerprint);
+}
+
 /** Compute fingerprint (or hashed fingerprint if hashed is 1) and write
  * it to 'fingerprint' (or 'hashed-fingerprint'). Return 0 on success, or
  * -1 if Tor should die,
@@ -1103,6 +1122,10 @@ init_keys(void)
 return -1;
   }
 
+  /* Display URL to bridge status page. */
+  if (! public_server_mode(options))
+router_announce_bridge_status_page();
+
   if (!authdir_mode(options))
 return 0;
   /* 6. [authdirserver only] load approved-routers file */
diff --git a/src/feature/relay/router.h b/src/feature/relay/router.h
index ab1f771017..2d9ff3f8f3 100644
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@ -119,6 +119,7 @@ void router_free_all(void);
 /* Used only by router.c and test.c */
 STATIC void get_platform_str(char *platform, size_t len);
 STATIC int router_write_fingerprint(int hashed);
+STATIC void router_announce_bridge_status_page(void);
 #endif
 
 #endif /* !defined(TOR_ROUTER_H) */



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


[tor-commits] [tor/release-0.4.6] Merge branch 'maint-0.3.5' into maint-0.4.5

2021-10-20 Thread ahf
commit 5717b88bcb88d374b7b934622f0b7bf62cdab05c
Merge: fdc7549b61 7372739765
Author: Alexander Færøy 
Date:   Wed Oct 20 21:47:17 2021 +

Merge branch 'maint-0.3.5' into maint-0.4.5

 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --cc src/feature/relay/router.c
index 2696b8633b,7ea2a4e719..0589786619
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@@ -1140,11 -1121,11 +1159,15 @@@ init_keys(void
  log_err(LD_FS, "Error writing hashed fingerprint to file");
  return -1;
}
 +  if (router_write_fingerprint(0, 1)) {
 +log_err(LD_FS, "Error writing ed25519 identity to file");
 +return -1;
 +  }
  
+   /* Display URL to bridge status page. */
+   if (! public_server_mode(options))
+ router_announce_bridge_status_page();
+ 
if (!authdir_mode(options))
  return 0;
/* 6. [authdirserver only] load approved-routers file */
diff --cc src/feature/relay/router.h
index aa03c27142,2d9ff3f8f3..9556a66e68
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@@ -125,29 -115,11 +125,30 @@@ void router_reset_warnings(void)
  void router_free_all(void);
  
  #ifdef ROUTER_PRIVATE
 -/* Used only by router.c and test.c */
 +/* Used only by router.c and the unit tests */
  STATIC void get_platform_str(char *platform, size_t len);
 -STATIC int router_write_fingerprint(int hashed);
 +STATIC int router_write_fingerprint(int hashed, int ed25519_identity);
 +STATIC smartlist_t *get_my_declared_family(const or_options_t *options);
+ STATIC void router_announce_bridge_status_page(void);
 -#endif
 +STATIC int load_stats_file(const char *filename, const char *ts_tag,
 +   time_t now, char **out);
 +
 +#ifdef TOR_UNIT_TESTS
 +extern time_t desc_clean_since;
 +extern const char *desc_dirty_reason;
 +void set_server_identity_key_digest_testing(const uint8_t *digest);
 +MOCK_DECL(STATIC const struct curve25519_keypair_t *,
 +   get_current_curve25519_keypair,(void));
 +
 +MOCK_DECL(STATIC int,
 +  router_build_fresh_unsigned_routerinfo,(routerinfo_t **ri_out));
 +STATIC extrainfo_t *router_build_fresh_signed_extrainfo(
 +  const routerinfo_t *ri);
 +STATIC void router_update_routerinfo_from_extrainfo(routerinfo_t *ri,
 +const extrainfo_t *ei);
 +STATIC int router_dump_and_sign_routerinfo_descriptor_body(routerinfo_t *ri);
 +#endif /* defined(TOR_UNIT_TESTS) */
 +
 +#endif /* defined(ROUTER_PRIVATE) */
  
  #endif /* !defined(TOR_ROUTER_H) */



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


[tor-commits] [tor/release-0.4.6] Merge branch 'maint-0.4.5' into maint-0.4.6

2021-10-20 Thread ahf
commit 1e08efdb5891008f8180603bccf461c467275f57
Merge: 16cbbf04c4 5717b88bcb
Author: Alexander Færøy 
Date:   Wed Oct 20 21:47:26 2021 +

Merge branch 'maint-0.4.5' into maint-0.4.6

 changes/ticket30477 | 4 
 1 file changed, 4 insertions(+)



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


[tor-commits] [tor/maint-0.4.6] Merge branch 'maint-0.4.5' into maint-0.4.6

2021-10-20 Thread ahf
commit 1e08efdb5891008f8180603bccf461c467275f57
Merge: 16cbbf04c4 5717b88bcb
Author: Alexander Færøy 
Date:   Wed Oct 20 21:47:26 2021 +

Merge branch 'maint-0.4.5' into maint-0.4.6

 changes/ticket30477 | 4 
 1 file changed, 4 insertions(+)

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


[tor-commits] [tor/release-0.4.5] Merge branch 'maint-0.4.5' into release-0.4.5

2021-10-20 Thread ahf
commit d6b6cd7cd7b9fedb1b2955b1bd7a4ec8b0218e89
Merge: 04886b3393 5717b88bcb
Author: Alexander Færøy 
Date:   Wed Oct 20 21:47:26 2021 +

Merge branch 'maint-0.4.5' into release-0.4.5

 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

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


[tor-commits] [tor/release-0.3.5] Announce URL to bridge status page when starting Tor as a bridge relay.

2021-10-20 Thread ahf
commit 73727397652f933c710d701c5b2e27cbac12af49
Author: Alexander Færøy 
Date:   Mon Nov 23 23:41:17 2020 +

Announce URL to bridge status page when starting Tor as a bridge relay.

This patch makes Tor announce the relay specific bridge status page URL
when Tor is starting up before bootstrap occours.

See: tor#30477
---
 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --git a/changes/ticket30477 b/changes/ticket30477
new file mode 100644
index 00..379fc4e7eb
--- /dev/null
+++ b/changes/ticket30477
@@ -0,0 +1,4 @@
+  o Minor features (bridge):
+- We now announce the URL to Tor's new bridge status at
+  https://bridges.torproject.org/ when Tor is configured to run as a bridge
+  relay. Closes ticket 30477.
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 283f7c326b..7ea2a4e719 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -803,6 +803,25 @@ router_initialize_tls_context(void)
   (unsigned int)lifetime);
 }
 
+/** Announce URL to bridge status page. */
+STATIC void
+router_announce_bridge_status_page(void)
+{
+  char fingerprint[FINGERPRINT_LEN + 1];
+
+  if (crypto_pk_get_hashed_fingerprint(get_server_identity_key(),
+   fingerprint) < 0) {
+// LCOV_EXCL_START
+log_err(LD_GENERAL, "Unable to compute bridge fingerprint");
+return;
+// LCOV_EXCL_STOP
+  }
+
+  log_notice(LD_GENERAL, "You can check the status of your bridge relay at "
+ "https://bridges.torproject.org/status?id=%s;,
+ fingerprint);
+}
+
 /** Compute fingerprint (or hashed fingerprint if hashed is 1) and write
  * it to 'fingerprint' (or 'hashed-fingerprint'). Return 0 on success, or
  * -1 if Tor should die,
@@ -1103,6 +1122,10 @@ init_keys(void)
 return -1;
   }
 
+  /* Display URL to bridge status page. */
+  if (! public_server_mode(options))
+router_announce_bridge_status_page();
+
   if (!authdir_mode(options))
 return 0;
   /* 6. [authdirserver only] load approved-routers file */
diff --git a/src/feature/relay/router.h b/src/feature/relay/router.h
index ab1f771017..2d9ff3f8f3 100644
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@ -119,6 +119,7 @@ void router_free_all(void);
 /* Used only by router.c and test.c */
 STATIC void get_platform_str(char *platform, size_t len);
 STATIC int router_write_fingerprint(int hashed);
+STATIC void router_announce_bridge_status_page(void);
 #endif
 
 #endif /* !defined(TOR_ROUTER_H) */



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


[tor-commits] [tor/release-0.4.5] Merge branch 'maint-0.3.5' into maint-0.4.5

2021-10-20 Thread ahf
commit 5717b88bcb88d374b7b934622f0b7bf62cdab05c
Merge: fdc7549b61 7372739765
Author: Alexander Færøy 
Date:   Wed Oct 20 21:47:17 2021 +

Merge branch 'maint-0.3.5' into maint-0.4.5

 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --cc src/feature/relay/router.c
index 2696b8633b,7ea2a4e719..0589786619
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@@ -1140,11 -1121,11 +1159,15 @@@ init_keys(void
  log_err(LD_FS, "Error writing hashed fingerprint to file");
  return -1;
}
 +  if (router_write_fingerprint(0, 1)) {
 +log_err(LD_FS, "Error writing ed25519 identity to file");
 +return -1;
 +  }
  
+   /* Display URL to bridge status page. */
+   if (! public_server_mode(options))
+ router_announce_bridge_status_page();
+ 
if (!authdir_mode(options))
  return 0;
/* 6. [authdirserver only] load approved-routers file */
diff --cc src/feature/relay/router.h
index aa03c27142,2d9ff3f8f3..9556a66e68
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@@ -125,29 -115,11 +125,30 @@@ void router_reset_warnings(void)
  void router_free_all(void);
  
  #ifdef ROUTER_PRIVATE
 -/* Used only by router.c and test.c */
 +/* Used only by router.c and the unit tests */
  STATIC void get_platform_str(char *platform, size_t len);
 -STATIC int router_write_fingerprint(int hashed);
 +STATIC int router_write_fingerprint(int hashed, int ed25519_identity);
 +STATIC smartlist_t *get_my_declared_family(const or_options_t *options);
+ STATIC void router_announce_bridge_status_page(void);
 -#endif
 +STATIC int load_stats_file(const char *filename, const char *ts_tag,
 +   time_t now, char **out);
 +
 +#ifdef TOR_UNIT_TESTS
 +extern time_t desc_clean_since;
 +extern const char *desc_dirty_reason;
 +void set_server_identity_key_digest_testing(const uint8_t *digest);
 +MOCK_DECL(STATIC const struct curve25519_keypair_t *,
 +   get_current_curve25519_keypair,(void));
 +
 +MOCK_DECL(STATIC int,
 +  router_build_fresh_unsigned_routerinfo,(routerinfo_t **ri_out));
 +STATIC extrainfo_t *router_build_fresh_signed_extrainfo(
 +  const routerinfo_t *ri);
 +STATIC void router_update_routerinfo_from_extrainfo(routerinfo_t *ri,
 +const extrainfo_t *ei);
 +STATIC int router_dump_and_sign_routerinfo_descriptor_body(routerinfo_t *ri);
 +#endif /* defined(TOR_UNIT_TESTS) */
 +
 +#endif /* defined(ROUTER_PRIVATE) */
  
  #endif /* !defined(TOR_ROUTER_H) */



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


[tor-commits] [tor/release-0.4.5] Announce URL to bridge status page when starting Tor as a bridge relay.

2021-10-20 Thread ahf
commit 73727397652f933c710d701c5b2e27cbac12af49
Author: Alexander Færøy 
Date:   Mon Nov 23 23:41:17 2020 +

Announce URL to bridge status page when starting Tor as a bridge relay.

This patch makes Tor announce the relay specific bridge status page URL
when Tor is starting up before bootstrap occours.

See: tor#30477
---
 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --git a/changes/ticket30477 b/changes/ticket30477
new file mode 100644
index 00..379fc4e7eb
--- /dev/null
+++ b/changes/ticket30477
@@ -0,0 +1,4 @@
+  o Minor features (bridge):
+- We now announce the URL to Tor's new bridge status at
+  https://bridges.torproject.org/ when Tor is configured to run as a bridge
+  relay. Closes ticket 30477.
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 283f7c326b..7ea2a4e719 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -803,6 +803,25 @@ router_initialize_tls_context(void)
   (unsigned int)lifetime);
 }
 
+/** Announce URL to bridge status page. */
+STATIC void
+router_announce_bridge_status_page(void)
+{
+  char fingerprint[FINGERPRINT_LEN + 1];
+
+  if (crypto_pk_get_hashed_fingerprint(get_server_identity_key(),
+   fingerprint) < 0) {
+// LCOV_EXCL_START
+log_err(LD_GENERAL, "Unable to compute bridge fingerprint");
+return;
+// LCOV_EXCL_STOP
+  }
+
+  log_notice(LD_GENERAL, "You can check the status of your bridge relay at "
+ "https://bridges.torproject.org/status?id=%s;,
+ fingerprint);
+}
+
 /** Compute fingerprint (or hashed fingerprint if hashed is 1) and write
  * it to 'fingerprint' (or 'hashed-fingerprint'). Return 0 on success, or
  * -1 if Tor should die,
@@ -1103,6 +1122,10 @@ init_keys(void)
 return -1;
   }
 
+  /* Display URL to bridge status page. */
+  if (! public_server_mode(options))
+router_announce_bridge_status_page();
+
   if (!authdir_mode(options))
 return 0;
   /* 6. [authdirserver only] load approved-routers file */
diff --git a/src/feature/relay/router.h b/src/feature/relay/router.h
index ab1f771017..2d9ff3f8f3 100644
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@ -119,6 +119,7 @@ void router_free_all(void);
 /* Used only by router.c and test.c */
 STATIC void get_platform_str(char *platform, size_t len);
 STATIC int router_write_fingerprint(int hashed);
+STATIC void router_announce_bridge_status_page(void);
 #endif
 
 #endif /* !defined(TOR_ROUTER_H) */



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


[tor-commits] [tor/maint-0.4.6] Merge branch 'maint-0.3.5' into maint-0.4.5

2021-10-20 Thread ahf
commit 5717b88bcb88d374b7b934622f0b7bf62cdab05c
Merge: fdc7549b61 7372739765
Author: Alexander Færøy 
Date:   Wed Oct 20 21:47:17 2021 +

Merge branch 'maint-0.3.5' into maint-0.4.5

 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --cc src/feature/relay/router.c
index 2696b8633b,7ea2a4e719..0589786619
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@@ -1140,11 -1121,11 +1159,15 @@@ init_keys(void
  log_err(LD_FS, "Error writing hashed fingerprint to file");
  return -1;
}
 +  if (router_write_fingerprint(0, 1)) {
 +log_err(LD_FS, "Error writing ed25519 identity to file");
 +return -1;
 +  }
  
+   /* Display URL to bridge status page. */
+   if (! public_server_mode(options))
+ router_announce_bridge_status_page();
+ 
if (!authdir_mode(options))
  return 0;
/* 6. [authdirserver only] load approved-routers file */
diff --cc src/feature/relay/router.h
index aa03c27142,2d9ff3f8f3..9556a66e68
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@@ -125,29 -115,11 +125,30 @@@ void router_reset_warnings(void)
  void router_free_all(void);
  
  #ifdef ROUTER_PRIVATE
 -/* Used only by router.c and test.c */
 +/* Used only by router.c and the unit tests */
  STATIC void get_platform_str(char *platform, size_t len);
 -STATIC int router_write_fingerprint(int hashed);
 +STATIC int router_write_fingerprint(int hashed, int ed25519_identity);
 +STATIC smartlist_t *get_my_declared_family(const or_options_t *options);
+ STATIC void router_announce_bridge_status_page(void);
 -#endif
 +STATIC int load_stats_file(const char *filename, const char *ts_tag,
 +   time_t now, char **out);
 +
 +#ifdef TOR_UNIT_TESTS
 +extern time_t desc_clean_since;
 +extern const char *desc_dirty_reason;
 +void set_server_identity_key_digest_testing(const uint8_t *digest);
 +MOCK_DECL(STATIC const struct curve25519_keypair_t *,
 +   get_current_curve25519_keypair,(void));
 +
 +MOCK_DECL(STATIC int,
 +  router_build_fresh_unsigned_routerinfo,(routerinfo_t **ri_out));
 +STATIC extrainfo_t *router_build_fresh_signed_extrainfo(
 +  const routerinfo_t *ri);
 +STATIC void router_update_routerinfo_from_extrainfo(routerinfo_t *ri,
 +const extrainfo_t *ei);
 +STATIC int router_dump_and_sign_routerinfo_descriptor_body(routerinfo_t *ri);
 +#endif /* defined(TOR_UNIT_TESTS) */
 +
 +#endif /* defined(ROUTER_PRIVATE) */
  
  #endif /* !defined(TOR_ROUTER_H) */



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


[tor-commits] [tor/maint-0.4.5] Merge branch 'maint-0.3.5' into maint-0.4.5

2021-10-20 Thread ahf
commit 5717b88bcb88d374b7b934622f0b7bf62cdab05c
Merge: fdc7549b61 7372739765
Author: Alexander Færøy 
Date:   Wed Oct 20 21:47:17 2021 +

Merge branch 'maint-0.3.5' into maint-0.4.5

 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --cc src/feature/relay/router.c
index 2696b8633b,7ea2a4e719..0589786619
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@@ -1140,11 -1121,11 +1159,15 @@@ init_keys(void
  log_err(LD_FS, "Error writing hashed fingerprint to file");
  return -1;
}
 +  if (router_write_fingerprint(0, 1)) {
 +log_err(LD_FS, "Error writing ed25519 identity to file");
 +return -1;
 +  }
  
+   /* Display URL to bridge status page. */
+   if (! public_server_mode(options))
+ router_announce_bridge_status_page();
+ 
if (!authdir_mode(options))
  return 0;
/* 6. [authdirserver only] load approved-routers file */
diff --cc src/feature/relay/router.h
index aa03c27142,2d9ff3f8f3..9556a66e68
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@@ -125,29 -115,11 +125,30 @@@ void router_reset_warnings(void)
  void router_free_all(void);
  
  #ifdef ROUTER_PRIVATE
 -/* Used only by router.c and test.c */
 +/* Used only by router.c and the unit tests */
  STATIC void get_platform_str(char *platform, size_t len);
 -STATIC int router_write_fingerprint(int hashed);
 +STATIC int router_write_fingerprint(int hashed, int ed25519_identity);
 +STATIC smartlist_t *get_my_declared_family(const or_options_t *options);
+ STATIC void router_announce_bridge_status_page(void);
 -#endif
 +STATIC int load_stats_file(const char *filename, const char *ts_tag,
 +   time_t now, char **out);
 +
 +#ifdef TOR_UNIT_TESTS
 +extern time_t desc_clean_since;
 +extern const char *desc_dirty_reason;
 +void set_server_identity_key_digest_testing(const uint8_t *digest);
 +MOCK_DECL(STATIC const struct curve25519_keypair_t *,
 +   get_current_curve25519_keypair,(void));
 +
 +MOCK_DECL(STATIC int,
 +  router_build_fresh_unsigned_routerinfo,(routerinfo_t **ri_out));
 +STATIC extrainfo_t *router_build_fresh_signed_extrainfo(
 +  const routerinfo_t *ri);
 +STATIC void router_update_routerinfo_from_extrainfo(routerinfo_t *ri,
 +const extrainfo_t *ei);
 +STATIC int router_dump_and_sign_routerinfo_descriptor_body(routerinfo_t *ri);
 +#endif /* defined(TOR_UNIT_TESTS) */
 +
 +#endif /* defined(ROUTER_PRIVATE) */
  
  #endif /* !defined(TOR_ROUTER_H) */

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


[tor-commits] [tor/release-0.3.5] Merge branch 'maint-0.3.5' into release-0.3.5

2021-10-20 Thread ahf
commit 2a247f425556a72b9652360635638e383d06d603
Merge: 46de5eb054 7372739765
Author: Alexander Færøy 
Date:   Wed Oct 20 21:44:56 2021 +

Merge branch 'maint-0.3.5' into release-0.3.5

 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

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


[tor-commits] [tor/maint-0.4.6] Announce URL to bridge status page when starting Tor as a bridge relay.

2021-10-20 Thread ahf
commit 73727397652f933c710d701c5b2e27cbac12af49
Author: Alexander Færøy 
Date:   Mon Nov 23 23:41:17 2020 +

Announce URL to bridge status page when starting Tor as a bridge relay.

This patch makes Tor announce the relay specific bridge status page URL
when Tor is starting up before bootstrap occours.

See: tor#30477
---
 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --git a/changes/ticket30477 b/changes/ticket30477
new file mode 100644
index 00..379fc4e7eb
--- /dev/null
+++ b/changes/ticket30477
@@ -0,0 +1,4 @@
+  o Minor features (bridge):
+- We now announce the URL to Tor's new bridge status at
+  https://bridges.torproject.org/ when Tor is configured to run as a bridge
+  relay. Closes ticket 30477.
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 283f7c326b..7ea2a4e719 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -803,6 +803,25 @@ router_initialize_tls_context(void)
   (unsigned int)lifetime);
 }
 
+/** Announce URL to bridge status page. */
+STATIC void
+router_announce_bridge_status_page(void)
+{
+  char fingerprint[FINGERPRINT_LEN + 1];
+
+  if (crypto_pk_get_hashed_fingerprint(get_server_identity_key(),
+   fingerprint) < 0) {
+// LCOV_EXCL_START
+log_err(LD_GENERAL, "Unable to compute bridge fingerprint");
+return;
+// LCOV_EXCL_STOP
+  }
+
+  log_notice(LD_GENERAL, "You can check the status of your bridge relay at "
+ "https://bridges.torproject.org/status?id=%s;,
+ fingerprint);
+}
+
 /** Compute fingerprint (or hashed fingerprint if hashed is 1) and write
  * it to 'fingerprint' (or 'hashed-fingerprint'). Return 0 on success, or
  * -1 if Tor should die,
@@ -1103,6 +1122,10 @@ init_keys(void)
 return -1;
   }
 
+  /* Display URL to bridge status page. */
+  if (! public_server_mode(options))
+router_announce_bridge_status_page();
+
   if (!authdir_mode(options))
 return 0;
   /* 6. [authdirserver only] load approved-routers file */
diff --git a/src/feature/relay/router.h b/src/feature/relay/router.h
index ab1f771017..2d9ff3f8f3 100644
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@ -119,6 +119,7 @@ void router_free_all(void);
 /* Used only by router.c and test.c */
 STATIC void get_platform_str(char *platform, size_t len);
 STATIC int router_write_fingerprint(int hashed);
+STATIC void router_announce_bridge_status_page(void);
 #endif
 
 #endif /* !defined(TOR_ROUTER_H) */



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


[tor-commits] [tor/maint-0.4.5] Announce URL to bridge status page when starting Tor as a bridge relay.

2021-10-20 Thread ahf
commit 73727397652f933c710d701c5b2e27cbac12af49
Author: Alexander Færøy 
Date:   Mon Nov 23 23:41:17 2020 +

Announce URL to bridge status page when starting Tor as a bridge relay.

This patch makes Tor announce the relay specific bridge status page URL
when Tor is starting up before bootstrap occours.

See: tor#30477
---
 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --git a/changes/ticket30477 b/changes/ticket30477
new file mode 100644
index 00..379fc4e7eb
--- /dev/null
+++ b/changes/ticket30477
@@ -0,0 +1,4 @@
+  o Minor features (bridge):
+- We now announce the URL to Tor's new bridge status at
+  https://bridges.torproject.org/ when Tor is configured to run as a bridge
+  relay. Closes ticket 30477.
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 283f7c326b..7ea2a4e719 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -803,6 +803,25 @@ router_initialize_tls_context(void)
   (unsigned int)lifetime);
 }
 
+/** Announce URL to bridge status page. */
+STATIC void
+router_announce_bridge_status_page(void)
+{
+  char fingerprint[FINGERPRINT_LEN + 1];
+
+  if (crypto_pk_get_hashed_fingerprint(get_server_identity_key(),
+   fingerprint) < 0) {
+// LCOV_EXCL_START
+log_err(LD_GENERAL, "Unable to compute bridge fingerprint");
+return;
+// LCOV_EXCL_STOP
+  }
+
+  log_notice(LD_GENERAL, "You can check the status of your bridge relay at "
+ "https://bridges.torproject.org/status?id=%s;,
+ fingerprint);
+}
+
 /** Compute fingerprint (or hashed fingerprint if hashed is 1) and write
  * it to 'fingerprint' (or 'hashed-fingerprint'). Return 0 on success, or
  * -1 if Tor should die,
@@ -1103,6 +1122,10 @@ init_keys(void)
 return -1;
   }
 
+  /* Display URL to bridge status page. */
+  if (! public_server_mode(options))
+router_announce_bridge_status_page();
+
   if (!authdir_mode(options))
 return 0;
   /* 6. [authdirserver only] load approved-routers file */
diff --git a/src/feature/relay/router.h b/src/feature/relay/router.h
index ab1f771017..2d9ff3f8f3 100644
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@ -119,6 +119,7 @@ void router_free_all(void);
 /* Used only by router.c and test.c */
 STATIC void get_platform_str(char *platform, size_t len);
 STATIC int router_write_fingerprint(int hashed);
+STATIC void router_announce_bridge_status_page(void);
 #endif
 
 #endif /* !defined(TOR_ROUTER_H) */



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


[tor-commits] [tor/main] Merge branch 'maint-0.3.5' into maint-0.4.5

2021-10-20 Thread ahf
commit 5717b88bcb88d374b7b934622f0b7bf62cdab05c
Merge: fdc7549b61 7372739765
Author: Alexander Færøy 
Date:   Wed Oct 20 21:47:17 2021 +

Merge branch 'maint-0.3.5' into maint-0.4.5

 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --cc src/feature/relay/router.c
index 2696b8633b,7ea2a4e719..0589786619
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@@ -1140,11 -1121,11 +1159,15 @@@ init_keys(void
  log_err(LD_FS, "Error writing hashed fingerprint to file");
  return -1;
}
 +  if (router_write_fingerprint(0, 1)) {
 +log_err(LD_FS, "Error writing ed25519 identity to file");
 +return -1;
 +  }
  
+   /* Display URL to bridge status page. */
+   if (! public_server_mode(options))
+ router_announce_bridge_status_page();
+ 
if (!authdir_mode(options))
  return 0;
/* 6. [authdirserver only] load approved-routers file */
diff --cc src/feature/relay/router.h
index aa03c27142,2d9ff3f8f3..9556a66e68
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@@ -125,29 -115,11 +125,30 @@@ void router_reset_warnings(void)
  void router_free_all(void);
  
  #ifdef ROUTER_PRIVATE
 -/* Used only by router.c and test.c */
 +/* Used only by router.c and the unit tests */
  STATIC void get_platform_str(char *platform, size_t len);
 -STATIC int router_write_fingerprint(int hashed);
 +STATIC int router_write_fingerprint(int hashed, int ed25519_identity);
 +STATIC smartlist_t *get_my_declared_family(const or_options_t *options);
+ STATIC void router_announce_bridge_status_page(void);
 -#endif
 +STATIC int load_stats_file(const char *filename, const char *ts_tag,
 +   time_t now, char **out);
 +
 +#ifdef TOR_UNIT_TESTS
 +extern time_t desc_clean_since;
 +extern const char *desc_dirty_reason;
 +void set_server_identity_key_digest_testing(const uint8_t *digest);
 +MOCK_DECL(STATIC const struct curve25519_keypair_t *,
 +   get_current_curve25519_keypair,(void));
 +
 +MOCK_DECL(STATIC int,
 +  router_build_fresh_unsigned_routerinfo,(routerinfo_t **ri_out));
 +STATIC extrainfo_t *router_build_fresh_signed_extrainfo(
 +  const routerinfo_t *ri);
 +STATIC void router_update_routerinfo_from_extrainfo(routerinfo_t *ri,
 +const extrainfo_t *ei);
 +STATIC int router_dump_and_sign_routerinfo_descriptor_body(routerinfo_t *ri);
 +#endif /* defined(TOR_UNIT_TESTS) */
 +
 +#endif /* defined(ROUTER_PRIVATE) */
  
  #endif /* !defined(TOR_ROUTER_H) */



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


[tor-commits] [tor/main] Merge branch 'maint-0.4.5' into maint-0.4.6

2021-10-20 Thread ahf
commit 1e08efdb5891008f8180603bccf461c467275f57
Merge: 16cbbf04c4 5717b88bcb
Author: Alexander Færøy 
Date:   Wed Oct 20 21:47:26 2021 +

Merge branch 'maint-0.4.5' into maint-0.4.6

 changes/ticket30477 | 4 
 1 file changed, 4 insertions(+)



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


[tor-commits] [tor/main] Announce URL to bridge status page when starting Tor as a bridge relay.

2021-10-20 Thread ahf
commit 73727397652f933c710d701c5b2e27cbac12af49
Author: Alexander Færøy 
Date:   Mon Nov 23 23:41:17 2020 +

Announce URL to bridge status page when starting Tor as a bridge relay.

This patch makes Tor announce the relay specific bridge status page URL
when Tor is starting up before bootstrap occours.

See: tor#30477
---
 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --git a/changes/ticket30477 b/changes/ticket30477
new file mode 100644
index 00..379fc4e7eb
--- /dev/null
+++ b/changes/ticket30477
@@ -0,0 +1,4 @@
+  o Minor features (bridge):
+- We now announce the URL to Tor's new bridge status at
+  https://bridges.torproject.org/ when Tor is configured to run as a bridge
+  relay. Closes ticket 30477.
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 283f7c326b..7ea2a4e719 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -803,6 +803,25 @@ router_initialize_tls_context(void)
   (unsigned int)lifetime);
 }
 
+/** Announce URL to bridge status page. */
+STATIC void
+router_announce_bridge_status_page(void)
+{
+  char fingerprint[FINGERPRINT_LEN + 1];
+
+  if (crypto_pk_get_hashed_fingerprint(get_server_identity_key(),
+   fingerprint) < 0) {
+// LCOV_EXCL_START
+log_err(LD_GENERAL, "Unable to compute bridge fingerprint");
+return;
+// LCOV_EXCL_STOP
+  }
+
+  log_notice(LD_GENERAL, "You can check the status of your bridge relay at "
+ "https://bridges.torproject.org/status?id=%s;,
+ fingerprint);
+}
+
 /** Compute fingerprint (or hashed fingerprint if hashed is 1) and write
  * it to 'fingerprint' (or 'hashed-fingerprint'). Return 0 on success, or
  * -1 if Tor should die,
@@ -1103,6 +1122,10 @@ init_keys(void)
 return -1;
   }
 
+  /* Display URL to bridge status page. */
+  if (! public_server_mode(options))
+router_announce_bridge_status_page();
+
   if (!authdir_mode(options))
 return 0;
   /* 6. [authdirserver only] load approved-routers file */
diff --git a/src/feature/relay/router.h b/src/feature/relay/router.h
index ab1f771017..2d9ff3f8f3 100644
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@ -119,6 +119,7 @@ void router_free_all(void);
 /* Used only by router.c and test.c */
 STATIC void get_platform_str(char *platform, size_t len);
 STATIC int router_write_fingerprint(int hashed);
+STATIC void router_announce_bridge_status_page(void);
 #endif
 
 #endif /* !defined(TOR_ROUTER_H) */



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


[tor-commits] [tor/main] Merge branch 'maint-0.4.6' into main

2021-10-20 Thread ahf
commit 059ea671ed15a72b13ed0f9446cdcef648b821b7
Merge: 7c2c749d89 1e08efdb58
Author: Alexander Færøy 
Date:   Wed Oct 20 21:47:26 2021 +

Merge branch 'maint-0.4.6' into main

 changes/ticket30477 | 4 
 1 file changed, 4 insertions(+)

___
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.5] Announce URL to bridge status page when starting Tor as a bridge relay.

2021-10-20 Thread ahf
commit 73727397652f933c710d701c5b2e27cbac12af49
Author: Alexander Færøy 
Date:   Mon Nov 23 23:41:17 2020 +

Announce URL to bridge status page when starting Tor as a bridge relay.

This patch makes Tor announce the relay specific bridge status page URL
when Tor is starting up before bootstrap occours.

See: tor#30477
---
 changes/ticket30477|  4 
 src/feature/relay/router.c | 23 +++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --git a/changes/ticket30477 b/changes/ticket30477
new file mode 100644
index 00..379fc4e7eb
--- /dev/null
+++ b/changes/ticket30477
@@ -0,0 +1,4 @@
+  o Minor features (bridge):
+- We now announce the URL to Tor's new bridge status at
+  https://bridges.torproject.org/ when Tor is configured to run as a bridge
+  relay. Closes ticket 30477.
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 283f7c326b..7ea2a4e719 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -803,6 +803,25 @@ router_initialize_tls_context(void)
   (unsigned int)lifetime);
 }
 
+/** Announce URL to bridge status page. */
+STATIC void
+router_announce_bridge_status_page(void)
+{
+  char fingerprint[FINGERPRINT_LEN + 1];
+
+  if (crypto_pk_get_hashed_fingerprint(get_server_identity_key(),
+   fingerprint) < 0) {
+// LCOV_EXCL_START
+log_err(LD_GENERAL, "Unable to compute bridge fingerprint");
+return;
+// LCOV_EXCL_STOP
+  }
+
+  log_notice(LD_GENERAL, "You can check the status of your bridge relay at "
+ "https://bridges.torproject.org/status?id=%s;,
+ fingerprint);
+}
+
 /** Compute fingerprint (or hashed fingerprint if hashed is 1) and write
  * it to 'fingerprint' (or 'hashed-fingerprint'). Return 0 on success, or
  * -1 if Tor should die,
@@ -1103,6 +1122,10 @@ init_keys(void)
 return -1;
   }
 
+  /* Display URL to bridge status page. */
+  if (! public_server_mode(options))
+router_announce_bridge_status_page();
+
   if (!authdir_mode(options))
 return 0;
   /* 6. [authdirserver only] load approved-routers file */
diff --git a/src/feature/relay/router.h b/src/feature/relay/router.h
index ab1f771017..2d9ff3f8f3 100644
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@ -119,6 +119,7 @@ void router_free_all(void);
 /* Used only by router.c and test.c */
 STATIC void get_platform_str(char *platform, size_t len);
 STATIC int router_write_fingerprint(int hashed);
+STATIC void router_announce_bridge_status_page(void);
 #endif
 
 #endif /* !defined(TOR_ROUTER_H) */

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


[tor-commits] [tor/main] relay: Comment out a unused variable for now

2021-10-20 Thread dgoulet
commit 7c2c749d8987d675bfe0a74100c2da5f693037c0
Author: David Goulet 
Date:   Wed Oct 20 15:17:06 2021 -0400

relay: Comment out a unused variable for now

We keep it around until libevent is fixed, it should be used again. In
the meantime, avoid the compiler to complain of this unused variable.

https://gitlab.torproject.org/dgoulet/tor/-/jobs/43358#L1522

Signed-off-by: David Goulet 
---
 src/feature/relay/relay_metrics.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/feature/relay/relay_metrics.c 
b/src/feature/relay/relay_metrics.c
index 5f1238a5d3..0886b6ae87 100644
--- a/src/feature/relay/relay_metrics.c
+++ b/src/feature/relay/relay_metrics.c
@@ -124,6 +124,8 @@ fill_tcp_exhaustion_values(void)
   metrics_store_entry_update(sentry, rep_hist_get_n_tcp_exhaustion());
 }
 
+/* NOTE: Disable the record type label until libevent is fixed. */
+#if 0
 /** Helper array containing mapping for the name of the different DNS records
  * and their corresponding libevent values. */
 static struct dns_type {
@@ -135,6 +137,7 @@ static struct dns_type {
   { .name = "", .type = DNS_IPv6_  },
 };
 static const size_t num_dns_types = ARRAY_LENGTH(dns_types);
+#endif
 
 /** Fill function for the RELAY_METRICS_NUM_DNS_ERRORS metrics. */
 static void
@@ -166,7 +169,6 @@ fill_dns_error_values(void)
   static const size_t num_errors = ARRAY_LENGTH(errors);
 
   /* NOTE: Disable the record type label until libevent is fixed. */
-  (void) num_dns_types;
 #if 0
   for (size_t i = 0; i < num_dns_types; i++) {
 /* Dup the label because metrics_format_label() returns a pointer to a

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


[tor-commits] [tor/main] Merge branch 'tor-gitlab/mr/464_squashed' into main

2021-10-20 Thread ahf
commit bae6780e705e6a5d78e037b0d4e426b355d84ffe
Merge: a5dc1a4c85 bcc953307b
Author: Alexander Færøy 
Date:   Wed Oct 20 18:39:07 2021 +

Merge branch 'tor-gitlab/mr/464_squashed' into main

 changes/bug40400_part3  |  7 +++
 src/core/or/circuitlist.c   |  7 +++
 src/core/or/or_circuit_st.h |  5 -
 src/core/or/relay.c | 13 +++--
 src/core/or/status.c| 43 +++
 src/core/or/status.h|  3 +++
 6 files changed, 75 insertions(+), 3 deletions(-)

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


[tor-commits] [tor/main] Move "Didn't recognize cell, but circ stops here" into heartbeat.

2021-10-20 Thread ahf
commit bcc953307b571df5b640f9fbc299b93c74d3847f
Author: Nick Mathewson 
Date:   Tue Oct 19 15:16:49 2021 -0400

Move "Didn't recognize cell, but circ stops here" into heartbeat.

When we looked, this was the third most frequent message at
PROTOCOL_WARN, and doesn't actually tell us what to do about it.
Now:
 * we just log it at info
 * we log it only once per circuit
 * we report, in the heartbeat, how many times it happens, how many
   cells it happens with per circuit, and how long these circuits
   have been alive (on average).

Fixes the final part of #40400.
---
 changes/bug40400_part3  |  7 +++
 src/core/or/circuitlist.c   |  7 +++
 src/core/or/or_circuit_st.h |  5 -
 src/core/or/relay.c | 13 +++--
 src/core/or/status.c| 43 +++
 src/core/or/status.h|  3 +++
 6 files changed, 75 insertions(+), 3 deletions(-)

diff --git a/changes/bug40400_part3 b/changes/bug40400_part3
new file mode 100644
index 00..b78e800229
--- /dev/null
+++ b/changes/bug40400_part3
@@ -0,0 +1,7 @@
+  o Minor features (logging, heartbeat):
+- When a relay receives a cell that isn't encrypted properly for
+  it, but the relay is the last hop on the circuit, the relay
+  now counts how many cells of this kind it receives, on how
+  many circuits, and reports this information in the log.
+  Previously, we'd log each cell at PROTOCOL_WARN level, which
+  is far too verbose to be useful. Fixes part of ticket 40400.
diff --git a/src/core/or/circuitlist.c b/src/core/or/circuitlist.c
index 88c4159294..4dbf4d4549 100644
--- a/src/core/or/circuitlist.c
+++ b/src/core/or/circuitlist.c
@@ -64,6 +64,7 @@
 #include "core/or/circuitpadding.h"
 #include "core/or/crypt_path.h"
 #include "core/or/extendinfo.h"
+#include "core/or/status.h"
 #include "core/or/trace_probes_circuit.h"
 #include "core/mainloop/connection.h"
 #include "app/config/config.h"
@@ -2346,6 +2347,12 @@ circuit_about_to_free(circuit_t *circ)
   circuitmux_detach_circuit(or_circ->p_chan->cmux, circ);
   circuit_set_p_circid_chan(or_circ, 0, NULL);
 }
+
+if (or_circ->n_cells_discarded_at_end) {
+  time_t age = approx_time() - circ->timestamp_created.tv_sec;
+  note_circ_closed_for_unrecognized_cells(
+  age, or_circ->n_cells_discarded_at_end);
+}
   } else {
 origin_circuit_t *ocirc = TO_ORIGIN_CIRCUIT(circ);
 edge_connection_t *conn;
diff --git a/src/core/or/or_circuit_st.h b/src/core/or/or_circuit_st.h
index b8fbf9658e..11695ec301 100644
--- a/src/core/or/or_circuit_st.h
+++ b/src/core/or/or_circuit_st.h
@@ -52,6 +52,10 @@ struct or_circuit_t {
   /** Stores KH for the handshake. */
   char rend_circ_nonce[DIGEST_LEN];/* KH in tor-spec.txt */
 
+  /** Number of cells which we have discarded because of having no next hop,
+   * despite not recognizing the cell. */
+  uint32_t n_cells_discarded_at_end;
+
   /** How many more relay_early cells can we send on this circuit, according
* to the specification? */
   unsigned int remaining_relay_early_cells : 4;
@@ -93,4 +97,3 @@ struct or_circuit_t {
 };
 
 #endif /* !defined(OR_CIRCUIT_ST_H) */
-
diff --git a/src/core/or/relay.c b/src/core/or/relay.c
index a2123f991c..68fddd1ae7 100644
--- a/src/core/or/relay.c
+++ b/src/core/or/relay.c
@@ -333,8 +333,17 @@ circuit_receive_relay_cell(cell_t *cell, circuit_t *circ,
   }
   return 0;
 }
-log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
-   "Didn't recognize cell, but circ stops here! Closing circ.");
+if (BUG(CIRCUIT_IS_ORIGIN(circ))) {
+  /* Should be impossible at this point. */
+  return -END_CIRC_REASON_TORPROTOCOL;
+}
+or_circuit_t *or_circ = TO_OR_CIRCUIT(circ);
+if (++or_circ->n_cells_discarded_at_end == 1) {
+  time_t seconds_open = approx_time() - circ->timestamp_created.tv_sec;
+  log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
+ "Didn't recognize a cell, but circ stops here! Closing circuit. "
+ "It was created %ld seconds ago.", (long)seconds_open);
+}
 return -END_CIRC_REASON_TORPROTOCOL;
   }
 
diff --git a/src/core/or/status.c b/src/core/or/status.c
index 9e7ae70535..1e599aafb3 100644
--- a/src/core/or/status.c
+++ b/src/core/or/status.c
@@ -147,6 +147,32 @@ note_connection(bool inbound, int family)
   }
 }
 
+/**
+ * @name Counters for unrecognized cells
+ *
+ * Track cells that we drop because they are unrecognized and we have
+ * nobody to send them to.
+ **/
+/**@{*/
+static unsigned n_circs_closed_for_unrecognized_cells;
+static uint64_t n_unrecognized_cells_discarded;
+static uint64_t n_secs_on_circs_with_unrecognized_cells;
+/**@}*/
+
+/**
+ * Note that a circuit has closed @a n_seconds after having been created,
+ * because of one or more unrecognized cells.  Also note the number of
+ * unrecognized cells @a n_cells.
+ */
+void

[tor-commits] [torbutton/master] Merge remote-tracking branch 'richardgl/40054'

2021-10-20 Thread sysrqb
commit 71e835f00312503aad904cabc4333c8c6ee3ad67
Merge: 3ca3c49a 7d580229
Author: Matthew Finkel 
Date:   Wed Oct 20 18:34:36 2021 +

Merge remote-tracking branch 'richardgl/40054'

 chrome/skin/tor-circuit-display.css | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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


[tor-commits] [torbutton/master] Merge remote-tracking branch 'richardgl/40050'

2021-10-20 Thread sysrqb
commit 3ca3c49a3f51cf6b235d1921996e35a195b28354
Merge: c6cd7757 dbeb93b9
Author: Matthew Finkel 
Date:   Wed Oct 20 18:34:28 2021 +

Merge remote-tracking branch 'richardgl/40050'

 chrome/skin/aboutTor.css | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)




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


[tor-commits] [torbutton/master] Bug 40050: Update aboutTor.css for protonification of the onion-pattern

2021-10-20 Thread sysrqb
commit dbeb93b9ea52e312a15f083aeb1591e3ebd73754
Author: Richard Pospesel 
Date:   Mon Oct 4 20:07:09 2021 +0200

Bug 40050: Update aboutTor.css for protonification of the onion-pattern
---
 chrome/skin/aboutTor.css | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chrome/skin/aboutTor.css b/chrome/skin/aboutTor.css
index 38486241..ecc46b97 100644
--- a/chrome/skin/aboutTor.css
+++ b/chrome/skin/aboutTor.css
@@ -11,7 +11,7 @@
   --abouttor-bg-toroff-color: #A4000F;
   --onion-opacity: 0.2;
   --onion-color: #fff;
-  --onion-radius: 50px;
+  --onion-radius: 75px;
 }
 
 * {



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


[tor-commits] [torbutton/master] Bug 40054: Fix Circuit Display Spacing

2021-10-20 Thread sysrqb
commit 7d5802295c8686255edb64290bc86e5fdd68d979
Author: Richard Pospesel 
Date:   Mon Oct 11 15:55:10 2021 +0200

Bug 40054: Fix Circuit Display Spacing
---
 chrome/skin/tor-circuit-display.css | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/chrome/skin/tor-circuit-display.css 
b/chrome/skin/tor-circuit-display.css
index 5f37bb71..ce58c12b 100644
--- a/chrome/skin/tor-circuit-display.css
+++ b/chrome/skin/tor-circuit-display.css
@@ -89,7 +89,8 @@ ul#circuit-display-nodes li {
   background-position: left center;
   background-repeat: no-repeat;
   list-style: none;
-  padding-inline-start: 1.5em;
+  /* tor circuit svg are 16px wide */
+  padding-inline-start: calc(16px + 0.5em);
   white-space: nowrap;
   max-height: 32px;
   -moz-context-properties: stroke, stroke-opacity;



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


[tor-commits] [torbutton/maint-10.5] Merge remote-tracking branch 'richardgl/yec_background_maint-10.5' into maint-10.5

2021-10-20 Thread sysrqb
commit 9dfac2834e3a7daa0416ffa9cad6af265c2d0116
Merge: 598f4973 13cbcd90
Author: Matthew Finkel 
Date:   Wed Oct 20 18:31:11 2021 +

Merge remote-tracking branch 'richardgl/yec_background_maint-10.5' into 
maint-10.5

 chrome/skin/yec-activist.svg | 187 ++-
 1 file changed, 94 insertions(+), 93 deletions(-)

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


[tor-commits] [torbutton/maint-10.5] fixup! Bug 40051: Implement 2021 Year End Campaign look in about:tor

2021-10-20 Thread sysrqb
commit 13cbcd909c922e58f7316c73d3429a445c9aee80
Author: Richard Pospesel 
Date:   Wed Oct 20 17:29:33 2021 +0200

fixup! Bug 40051: Implement 2021 Year End Campaign look in about:tor
---
 chrome/skin/yec-activist.svg | 187 ++-
 1 file changed, 94 insertions(+), 93 deletions(-)

diff --git a/chrome/skin/yec-activist.svg b/chrome/skin/yec-activist.svg
index a7cc4ccd..cf874272 100644
--- a/chrome/skin/yec-activist.svg
+++ b/chrome/skin/yec-activist.svg
@@ -1,94 +1,95 @@
-
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; fill="none" height="427" viewBox="0 
0 714 427" width="714">
-  
-
-  
-
-
-  
-
-
-  
-
-
-
-  
-
-  
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-  
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
+http://www.w3.org/2000/svg; xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 



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


[tor-commits] [tor/main] Merge remote-tracking branch 'tor-gitlab/mr/466' into main

2021-10-20 Thread ahf
commit a5dc1a4c851954334905cb3864bf6e304b321a29
Merge: 2a7c0a95ee 903fb3dd62
Author: Alexander Færøy 
Date:   Wed Oct 20 17:54:27 2021 +

Merge remote-tracking branch 'tor-gitlab/mr/466' into main

 src/feature/relay/relay_metrics.c | 21 -
 1 file 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/main] relay: Avoid duplicate MetricsPort DNS error

2021-10-20 Thread ahf
commit 903fb3dd62add48fa71efc4ce554f6161dc409eb
Author: David Goulet 
Date:   Wed Oct 20 13:49:44 2021 -0400

relay: Avoid duplicate MetricsPort DNS error

We don't output per-type DNS errors anymore so avoid looping over the
DNS query type and output each errors for them. Before this commit, it
created 3x the same message because we had A,  and PTR type records.

Fix on previous commit e7abab878241592e

Signed-off-by: David Goulet 
---
 src/feature/relay/relay_metrics.c | 21 -
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/feature/relay/relay_metrics.c 
b/src/feature/relay/relay_metrics.c
index 82abe5..5f1238a5d3 100644
--- a/src/feature/relay/relay_metrics.c
+++ b/src/feature/relay/relay_metrics.c
@@ -165,25 +165,36 @@ fill_dns_error_values(void)
   };
   static const size_t num_errors = ARRAY_LENGTH(errors);
 
-  for (size_t i = 0; i < num_dns_types; i++) {
-/* NOTE: Disable the record type label until libevent is fixed. */
+  /* NOTE: Disable the record type label until libevent is fixed. */
+  (void) num_dns_types;
 #if 0
+  for (size_t i = 0; i < num_dns_types; i++) {
 /* Dup the label because metrics_format_label() returns a pointer to a
  * string on the stack and we need that label for all metrics. */
 char *record_label =
   tor_strdup(metrics_format_label("record", dns_types[i].name));
-#endif
 
 for (size_t j = 0; j < num_errors; j++) {
   sentry = metrics_store_add(the_store, rentry->type, rentry->name,
  rentry->help);
-  //metrics_store_entry_add_label(sentry, record_label);
+  metrics_store_entry_add_label(sentry, record_label);
   metrics_store_entry_add_label(sentry,
   metrics_format_label("reason", errors[j].name));
   metrics_store_entry_update(sentry,
   rep_hist_get_n_dns_error(dns_types[i].type, errors[j].key));
 }
-//tor_free(record_label);
+tor_free(record_label);
+  }
+#endif
+
+  /* Put in the DNS errors, unfortunately not per-type for now. */
+  for (size_t j = 0; j < num_errors; j++) {
+sentry = metrics_store_add(the_store, rentry->type, rentry->name,
+   rentry->help);
+metrics_store_entry_add_label(sentry,
+metrics_format_label("reason", errors[j].name));
+metrics_store_entry_update(sentry,
+rep_hist_get_n_dns_error(0, errors[j].key));
   }
 }
 



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


[tor-commits] [tor/release-0.4.6] Remove unused function: dns_randfn_() in dns.c.

2021-10-20 Thread ahf
commit 5a043825d0b208343da4864ec9e071118b83cd06
Author: Alexander Færøy 
Date:   Mon May 10 13:07:24 2021 +

Remove unused function: dns_randfn_() in dns.c.

This patch unbreaks the current build after tor!369 landed.

See: https://bugs.torproject.org/tpo/core/tor/40371
---
 src/feature/relay/dns.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 075d7d7063..49ed8bd790 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -211,14 +211,6 @@ evdns_log_cb(int warn, const char *msg)
   tor_log(severity, LD_EXIT, "eventdns: %s", msg);
 }
 
-/** Helper: passed to eventdns.c as a callback so it can generate random
- * numbers for transaction IDs and 0x20-hack coding. */
-static void
-dns_randfn_(char *b, size_t n)
-{
-  crypto_rand(b,n);
-}
-
 /** Initialize the DNS subsystem; called by the OR process. */
 int
 dns_init(void)



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


[tor-commits] [tor/release-0.4.6] Merge branch 'maint-0.3.5' into maint-0.4.5

2021-10-20 Thread ahf
commit fdc7549b61443a1ffd723c5a497b9c96c78d4a1a
Merge: d949a2f924 5a043825d0
Author: Alexander Færøy 
Date:   Wed Oct 20 17:36:06 2021 +

Merge branch 'maint-0.3.5' into maint-0.4.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 9 -
 2 files changed, 6 insertions(+), 9 deletions(-)




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


[tor-commits] [tor/release-0.4.6] Stop calling evdns_set_random_bytes_fn()

2021-10-20 Thread ahf
commit f20f5a4e376d254e069fed66a321bc9cdd537096
Author: Nick Mathewson 
Date:   Fri Apr 16 17:26:59 2021 -0400

Stop calling evdns_set_random_bytes_fn()

This function has been a no-op since Libevent 2.0.4-alpha, when
libevent got an arc4random() implementation.  Libevent has finally
removed it, which will break our compilation unless we stop calling
it.  (This is currently breaking compilation in OSS-fuzz.)

Closes #40371.
---
 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/changes/bug40371 b/changes/bug40371
new file mode 100644
index 00..8cc7117f9f
--- /dev/null
+++ b/changes/bug40371
@@ -0,0 +1,6 @@
+  o Minor bugfixes (compatibility):
+- Fix compatibility with the most recent Libevent versions, which
+  no longer have an evdns_set_random_bytes() function.  Because
+  this function has been a no-op since Libevent 2.0.4-alpha,
+  it is safe for us to just stop calling it.  Fixes bug 40371;
+  bugfix on 0.2.1.7-alpha.
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index e20a39482f..075d7d7063 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -224,7 +224,6 @@ int
 dns_init(void)
 {
   init_cache_map();
-  evdns_set_random_bytes_fn(dns_randfn_);
   if (server_mode(get_options())) {
 int r = configure_nameservers(1);
 return r;



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


[tor-commits] [tor/release-0.4.5] Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

2021-10-20 Thread ahf
commit db112329a0358a8e9138c782ee48c5e3f3d1f35d
Merge: 44e105c27f f20f5a4e37
Author: Alexander Færøy 
Date:   Wed Oct 20 17:35:35 2021 +

Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)



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


[tor-commits] [tor/release-0.4.5] Remove unused function: dns_randfn_() in dns.c.

2021-10-20 Thread ahf
commit 5a043825d0b208343da4864ec9e071118b83cd06
Author: Alexander Færøy 
Date:   Mon May 10 13:07:24 2021 +

Remove unused function: dns_randfn_() in dns.c.

This patch unbreaks the current build after tor!369 landed.

See: https://bugs.torproject.org/tpo/core/tor/40371
---
 src/feature/relay/dns.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 075d7d7063..49ed8bd790 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -211,14 +211,6 @@ evdns_log_cb(int warn, const char *msg)
   tor_log(severity, LD_EXIT, "eventdns: %s", msg);
 }
 
-/** Helper: passed to eventdns.c as a callback so it can generate random
- * numbers for transaction IDs and 0x20-hack coding. */
-static void
-dns_randfn_(char *b, size_t n)
-{
-  crypto_rand(b,n);
-}
-
 /** Initialize the DNS subsystem; called by the OR process. */
 int
 dns_init(void)



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


[tor-commits] [tor/release-0.4.6] Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

2021-10-20 Thread ahf
commit db112329a0358a8e9138c782ee48c5e3f3d1f35d
Merge: 44e105c27f f20f5a4e37
Author: Alexander Færøy 
Date:   Wed Oct 20 17:35:35 2021 +

Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)



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


[tor-commits] [tor/release-0.4.5] Stop calling evdns_set_random_bytes_fn()

2021-10-20 Thread ahf
commit f20f5a4e376d254e069fed66a321bc9cdd537096
Author: Nick Mathewson 
Date:   Fri Apr 16 17:26:59 2021 -0400

Stop calling evdns_set_random_bytes_fn()

This function has been a no-op since Libevent 2.0.4-alpha, when
libevent got an arc4random() implementation.  Libevent has finally
removed it, which will break our compilation unless we stop calling
it.  (This is currently breaking compilation in OSS-fuzz.)

Closes #40371.
---
 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/changes/bug40371 b/changes/bug40371
new file mode 100644
index 00..8cc7117f9f
--- /dev/null
+++ b/changes/bug40371
@@ -0,0 +1,6 @@
+  o Minor bugfixes (compatibility):
+- Fix compatibility with the most recent Libevent versions, which
+  no longer have an evdns_set_random_bytes() function.  Because
+  this function has been a no-op since Libevent 2.0.4-alpha,
+  it is safe for us to just stop calling it.  Fixes bug 40371;
+  bugfix on 0.2.1.7-alpha.
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index e20a39482f..075d7d7063 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -224,7 +224,6 @@ int
 dns_init(void)
 {
   init_cache_map();
-  evdns_set_random_bytes_fn(dns_randfn_);
   if (server_mode(get_options())) {
 int r = configure_nameservers(1);
 return r;



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


[tor-commits] [tor/release-0.4.6] Merge branch 'maint-0.4.6' into release-0.4.6

2021-10-20 Thread ahf
commit 6edc9bcc1376b7a9f31fc54239e9df7fdfa9d044
Merge: 07989171e3 16cbbf04c4
Author: Alexander Færøy 
Date:   Wed Oct 20 17:36:07 2021 +

Merge branch 'maint-0.4.6' into release-0.4.6

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 9 -
 2 files changed, 6 insertions(+), 9 deletions(-)

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


[tor-commits] [tor/release-0.4.5] Merge branch 'maint-0.3.5' into maint-0.4.5

2021-10-20 Thread ahf
commit fdc7549b61443a1ffd723c5a497b9c96c78d4a1a
Merge: d949a2f924 5a043825d0
Author: Alexander Færøy 
Date:   Wed Oct 20 17:36:06 2021 +

Merge branch 'maint-0.3.5' into maint-0.4.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 9 -
 2 files changed, 6 insertions(+), 9 deletions(-)




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


[tor-commits] [tor/release-0.3.5] Merge branch 'maint-0.3.5' into release-0.3.5

2021-10-20 Thread ahf
commit 46de5eb054cfdcedad0f7971d9a0defbd5e21db0
Merge: a9913435bc 5a043825d0
Author: Alexander Færøy 
Date:   Wed Oct 20 17:36:06 2021 +

Merge branch 'maint-0.3.5' into release-0.3.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 9 -
 2 files changed, 6 insertions(+), 9 deletions(-)

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


[tor-commits] [tor/release-0.4.6] Merge branch 'maint-0.4.5' into maint-0.4.6

2021-10-20 Thread ahf
commit 16cbbf04c49715d2ba94e079597aeed284a6398d
Merge: caa305a5ad fdc7549b61
Author: Alexander Færøy 
Date:   Wed Oct 20 17:36:07 2021 +

Merge branch 'maint-0.4.5' into maint-0.4.6

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 9 -
 2 files changed, 6 insertions(+), 9 deletions(-)




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


[tor-commits] [tor/release-0.4.5] Merge branch 'maint-0.4.5' into release-0.4.5

2021-10-20 Thread ahf
commit 04886b339331e0e5e9daebb2acd54dc5ffa8fb9b
Merge: d4c697b2f7 fdc7549b61
Author: Alexander Færøy 
Date:   Wed Oct 20 17:36:07 2021 +

Merge branch 'maint-0.4.5' into release-0.4.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 9 -
 2 files changed, 6 insertions(+), 9 deletions(-)

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


[tor-commits] [tor/release-0.3.5] Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

2021-10-20 Thread ahf
commit db112329a0358a8e9138c782ee48c5e3f3d1f35d
Merge: 44e105c27f f20f5a4e37
Author: Alexander Færøy 
Date:   Wed Oct 20 17:35:35 2021 +

Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)



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


[tor-commits] [tor/release-0.3.5] Remove unused function: dns_randfn_() in dns.c.

2021-10-20 Thread ahf
commit 5a043825d0b208343da4864ec9e071118b83cd06
Author: Alexander Færøy 
Date:   Mon May 10 13:07:24 2021 +

Remove unused function: dns_randfn_() in dns.c.

This patch unbreaks the current build after tor!369 landed.

See: https://bugs.torproject.org/tpo/core/tor/40371
---
 src/feature/relay/dns.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 075d7d7063..49ed8bd790 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -211,14 +211,6 @@ evdns_log_cb(int warn, const char *msg)
   tor_log(severity, LD_EXIT, "eventdns: %s", msg);
 }
 
-/** Helper: passed to eventdns.c as a callback so it can generate random
- * numbers for transaction IDs and 0x20-hack coding. */
-static void
-dns_randfn_(char *b, size_t n)
-{
-  crypto_rand(b,n);
-}
-
 /** Initialize the DNS subsystem; called by the OR process. */
 int
 dns_init(void)



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


[tor-commits] [tor/release-0.3.5] Stop calling evdns_set_random_bytes_fn()

2021-10-20 Thread ahf
commit f20f5a4e376d254e069fed66a321bc9cdd537096
Author: Nick Mathewson 
Date:   Fri Apr 16 17:26:59 2021 -0400

Stop calling evdns_set_random_bytes_fn()

This function has been a no-op since Libevent 2.0.4-alpha, when
libevent got an arc4random() implementation.  Libevent has finally
removed it, which will break our compilation unless we stop calling
it.  (This is currently breaking compilation in OSS-fuzz.)

Closes #40371.
---
 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/changes/bug40371 b/changes/bug40371
new file mode 100644
index 00..8cc7117f9f
--- /dev/null
+++ b/changes/bug40371
@@ -0,0 +1,6 @@
+  o Minor bugfixes (compatibility):
+- Fix compatibility with the most recent Libevent versions, which
+  no longer have an evdns_set_random_bytes() function.  Because
+  this function has been a no-op since Libevent 2.0.4-alpha,
+  it is safe for us to just stop calling it.  Fixes bug 40371;
+  bugfix on 0.2.1.7-alpha.
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index e20a39482f..075d7d7063 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -224,7 +224,6 @@ int
 dns_init(void)
 {
   init_cache_map();
-  evdns_set_random_bytes_fn(dns_randfn_);
   if (server_mode(get_options())) {
 int r = configure_nameservers(1);
 return r;



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


[tor-commits] [tor/maint-0.4.6] Merge branch 'maint-0.3.5' into maint-0.4.5

2021-10-20 Thread ahf
commit fdc7549b61443a1ffd723c5a497b9c96c78d4a1a
Merge: d949a2f924 5a043825d0
Author: Alexander Færøy 
Date:   Wed Oct 20 17:36:06 2021 +

Merge branch 'maint-0.3.5' into maint-0.4.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 9 -
 2 files changed, 6 insertions(+), 9 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.4.6] Merge branch 'maint-0.4.5' into maint-0.4.6

2021-10-20 Thread ahf
commit 16cbbf04c49715d2ba94e079597aeed284a6398d
Merge: caa305a5ad fdc7549b61
Author: Alexander Færøy 
Date:   Wed Oct 20 17:36:07 2021 +

Merge branch 'maint-0.4.5' into maint-0.4.6

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 9 -
 2 files changed, 6 insertions(+), 9 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.4.6] Remove unused function: dns_randfn_() in dns.c.

2021-10-20 Thread ahf
commit 5a043825d0b208343da4864ec9e071118b83cd06
Author: Alexander Færøy 
Date:   Mon May 10 13:07:24 2021 +

Remove unused function: dns_randfn_() in dns.c.

This patch unbreaks the current build after tor!369 landed.

See: https://bugs.torproject.org/tpo/core/tor/40371
---
 src/feature/relay/dns.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 075d7d7063..49ed8bd790 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -211,14 +211,6 @@ evdns_log_cb(int warn, const char *msg)
   tor_log(severity, LD_EXIT, "eventdns: %s", msg);
 }
 
-/** Helper: passed to eventdns.c as a callback so it can generate random
- * numbers for transaction IDs and 0x20-hack coding. */
-static void
-dns_randfn_(char *b, size_t n)
-{
-  crypto_rand(b,n);
-}
-
 /** Initialize the DNS subsystem; called by the OR process. */
 int
 dns_init(void)



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


[tor-commits] [tor/maint-0.4.6] Stop calling evdns_set_random_bytes_fn()

2021-10-20 Thread ahf
commit f20f5a4e376d254e069fed66a321bc9cdd537096
Author: Nick Mathewson 
Date:   Fri Apr 16 17:26:59 2021 -0400

Stop calling evdns_set_random_bytes_fn()

This function has been a no-op since Libevent 2.0.4-alpha, when
libevent got an arc4random() implementation.  Libevent has finally
removed it, which will break our compilation unless we stop calling
it.  (This is currently breaking compilation in OSS-fuzz.)

Closes #40371.
---
 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/changes/bug40371 b/changes/bug40371
new file mode 100644
index 00..8cc7117f9f
--- /dev/null
+++ b/changes/bug40371
@@ -0,0 +1,6 @@
+  o Minor bugfixes (compatibility):
+- Fix compatibility with the most recent Libevent versions, which
+  no longer have an evdns_set_random_bytes() function.  Because
+  this function has been a no-op since Libevent 2.0.4-alpha,
+  it is safe for us to just stop calling it.  Fixes bug 40371;
+  bugfix on 0.2.1.7-alpha.
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index e20a39482f..075d7d7063 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -224,7 +224,6 @@ int
 dns_init(void)
 {
   init_cache_map();
-  evdns_set_random_bytes_fn(dns_randfn_);
   if (server_mode(get_options())) {
 int r = configure_nameservers(1);
 return r;



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


[tor-commits] [tor/maint-0.4.5] Merge branch 'maint-0.3.5' into maint-0.4.5

2021-10-20 Thread ahf
commit fdc7549b61443a1ffd723c5a497b9c96c78d4a1a
Merge: d949a2f924 5a043825d0
Author: Alexander Færøy 
Date:   Wed Oct 20 17:36:06 2021 +

Merge branch 'maint-0.3.5' into maint-0.4.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 9 -
 2 files changed, 6 insertions(+), 9 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.4.6] Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

2021-10-20 Thread ahf
commit db112329a0358a8e9138c782ee48c5e3f3d1f35d
Merge: 44e105c27f f20f5a4e37
Author: Alexander Færøy 
Date:   Wed Oct 20 17:35:35 2021 +

Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)



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


[tor-commits] [tor/maint-0.4.5] Remove unused function: dns_randfn_() in dns.c.

2021-10-20 Thread ahf
commit 5a043825d0b208343da4864ec9e071118b83cd06
Author: Alexander Færøy 
Date:   Mon May 10 13:07:24 2021 +

Remove unused function: dns_randfn_() in dns.c.

This patch unbreaks the current build after tor!369 landed.

See: https://bugs.torproject.org/tpo/core/tor/40371
---
 src/feature/relay/dns.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 075d7d7063..49ed8bd790 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -211,14 +211,6 @@ evdns_log_cb(int warn, const char *msg)
   tor_log(severity, LD_EXIT, "eventdns: %s", msg);
 }
 
-/** Helper: passed to eventdns.c as a callback so it can generate random
- * numbers for transaction IDs and 0x20-hack coding. */
-static void
-dns_randfn_(char *b, size_t n)
-{
-  crypto_rand(b,n);
-}
-
 /** Initialize the DNS subsystem; called by the OR process. */
 int
 dns_init(void)



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


[tor-commits] [tor/maint-0.4.5] Stop calling evdns_set_random_bytes_fn()

2021-10-20 Thread ahf
commit f20f5a4e376d254e069fed66a321bc9cdd537096
Author: Nick Mathewson 
Date:   Fri Apr 16 17:26:59 2021 -0400

Stop calling evdns_set_random_bytes_fn()

This function has been a no-op since Libevent 2.0.4-alpha, when
libevent got an arc4random() implementation.  Libevent has finally
removed it, which will break our compilation unless we stop calling
it.  (This is currently breaking compilation in OSS-fuzz.)

Closes #40371.
---
 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/changes/bug40371 b/changes/bug40371
new file mode 100644
index 00..8cc7117f9f
--- /dev/null
+++ b/changes/bug40371
@@ -0,0 +1,6 @@
+  o Minor bugfixes (compatibility):
+- Fix compatibility with the most recent Libevent versions, which
+  no longer have an evdns_set_random_bytes() function.  Because
+  this function has been a no-op since Libevent 2.0.4-alpha,
+  it is safe for us to just stop calling it.  Fixes bug 40371;
+  bugfix on 0.2.1.7-alpha.
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index e20a39482f..075d7d7063 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -224,7 +224,6 @@ int
 dns_init(void)
 {
   init_cache_map();
-  evdns_set_random_bytes_fn(dns_randfn_);
   if (server_mode(get_options())) {
 int r = configure_nameservers(1);
 return r;



___
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.5] Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

2021-10-20 Thread ahf
commit db112329a0358a8e9138c782ee48c5e3f3d1f35d
Merge: 44e105c27f f20f5a4e37
Author: Alexander Færøy 
Date:   Wed Oct 20 17:35:35 2021 +

Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)



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


[tor-commits] [tor/maint-0.4.5] Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

2021-10-20 Thread ahf
commit db112329a0358a8e9138c782ee48c5e3f3d1f35d
Merge: 44e105c27f f20f5a4e37
Author: Alexander Færøy 
Date:   Wed Oct 20 17:35:35 2021 +

Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)



___
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.5] Remove unused function: dns_randfn_() in dns.c.

2021-10-20 Thread ahf
commit 5a043825d0b208343da4864ec9e071118b83cd06
Author: Alexander Færøy 
Date:   Mon May 10 13:07:24 2021 +

Remove unused function: dns_randfn_() in dns.c.

This patch unbreaks the current build after tor!369 landed.

See: https://bugs.torproject.org/tpo/core/tor/40371
---
 src/feature/relay/dns.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 075d7d7063..49ed8bd790 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -211,14 +211,6 @@ evdns_log_cb(int warn, const char *msg)
   tor_log(severity, LD_EXIT, "eventdns: %s", msg);
 }
 
-/** Helper: passed to eventdns.c as a callback so it can generate random
- * numbers for transaction IDs and 0x20-hack coding. */
-static void
-dns_randfn_(char *b, size_t n)
-{
-  crypto_rand(b,n);
-}
-
 /** Initialize the DNS subsystem; called by the OR process. */
 int
 dns_init(void)

___
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.5] Stop calling evdns_set_random_bytes_fn()

2021-10-20 Thread ahf
commit f20f5a4e376d254e069fed66a321bc9cdd537096
Author: Nick Mathewson 
Date:   Fri Apr 16 17:26:59 2021 -0400

Stop calling evdns_set_random_bytes_fn()

This function has been a no-op since Libevent 2.0.4-alpha, when
libevent got an arc4random() implementation.  Libevent has finally
removed it, which will break our compilation unless we stop calling
it.  (This is currently breaking compilation in OSS-fuzz.)

Closes #40371.
---
 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/changes/bug40371 b/changes/bug40371
new file mode 100644
index 00..8cc7117f9f
--- /dev/null
+++ b/changes/bug40371
@@ -0,0 +1,6 @@
+  o Minor bugfixes (compatibility):
+- Fix compatibility with the most recent Libevent versions, which
+  no longer have an evdns_set_random_bytes() function.  Because
+  this function has been a no-op since Libevent 2.0.4-alpha,
+  it is safe for us to just stop calling it.  Fixes bug 40371;
+  bugfix on 0.2.1.7-alpha.
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index e20a39482f..075d7d7063 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -224,7 +224,6 @@ int
 dns_init(void)
 {
   init_cache_map();
-  evdns_set_random_bytes_fn(dns_randfn_);
   if (server_mode(get_options())) {
 int r = configure_nameservers(1);
 return r;



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


[tor-commits] [tor/main] Merge branch 'maint-0.4.5' into maint-0.4.6

2021-10-20 Thread ahf
commit 16cbbf04c49715d2ba94e079597aeed284a6398d
Merge: caa305a5ad fdc7549b61
Author: Alexander Færøy 
Date:   Wed Oct 20 17:36:07 2021 +

Merge branch 'maint-0.4.5' into maint-0.4.6

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 9 -
 2 files changed, 6 insertions(+), 9 deletions(-)




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


[tor-commits] [tor/main] Remove unused function: dns_randfn_() in dns.c.

2021-10-20 Thread ahf
commit 5a043825d0b208343da4864ec9e071118b83cd06
Author: Alexander Færøy 
Date:   Mon May 10 13:07:24 2021 +

Remove unused function: dns_randfn_() in dns.c.

This patch unbreaks the current build after tor!369 landed.

See: https://bugs.torproject.org/tpo/core/tor/40371
---
 src/feature/relay/dns.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 075d7d7063..49ed8bd790 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -211,14 +211,6 @@ evdns_log_cb(int warn, const char *msg)
   tor_log(severity, LD_EXIT, "eventdns: %s", msg);
 }
 
-/** Helper: passed to eventdns.c as a callback so it can generate random
- * numbers for transaction IDs and 0x20-hack coding. */
-static void
-dns_randfn_(char *b, size_t n)
-{
-  crypto_rand(b,n);
-}
-
 /** Initialize the DNS subsystem; called by the OR process. */
 int
 dns_init(void)



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


[tor-commits] [tor/main] Merge branch 'maint-0.4.6' into main

2021-10-20 Thread ahf
commit 2a7c0a95eed1741b1e877579c565b4a9e810ff34
Merge: e7abab8782 16cbbf04c4
Author: Alexander Færøy 
Date:   Wed Oct 20 17:36:07 2021 +

Merge branch 'maint-0.4.6' into main

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


[tor-commits] [tor/main] Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

2021-10-20 Thread ahf
commit db112329a0358a8e9138c782ee48c5e3f3d1f35d
Merge: 44e105c27f f20f5a4e37
Author: Alexander Færøy 
Date:   Wed Oct 20 17:35:35 2021 +

Merge remote-tracking branch 'tor-gitlab/mr/369' into maint-0.3.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)



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


[tor-commits] [tor/main] Merge branch 'maint-0.3.5' into maint-0.4.5

2021-10-20 Thread ahf
commit fdc7549b61443a1ffd723c5a497b9c96c78d4a1a
Merge: d949a2f924 5a043825d0
Author: Alexander Færøy 
Date:   Wed Oct 20 17:36:06 2021 +

Merge branch 'maint-0.3.5' into maint-0.4.5

 changes/bug40371| 6 ++
 src/feature/relay/dns.c | 9 -
 2 files changed, 6 insertions(+), 9 deletions(-)




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


[tor-commits] [donate-static/staging] new gitlabci

2021-10-20 Thread emmapeel
commit f6cb46cbb0b361203a7af41ca494828cbf6fd73a
Author: emma peel 
Date:   Wed Oct 20 19:23:02 2021 +0200

new gitlabci
---
 .gitlab-ci.yml | 118 +
 1 file changed, 118 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index ..16951072
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,118 @@
+image: debian:buster-slim
+
+
+# This template should be usable on any system that's based on apt.
+# taken from tor gitlabci
+
+.apt-template:  |
+  export LC_ALL=C.UTF-8
+  echo Etc/UTC > /etc/timezone
+  mkdir -p apt-cache
+  export APT_CACHE_DIR="$(pwd)/apt-cache"
+  echo 'quiet "1";' \
+   'APT::Install-Recommends "0";' \
+   'APT::Install-Suggests "0";' \
+   'APT::Acquire::Retries "20";' \
+   'APT::Get::Assume-Yes "true";' \
+   'Dpkg::Use-Pty "0";' \
+   "Dir::Cache::Archives \"${APT_CACHE_DIR}\"; " \
+>> /etc/apt/apt.conf.d/99gitlab
+  apt-get update -qq
+  apt-get upgrade -qy
+
+variables:
+  GIT_SUBMODULE_STRATEGY: recursive
+  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
+  TRANSLATION_BRANCH: "donate-static-contentspot"
+
+
+stages:
+- build
+- test_l10n
+
+pages:
+  cache:
+key: $CI_PROJECT_PATH_SLUG.${CI_COMMIT_REF_SLUG}
+paths:
+  - packages
+  - lego
+  - apt-cache
+  - venv
+  - .cache/pip
+  - .cache/lektor/builds/
+  stage: build
+  script:
+- *apt-template
+- DEBIAN_FRONTEND=noninteractive apt-get install gettext python3-babel 
python3-pip git python3-inifile python3-dev python3-setuptools python3-openssl 
python3-cryptography i18nspector apt-utils ca-certificates -y
+- pip3 install virtualenv
+- virtualenv venv
+- source venv/bin/activate
+- pip3 install lektor
+- echo 'checking out translations'
+- rm -rf i18n
+- git clone --branch $TRANSLATION_BRANCH 
https://git.torproject.org/translation.git i18n
+- echo 'reinstall lektor plugins'
+- lektor project-info --output-path
+- lektor plugins reinstall
+- echo 'building lektor 3 more times to get translations in place'
+- lektor build --output-path public && lektor build --output-path public 
&& lektor build --output-path public
+  artifacts:
+paths:
+  - public
+  - i18n
+  rules:
+- when: always
+
+check_new_strings:
+  cache:
+key: $CI_PROJECT_PATH_SLUG.${CI_COMMIT_REF_SLUG}
+paths:
+  - packages
+  - lego
+  - apt-cache
+  - venv
+  - .cache/pip
+
+  stage: test_l10n
+  needs: [pages]
+  allow_failure: true
+  rules:
+- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
+- if: '$CI_COMMIT_BRANCH == "translations"'
+  when: never
+- changes:
+  - content/**/*.lr
+  - templates/**/*
+  script:
+- *apt-template
+- DEBIAN_FRONTEND=noninteractive apt-get install gettext git python3-dev 
python3-setuptools i18nspector python3-polib python3-requests ca-certificates 
apt-utils -y
+- git clone https://gitlab.torproject.org/tpo/community/l10n.git
+- echo 'lets see if there are any updates in the strings for translation'
+- l10n/bin/check_po_status.py $TRANSLATION_BRANCH
+  artifacts:
+paths:
+  - public
+  - i18n
+  - l10n
+
+check_l10n:
+  allow_failure: true
+  cache:
+key: $CI_PROJECT_PATH_SLUG.${CI_COMMIT_REF_SLUG}
+paths:
+  - packages
+  - lego
+  - apt-cache
+  - venv
+  - i18n
+  - .cache/pip
+  stage: test_l10n
+  needs: [pages]
+  only:
+- translations
+  script:
+- DEBIAN_FRONTEND=noninteractive apt-get install gettext i18nspector 
python3-polib ca-certificates -y
+- echo 'lets see if there are any broken links on the translations'
+- l10n/bin/check_markdown_links.py i18n/
+

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


[tor-commits] [donate-static/master] new gitlabci

2021-10-20 Thread emmapeel
commit 4b2c7e7d6e6010e1e470a10257eef1830dbda59a
Author: emma peel 
Date:   Wed Oct 20 19:23:02 2021 +0200

new gitlabci
---
 .gitlab-ci.yml | 118 +
 1 file changed, 118 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index ..16951072
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,118 @@
+image: debian:buster-slim
+
+
+# This template should be usable on any system that's based on apt.
+# taken from tor gitlabci
+
+.apt-template:  |
+  export LC_ALL=C.UTF-8
+  echo Etc/UTC > /etc/timezone
+  mkdir -p apt-cache
+  export APT_CACHE_DIR="$(pwd)/apt-cache"
+  echo 'quiet "1";' \
+   'APT::Install-Recommends "0";' \
+   'APT::Install-Suggests "0";' \
+   'APT::Acquire::Retries "20";' \
+   'APT::Get::Assume-Yes "true";' \
+   'Dpkg::Use-Pty "0";' \
+   "Dir::Cache::Archives \"${APT_CACHE_DIR}\"; " \
+>> /etc/apt/apt.conf.d/99gitlab
+  apt-get update -qq
+  apt-get upgrade -qy
+
+variables:
+  GIT_SUBMODULE_STRATEGY: recursive
+  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
+  TRANSLATION_BRANCH: "donate-static-contentspot"
+
+
+stages:
+- build
+- test_l10n
+
+pages:
+  cache:
+key: $CI_PROJECT_PATH_SLUG.${CI_COMMIT_REF_SLUG}
+paths:
+  - packages
+  - lego
+  - apt-cache
+  - venv
+  - .cache/pip
+  - .cache/lektor/builds/
+  stage: build
+  script:
+- *apt-template
+- DEBIAN_FRONTEND=noninteractive apt-get install gettext python3-babel 
python3-pip git python3-inifile python3-dev python3-setuptools python3-openssl 
python3-cryptography i18nspector apt-utils ca-certificates -y
+- pip3 install virtualenv
+- virtualenv venv
+- source venv/bin/activate
+- pip3 install lektor
+- echo 'checking out translations'
+- rm -rf i18n
+- git clone --branch $TRANSLATION_BRANCH 
https://git.torproject.org/translation.git i18n
+- echo 'reinstall lektor plugins'
+- lektor project-info --output-path
+- lektor plugins reinstall
+- echo 'building lektor 3 more times to get translations in place'
+- lektor build --output-path public && lektor build --output-path public 
&& lektor build --output-path public
+  artifacts:
+paths:
+  - public
+  - i18n
+  rules:
+- when: always
+
+check_new_strings:
+  cache:
+key: $CI_PROJECT_PATH_SLUG.${CI_COMMIT_REF_SLUG}
+paths:
+  - packages
+  - lego
+  - apt-cache
+  - venv
+  - .cache/pip
+
+  stage: test_l10n
+  needs: [pages]
+  allow_failure: true
+  rules:
+- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
+- if: '$CI_COMMIT_BRANCH == "translations"'
+  when: never
+- changes:
+  - content/**/*.lr
+  - templates/**/*
+  script:
+- *apt-template
+- DEBIAN_FRONTEND=noninteractive apt-get install gettext git python3-dev 
python3-setuptools i18nspector python3-polib python3-requests ca-certificates 
apt-utils -y
+- git clone https://gitlab.torproject.org/tpo/community/l10n.git
+- echo 'lets see if there are any updates in the strings for translation'
+- l10n/bin/check_po_status.py $TRANSLATION_BRANCH
+  artifacts:
+paths:
+  - public
+  - i18n
+  - l10n
+
+check_l10n:
+  allow_failure: true
+  cache:
+key: $CI_PROJECT_PATH_SLUG.${CI_COMMIT_REF_SLUG}
+paths:
+  - packages
+  - lego
+  - apt-cache
+  - venv
+  - i18n
+  - .cache/pip
+  stage: test_l10n
+  needs: [pages]
+  only:
+- translations
+  script:
+- DEBIAN_FRONTEND=noninteractive apt-get install gettext i18nspector 
python3-polib ca-certificates -y
+- echo 'lets see if there are any broken links on the translations'
+- l10n/bin/check_markdown_links.py i18n/
+

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


[tor-commits] [torbutton/master] fixup! Bug 40051: Implement 2021 Year End Campaign look in about:tor

2021-10-20 Thread sysrqb
commit d4604f60eb4aeadf5582c02583d7cb8c9ca8f9c1
Author: Richard Pospesel 
Date:   Wed Oct 20 17:29:33 2021 +0200

fixup! Bug 40051: Implement 2021 Year End Campaign look in about:tor
---
 chrome/skin/yec-activist.svg | 187 ++-
 1 file changed, 94 insertions(+), 93 deletions(-)

diff --git a/chrome/skin/yec-activist.svg b/chrome/skin/yec-activist.svg
index a7cc4ccd..cf874272 100644
--- a/chrome/skin/yec-activist.svg
+++ b/chrome/skin/yec-activist.svg
@@ -1,94 +1,95 @@
-
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; fill="none" height="427" viewBox="0 
0 714 427" width="714">
-  
-
-  
-
-
-  
-
-
-  
-
-
-
-  
-
-  
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-  
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
+http://www.w3.org/2000/svg; xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 



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


[tor-commits] [torbutton/master] Merge remote-tracking branch 'richardgl/yec_background'

2021-10-20 Thread sysrqb
commit c6cd775702a6e363635cafc0aed5d105380a5304
Merge: 36c26916 d4604f60
Author: Matthew Finkel 
Date:   Wed Oct 20 17:18:51 2021 +

Merge remote-tracking branch 'richardgl/yec_background'

 chrome/skin/yec-activist.svg | 187 ++-
 1 file changed, 94 insertions(+), 93 deletions(-)

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


[tor-commits] [donate-static/staging] Temporarily point lego at the yec21 branch for staging

2021-10-20 Thread kez
commit e2f3b7f775ebd1490219ba236d0918d0fe6b897d
Author: kez 
Date:   Tue Oct 19 09:18:40 2021 -0700

Temporarily point lego at the yec21 branch for staging
---
 .gitmodules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitmodules b/.gitmodules
index e8f1eb47..2b445096 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,4 +1,4 @@
 [submodule "lego"]
path = lego
-   url = https://git.torproject.org/project/web/lego.git
-   branch = master
+   url = https://gitlab.torproject.org/tpo/web/lego.git
+   branch = yec21



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


[tor-commits] [donate-static/staging] Update the opengraph description, title, and metacard

2021-10-20 Thread kez
commit 628c328b807bb973d6f7cfaa311755ba2bfb55a0
Author: kez 
Date:   Thu Oct 14 10:16:46 2021 -0700

Update the opengraph description, title, and metacard
---
 assets/static/images/donate/yec-metacard.png | Bin 0 -> 44583 bytes
 templates/meta.html  |  10 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/assets/static/images/donate/yec-metacard.png 
b/assets/static/images/donate/yec-metacard.png
new file mode 100644
index ..a97389f9
Binary files /dev/null and b/assets/static/images/donate/yec-metacard.png differ
diff --git a/templates/meta.html b/templates/meta.html
index 321462e9..efa94994 100644
--- a/templates/meta.html
+++ b/templates/meta.html
@@ -3,15 +3,15 @@
 
   
   
-  
+  
   
   
   
-  https://donate.torproject.org/static/images/donate/social-media-card.png"/>
+  
   https://donate.torproject.org/; />
-  
-  
-  https://donate.torproject.org/static/images/donate/social-media-card.png;
 />
+  
+  
+  
   
   
   



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


[tor-commits] [donate-static/staging] Merge branch 'kez-fix-footer-links-again'

2021-10-20 Thread kez
commit 0654a66fbd4df60b93c4655c9604dc3f925f6eda
Merge: e11a0007 cf0f3080
Author: gus 
Date:   Thu Jul 8 11:29:18 2021 -0300

Merge branch 'kez-fix-footer-links-again'

 templates/footer.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



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


[tor-commits] [donate-static/staging] Remove fallback.js from the footer templates

2021-10-20 Thread kez
commit a2c0504be1250b35e8d0b71c75c9680ab05f6e87
Author: kez 
Date:   Thu Sep 30 01:02:40 2021 -0700

Remove fallback.js from the footer templates

This JS file seems to be from another site. Including it breaks using
hash urls for linking to an id on a page.
---
 templates/footer-min.html | 1 -
 templates/footer.html | 1 -
 2 files changed, 2 deletions(-)

diff --git a/templates/footer-min.html b/templates/footer-min.html
index cd0a025a..01a7192a 100644
--- a/templates/footer-min.html
+++ b/templates/footer-min.html
@@ -87,6 +87,5 @@
 
 
 
-
   
 
diff --git a/templates/footer.html b/templates/footer.html
index 1a45719b..bbde66d4 100644
--- a/templates/footer.html
+++ b/templates/footer.html
@@ -114,6 +114,5 @@
   
   
   
-  
   
 



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


[tor-commits] [donate-static/staging] Change the lime color to the new #EFB149 color

2021-10-20 Thread kez
commit 42e932882fa372a015edc2e81494f1cb9a0dd4f9
Author: kez 
Date:   Thu Oct 14 10:21:27 2021 -0700

Change the lime color to the new #EFB149 color
---
 parcel/js/giving_form.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parcel/js/giving_form.jsx b/parcel/js/giving_form.jsx
index 20558aba..637671ca 100644
--- a/parcel/js/giving_form.jsx
+++ b/parcel/js/giving_form.jsx
@@ -448,7 +448,7 @@ export function _GivingForm(props) {
 
 
   
-how do you want to DONATE?
+how do you want to DONATE?
   
   
 {getPaymentOptionButtons()}



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


[tor-commits] [donate-static/staging] Fix crypto page template not displaying crypto addresses

2021-10-20 Thread kez
commit 28b9bdc99b428ba114cd21fed33ebe3bae846977
Author: kez 
Date:   Tue Jun 29 15:24:51 2021 -0400

Fix crypto page template not displaying crypto addresses
---
 content/cryptocurrency/contents.lr | 4 ++--
 models/crypto-page.ini | 9 +
 templates/cryptocurrency.html  | 1 +
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/content/cryptocurrency/contents.lr 
b/content/cryptocurrency/contents.lr
index c49fd436..8b2d10e7 100644
--- a/content/cryptocurrency/contents.lr
+++ b/content/cryptocurrency/contents.lr
@@ -1,6 +1,6 @@
-_model: donate-page
+_model: crypto-page
 ---
-_template: donate-empty.html
+_template: cryptocurrency.html
 ---
 title: Cryptocurrency
 ---
diff --git a/models/crypto-page.ini b/models/crypto-page.ini
new file mode 100644
index ..4e4d7c84
--- /dev/null
+++ b/models/crypto-page.ini
@@ -0,0 +1,9 @@
+[model]
+name = Donate Page
+label = {{ this.title }}
+inherits = donate-page
+
+[fields.body]
+label = Body
+type = html
+translate = False
\ No newline at end of file
diff --git a/templates/cryptocurrency.html b/templates/cryptocurrency.html
index 4ce90318..f9379f04 100644
--- a/templates/cryptocurrency.html
+++ b/templates/cryptocurrency.html
@@ -1,3 +1,4 @@
+{% extends "layout.html" %}
 {% block content %}
   
 



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


[tor-commits] [donate-static/staging] Enable the donate counter

2021-10-20 Thread kez
commit 0d67dd3d568bf678cff9fc977af21b5c7acfc8e8
Author: kez 
Date:   Thu Oct 14 10:16:30 2021 -0700

Enable the donate counter
---
 content/contents.lr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/content/contents.lr b/content/contents.lr
index 27fbefc5..caa94f39 100644
--- a/content/contents.lr
+++ b/content/contents.lr
@@ -96,7 +96,7 @@ header_color: black
 ---
 success_redirect_url:
 ---
-counter: no
+counter: yes
 ---
 tshirt_pack_second_shirt_options_label: Use Tor
 ---



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


[tor-commits] [translation/fenix-torbrowserstringsxml_completed] https://gitweb.torproject.org/translation.git/commit/?h=fenix-torbrowserstringsxml_completed

2021-10-20 Thread translation
commit 2ac5df6deba5a61b9b7d412a5ee70767921cdad8
Author: Translation commit bot 
Date:   Wed Oct 20 16:15:20 2021 +


https://gitweb.torproject.org/translation.git/commit/?h=fenix-torbrowserstringsxml_completed
---
 tr/torbrowser_strings.xml | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tr/torbrowser_strings.xml b/tr/torbrowser_strings.xml
index c417859a1b..79bd623ba7 100644
--- a/tr/torbrowser_strings.xml
+++ b/tr/torbrowser_strings.xml
@@ -73,4 +73,7 @@
 
 Gelişmiş gizlilik için web 
sayfalarının İngilizce sürümlerini açın
 
-
+Maske kullanın, Tor kullanın.
+İzleme salgınından 
korunun.
+Friends of Tor, bağışınız kadar 
katkıda bulunacak.
+

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


[tor-commits] [tor/main] relay: For metrics, don't report DNS errors by query type

2021-10-20 Thread dgoulet
commit e7abab878241592e262bad1bd64a14b10cc392a4
Author: David Goulet 
Date:   Wed Oct 20 10:40:56 2021 -0400

relay: For metrics, don't report DNS errors by query type

This is due to the libevent bug
https://github.com/libevent/libevent/issues/1219 that fails to return
back the DNS record type on error.

And so, the MetricsPort now only reports the errors as a global counter
and not a per record type.

Closes #40490

Signed-off-by: David Goulet 
---
 changes/ticket40490   |  5 +
 src/feature/relay/relay_metrics.c | 14 --
 src/feature/stats/rephist.c   | 18 ++
 3 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/changes/ticket40490 b/changes/ticket40490
new file mode 100644
index 00..6e9ef50b42
--- /dev/null
+++ b/changes/ticket40490
@@ -0,0 +1,5 @@
+  o Major bugfix (relay, metrics):
+- On the MetricsPort, the DNS error statistics are not reported by record
+  type ("record=...") anymore due to a libevent bug
+  (https://github.com/libevent/libevent/issues/1219). Fixes bug 40490;
+  bugfix on 0.4.7.1-alpha.
diff --git a/src/feature/relay/relay_metrics.c 
b/src/feature/relay/relay_metrics.c
index 07f89fc043..82abe5 100644
--- a/src/feature/relay/relay_metrics.c
+++ b/src/feature/relay/relay_metrics.c
@@ -166,21 +166,24 @@ fill_dns_error_values(void)
   static const size_t num_errors = ARRAY_LENGTH(errors);
 
   for (size_t i = 0; i < num_dns_types; i++) {
+/* NOTE: Disable the record type label until libevent is fixed. */
+#if 0
 /* Dup the label because metrics_format_label() returns a pointer to a
  * string on the stack and we need that label for all metrics. */
 char *record_label =
   tor_strdup(metrics_format_label("record", dns_types[i].name));
+#endif
 
 for (size_t j = 0; j < num_errors; j++) {
   sentry = metrics_store_add(the_store, rentry->type, rentry->name,
  rentry->help);
-  metrics_store_entry_add_label(sentry, record_label);
+  //metrics_store_entry_add_label(sentry, record_label);
   metrics_store_entry_add_label(sentry,
   metrics_format_label("reason", errors[j].name));
   metrics_store_entry_update(sentry,
   rep_hist_get_n_dns_error(dns_types[i].type, errors[j].key));
 }
-tor_free(record_label);
+//tor_free(record_label);
   }
 }
 
@@ -192,6 +195,8 @@ fill_dns_query_values(void)
   const relay_metrics_entry_t *rentry =
 _metrics[RELAY_METRICS_NUM_DNS];
 
+/* NOTE: Disable the record type label until libevent is fixed (#40490). */
+#if 0
   for (size_t i = 0; i < num_dns_types; i++) {
 /* Dup the label because metrics_format_label() returns a pointer to a
  * string on the stack and we need that label for all metrics. */
@@ -204,6 +209,11 @@ fill_dns_query_values(void)
rep_hist_get_n_dns_request(dns_types[i].type));
 tor_free(record_label);
   }
+#endif
+
+  sentry = metrics_store_add(the_store, rentry->type, rentry->name,
+ rentry->help);
+  metrics_store_entry_update(sentry, rep_hist_get_n_dns_request(0));
 }
 
 /** Fill function for the RELAY_METRICS_NUM_GLOBAL_RW_LIMIT metrics. */
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c
index aef12e5628..b4431f5a76 100644
--- a/src/feature/stats/rephist.c
+++ b/src/feature/stats/rephist.c
@@ -296,12 +296,29 @@ typedef struct {
   uint64_t stats_n_request;
 } dns_stats_t;
 
+/* This is disabled because of the libevent bug where on error we don't get the
+ * DNS query type back. Once it is fixed, we can re-enable this. */
+#if 0
 /** DNS statistics store for each DNS record type for which tor supports only
  * three at the moment: A, PTR and . */
 static dns_stats_t dns_A_stats;
 static dns_stats_t dns_PTR_stats;
 static dns_stats_t dns__stats;
+#endif
+
+/** DNS query statistics store. It covers all type of queries. */
+static dns_stats_t dns_all_stats;
+
+/** Return the point to the DNS statistics store. Ignore the type for now
+ * because of a libevent problem. */
+static inline dns_stats_t *
+get_dns_stats_by_type(const int type)
+{
+  (void) type;
+  return _all_stats;
+}
 
+#if 0
 /** From a libevent record type, return a pointer to the corresponding DNS
  * statistics store. NULL is returned if the type is unhandled. */
 static inline dns_stats_t *
@@ -318,6 +335,7 @@ get_dns_stats_by_type(const int type)
 return NULL;
   }
 }
+#endif
 
 /** Assess the DNS timeout errors and if we have enough to trigger a general
  * overload. */

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


[tor-commits] [tor/main] relay: Overload state on DNS timeout is now X% over Y secs

2021-10-20 Thread dgoulet
commit 7a8108ea87320da3008e65747baa43c1bbcf13c2
Author: David Goulet 
Date:   Wed Oct 20 09:59:04 2021 -0400

relay: Overload state on DNS timeout is now X% over Y secs

With this commit, we will only report a general overload state if we've
seen more than X% of DNS timeout errors over Y seconds. Previous
behavior was to report when a single timeout occured which is really too
small of a threshold.

The value X is a consensus parameters called
"overload_dns_timeout_scale_percent" which is a scaled percentage
(factor of 1000) so we can represent decimal points for X like 0.5% for
instance. Its default is 1000 which ends up being 1%.

The value Y is a consensus parameters called
"overload_dns_timeout_period_secs" which is the time period for which
will gather DNS errors and once over, we assess if that X% has been
reached ultimately triggering a general overload signal.

Closes #40491

Signed-off-by: David Goulet 
---
 changes/ticket40491  |   7 ++
 src/feature/nodelist/networkstatus.c |   2 +
 src/feature/stats/rephist.c  | 130 ++-
 src/feature/stats/rephist.h  |   2 +
 src/test/test_stats.c|  78 +
 5 files changed, 218 insertions(+), 1 deletion(-)

diff --git a/changes/ticket40491 b/changes/ticket40491
new file mode 100644
index 00..01c6c7d748
--- /dev/null
+++ b/changes/ticket40491
@@ -0,0 +1,7 @@
+  o Major bugfixes (relay, overload state):
+- Report the general overload state for DNS timeout errors only if X% of 
all
+  DNS queries over Y seconds are errors. Before that, it only took 1 
timeout
+  to report the overload state which was just too low of a threshold. The X
+  and Y values are 1% and 10 minutes respectively but they are also
+  controlled by consensus parameters. Fixes bug 40491; bugfix on
+  0.4.6.1-alpha.
diff --git a/src/feature/nodelist/networkstatus.c 
b/src/feature/nodelist/networkstatus.c
index 6867d8c98e..d57db4c415 100644
--- a/src/feature/nodelist/networkstatus.c
+++ b/src/feature/nodelist/networkstatus.c
@@ -105,6 +105,7 @@
 #include "feature/dirauth/vote_microdesc_hash_st.h"
 #include "feature/nodelist/vote_routerstatus_st.h"
 #include "feature/nodelist/routerstatus_st.h"
+#include "feature/stats/rephist.h"
 
 #ifdef HAVE_UNISTD_H
 #include 
@@ -1665,6 +1666,7 @@ notify_before_networkstatus_changes(const networkstatus_t 
*old_c,
   dos_consensus_has_changed(new_c);
   relay_consensus_has_changed(new_c);
   hs_dos_consensus_has_changed(new_c);
+  rep_hist_consensus_has_changed(new_c);
 }
 
 /* Called after a new consensus has been put in the global state. It is safe
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c
index cb3ccdc91e..aef12e5628 100644
--- a/src/feature/stats/rephist.c
+++ b/src/feature/stats/rephist.c
@@ -219,6 +219,59 @@ static uint64_t stats_n_tcp_exhaustion = 0;
 
 /* DNS statistics */
 
+/* We use a scale here so we can represent percentages with decimal points by
+ * scaling the value by this factor and so 0.5% becomes a value of 500.
+ * Default is 1% and thus min and max range is 0 to 100%. */
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_SCALE 1000.0
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_DEFAULT 1000
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_MIN 0
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_MAX 10
+
+/** Consensus parameter: indicate what fraction of DNS timeout errors over the
+ * total number of DNS requests must be reached before we trigger a general
+ * overload signal .*/
+static double overload_dns_timeout_fraction =
+   OVERLOAD_DNS_TIMEOUT_PERCENT_DEFAULT /
+   OVERLOAD_DNS_TIMEOUT_PERCENT_SCALE / 100.0;
+
+/* Number of seconds for the assessment period. Default is 10 minutes (600) and
+ * the min max range is within a 32bit value. */
+#define OVERLOAD_DNS_TIMEOUT_PERIOD_SECS_DEFAULT (10 * 60)
+#define OVERLOAD_DNS_TIMEOUT_PERIOD_SECS_MIN 0
+#define OVERLOAD_DNS_TIMEOUT_PERIOD_SECS_MAX INT32_MAX
+
+/** Consensus parameter: Period, in seconds, over which we count the number of
+ * DNS requests and timeout errors. After that period, we assess if we trigger
+ * an overload or not. */
+static int32_t overload_dns_timeout_period_secs =
+  OVERLOAD_DNS_TIMEOUT_PERIOD_SECS_DEFAULT;
+
+/** Overload DNS statistics. The information in this object is used to assess
+ * if, due to DNS errors, we should emit a general overload signal or not.
+ *
+ * NOTE: This structure is _not_ per DNS query type like the statistics below
+ * because of a libevent bug
+ * (https://github.com/libevent/libevent/issues/1219), on error, the type is
+ * not propagated up back to the user and so we need to keep our own stats for
+ * the overload signal. */
+typedef struct {
+  /** Total number of DNS request seen at an Exit. They might not all end
+   * successfully or might even be lost by tor. This counter is incremented
+   * right before the DNS request 

[tor-commits] [translation/communitytpo-contentspot] https://gitweb.torproject.org/translation.git/commit/?h=communitytpo-contentspot

2021-10-20 Thread translation
commit 27e32beadf66aaa92c979a2760b49348209fc62a
Author: Translation commit bot 
Date:   Wed Oct 20 14:45:15 2021 +


https://gitweb.torproject.org/translation.git/commit/?h=communitytpo-contentspot
---
 contents+hu.po | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contents+hu.po b/contents+hu.po
index 893b93fcbe..e93a125650 100644
--- a/contents+hu.po
+++ b/contents+hu.po
@@ -9,6 +9,7 @@
 # vargaviktor , 2021
 # Emma Peel, 2021
 # erinm, 2021
+# Aninus Partikler, 2021
 # 
 msgid ""
 msgstr ""
@@ -16,7 +17,7 @@ msgstr ""
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-10-11 07:32+CET\n"
 "PO-Revision-Date: 2019-12-11 10:50+\n"
-"Last-Translator: erinm, 2021\n"
+"Last-Translator: Aninus Partikler, 2021\n"
 "Language-Team: Hungarian (https://www.transifex.com/otf/teams/1519/hu/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -36,7 +37,7 @@ msgstr "Közösségünk az emberi jogok védelmezőiből áll 
világszerte."
 #: https//community.torproject.org/outreach/
 #: (content/outreach/contents+en.lrpage.section)
 msgid "community"
-msgstr ""
+msgstr "közösség"
 
 #: https//community.torproject.org/ (content/contents+en.lrpage.body)
 msgid "The Tor community is made up of all kinds of contributors."

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


[tor-commits] [community/master] Fix merge conflicts

2021-10-20 Thread gus
commit bdfa8de10c52bc62621053f0617d5ebc79f56764
Merge: 135fe85 8987510
Author: gus 
Date:   Wed Oct 20 10:31:23 2021 -0300

Fix merge conflicts

 .gitlab/issue_templates/bug.md   | 42 
 .gitlab/issue_templates/documentation.md | 35 ++
 .gitlab/issue_templates/feature.md   | 15 
 .gitlab/issue_templates/proposal.md  |  5 
 4 files changed, 97 insertions(+)

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


[tor-commits] [community/master] Change track url to gitlab one for when adding a new issue.

2021-10-20 Thread gus
commit 8987510f230909080c0bacc8c624c727c027f6e0
Author: Gaba 
Date:   Tue Dec 22 08:48:42 2020 -0300

Change track url to gitlab one for when adding a new issue.
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index d0d917a..0444a94 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ or browse it 
[online](http://gitweb.torproject.org/project/web/community.git).
 
 ## How to report bugs or feedback 
 
-First check if your issue wasn't already opened in 
[gitlab.torproject.org](https://gitlab.torproject.org/web/community/issues), 
then file a [trac ticket](https://trac.torproject.org/projects/tor/newticket) 
and choose the component: Webpages/Community. 
+First check if your issue wasn't already opened in 
[gitlab.torproject.org](https://gitlab.torproject.org/web/community/issues), 
then file a 
[ticket](https://gitlab.torproject.org/tpo/web/community/-/issues/new) and 
choose the component: Webpages/Community. 
 
 
 ## What is Lektor



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


[tor-commits] [community/master] Adds issue creation templates for bugs, features, proposals and documentation.

2021-10-20 Thread gus
commit fbc65456ba9d453eea1e5096c63d0a9c8b82c8dc
Author: Gaba 
Date:   Tue Dec 22 08:45:58 2020 -0300

Adds issue creation templates for bugs, features, proposals and 
documentation.
---
 .gitlab/issue_templates/bug.md   | 42 
 .gitlab/issue_templates/documentation.md | 35 ++
 .gitlab/issue_templates/feature.md   | 15 
 .gitlab/issue_templates/proposal.md  |  5 
 4 files changed, 97 insertions(+)

diff --git a/.gitlab/issue_templates/bug.md b/.gitlab/issue_templates/bug.md
new file mode 100644
index 000..d27dea5
--- /dev/null
+++ b/.gitlab/issue_templates/bug.md
@@ -0,0 +1,42 @@
+
+
+### Summary
+
+
+
+### Steps to reproduce:
+
+1. step 1
+2. step 2
+3. ...
+
+### What is the current bug behavior?
+
+
+
+### What is the expected behavior?
+
+
+
+### Environment
+
+
+
+- Version: e.g. 0.10, output of --version (without backslashes)
+- Operating system: Debian GNU/Linux 9.1 (stretch), Windows 7, Ubuntu Xenial, 
etc
+- Install method: distribution package, from source tarball, from git, etc
+- etc...
+
+### Relevant logs and/or screenshots:
+
+
+
+### Possible fixes:
+
+
+
+/label ~bug
diff --git a/.gitlab/issue_templates/documentation.md 
b/.gitlab/issue_templates/documentation.md
new file mode 100644
index 000..6f0d4b4
--- /dev/null
+++ b/.gitlab/issue_templates/documentation.md
@@ -0,0 +1,35 @@
+
+
+### Problem to solve
+
+
+
+* What feature(s) affected?
+* What docs or doc section affected? Include links or paths.
+* Is there a problem with a specific document, or a feature/process that's not 
addressed sufficiently in docs?
+* Any other ideas or requests?
+
+
+### Further details
+
+
+
+### Proposal
+
+
+
+### Who can address the issue
+
+
+
+### Other links/references
+
+
+
+/label ~documentation
diff --git a/.gitlab/issue_templates/feature.md 
b/.gitlab/issue_templates/feature.md
new file mode 100644
index 000..f0c3f1b
--- /dev/null
+++ b/.gitlab/issue_templates/feature.md
@@ -0,0 +1,15 @@
+
+
+### Summary
+
+
+
+### What is the expected behavior?
+
+
+
+
+
+/label ~Feature
diff --git a/.gitlab/issue_templates/proposal.md 
b/.gitlab/issue_templates/proposal.md
new file mode 100644
index 000..990ca70
--- /dev/null
+++ b/.gitlab/issue_templates/proposal.md
@@ -0,0 +1,5 @@
+
+
+### Proposal
+
+



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


[tor-commits] [community/master] i #233: Update NYTimes onion

2021-10-20 Thread emmapeel
commit 135fe85b056d863bb4567b61864c476a7134aaa7
Author: HackerNCoder 
Date:   Sat Oct 16 17:25:39 2021 +

i #233: Update NYTimes onion
closes: https://gitlab.torproject.org/tpo/web/community/-/issues/233
---
 databags/onions.ini | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/databags/onions.ini b/databags/onions.ini
index 5f1470b..d00380f 100644
--- a/databags/onions.ini
+++ b/databags/onions.ini
@@ -4,7 +4,7 @@ image = /static/images/onions/png/propublica.png
 label = ProPublica
 
 [nytimes]
-link = https://www.nytimes3xbfgragh.onion
+link = 
https://www.nytimesn7cgmftshazwhfgzm37qxb44r64ytbb2dj3x62d2lljsciiyd.onion
 image = /static/images/onions/png/nytimes.png
 label = The New York Times
 

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


[tor-commits] [tpo/master] Fix #239

2021-10-20 Thread gus
commit 775f4cb65208f1a50ed1963f77103ea3c6bf2c2c
Author: gus 
Date:   Wed Oct 20 10:22:11 2021 -0300

Fix #239
---
 templates/press.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/press.html b/templates/press.html
index 2ea49a82..5a07e169 100644
--- a/templates/press.html
+++ b/templates/press.html
@@ -9,7 +9,7 @@
 https://support.torproject.org/; 
title="Tor Project Support Portal" target="_blank">{{ _('Visit our Support 
Portal') }}
   
   
-https://webchat.oftc.net/; title="Tor 
Project IRC" target="_blank">{{ _('Ask us on #tor') }}
+https://webchat.oftc.net/?channels=tor; title="Tor Project IRC" 
target="_blank">{{ _('Ask us on #tor') }}
   
   
 http://lists.torproject.org/; 
title="Tor Project Mailing List" target="_blank">{{ _('Write to a mailing 
list') }}

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


[tor-commits] [tor/release-0.4.6] Merge branch 'maint-0.4.6' into release-0.4.6

2021-10-20 Thread dgoulet
commit 07989171e3fead146911e63f24c2dfcabe39c660
Merge: 5112b6cd4f caa305a5ad
Author: David Goulet 
Date:   Wed Oct 20 09:17:06 2021 -0400

Merge branch 'maint-0.4.6' into release-0.4.6

 changes/ticket40476  |  11 +--
 changes/ticket40491  |   7 ++
 src/core/or/connection_edge.c|  28 +++-
 src/feature/dircache/dircache.c  |   2 -
 src/feature/nodelist/networkstatus.c |   2 +
 src/feature/relay/dns.c  |  14 ++--
 src/feature/stats/rephist.c  | 133 +++
 src/feature/stats/rephist.h  |   3 +
 src/test/test_hs_common.c|  10 +--
 src/test/test_stats.c|  78 
 10 files changed, 263 insertions(+), 25 deletions(-)

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


[tor-commits] [tor/release-0.4.6] relay: Overload state on DNS timeout is now X% over Y secs

2021-10-20 Thread dgoulet
commit de907893befdb2bf6bb0b95b183cc1f01b8a464c
Author: David Goulet 
Date:   Tue Oct 19 14:13:33 2021 -0400

relay: Overload state on DNS timeout is now X% over Y secs

With this commit, we will only report a general overload state if we've
seen more than X% of DNS timeout errors over Y seconds. Previous
behavior was to report when a single timeout occured which is really too
small of a threshold.

The value X is a consensus parameters called
"overload_dns_timeout_scale_percent" which is a scaled percentage
(factor of 1000) so we can represent decimal points for X like 0.5% for
instance. Its default is 1000 which ends up being 1%.

The value Y is a consensus parameters called
"overload_dns_timeout_period_secs" which is the time period for which
will gather DNS errors and once over, we assess if that X% has been
reached ultimately triggering a general overload signal.

Closes #40491

Signed-off-by: David Goulet 
---
 src/feature/nodelist/networkstatus.c |   2 +
 src/feature/relay/dns.c  |  14 ++--
 src/feature/stats/rephist.c  | 133 +++
 src/feature/stats/rephist.h  |   3 +
 4 files changed, 142 insertions(+), 10 deletions(-)

diff --git a/src/feature/nodelist/networkstatus.c 
b/src/feature/nodelist/networkstatus.c
index 2ffa6da1a3..af808a6ba7 100644
--- a/src/feature/nodelist/networkstatus.c
+++ b/src/feature/nodelist/networkstatus.c
@@ -103,6 +103,7 @@
 #include "feature/dirauth/vote_microdesc_hash_st.h"
 #include "feature/nodelist/vote_routerstatus_st.h"
 #include "feature/nodelist/routerstatus_st.h"
+#include "feature/stats/rephist.h"
 
 #ifdef HAVE_UNISTD_H
 #include 
@@ -1663,6 +1664,7 @@ notify_before_networkstatus_changes(const networkstatus_t 
*old_c,
   dos_consensus_has_changed(new_c);
   relay_consensus_has_changed(new_c);
   hs_dos_consensus_has_changed(new_c);
+  rep_hist_consensus_has_changed(new_c);
 }
 
 /* Called after a new consensus has been put in the global state. It is safe
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 22f929808e..ed8d235e92 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -1548,16 +1548,6 @@ evdns_callback(int result, char type, int count, int 
ttl, void *addresses,
 
   tor_addr_make_unspec();
 
-  /* Note down any DNS errors to the statistics module */
-  if (result == DNS_ERR_TIMEOUT) {
-/* libevent timed out while resolving a name. However, because libevent
- * handles retries and timeouts internally, this means that all attempts of
- * libevent timed out. If we wanted to get more granular information about
- * individual libevent attempts, we would have to implement our own DNS
- * timeout/retry logic */
-rep_hist_note_overload(OVERLOAD_GENERAL);
-  }
-
   /* Keep track of whether IPv6 is working */
   if (type == DNS_IPv6_) {
 if (result == DNS_ERR_TIMEOUT) {
@@ -1659,6 +1649,10 @@ evdns_callback(int result, char type, int count, int 
ttl, void *addresses,
 dns_found_answer(string_address, orig_query_type,
  result, , hostname, ttl);
 
+  /* The result can be changed within this function thus why we note the result
+   * at the end. */
+  rep_hist_note_dns_query(type, result);
+
   tor_free(arg_);
 }
 
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c
index e25c01331d..c3a281a8c2 100644
--- a/src/feature/stats/rephist.c
+++ b/src/feature/stats/rephist.c
@@ -84,6 +84,8 @@
 #include "feature/nodelist/networkstatus_st.h"
 #include "core/or/or_circuit_st.h"
 
+#include 
+
 #ifdef HAVE_FCNTL_H
 #include 
 #endif
@@ -204,6 +206,54 @@ typedef struct {
   uint64_t overload_fd_exhausted;
 } overload_stats_t;
 
+/* DNS statistics */
+
+/** Represents the statistics of DNS queries seen if it is an Exit. */
+typedef struct {
+  /** Total number of DNS request seen at an Exit. They might not all end
+   * successfully or might even be lost by tor. This counter is incremented
+   * right before the DNS request is initiated. */
+  uint64_t stats_n_request;
+
+  /** Total number of DNS timeout errors. */
+  uint64_t stats_n_error_timeout;
+
+  /** When is the next assessment time of the general overload for DNS errors.
+   * Once this time is reached, all stats are reset and this time is set to the
+   * next assessment time. */
+  time_t next_assessment_time;
+} overload_dns_stats_t;
+
+/** Keep track of the DNS requests for the general overload state. */
+static overload_dns_stats_t overload_dns_stats;
+
+/* We use a scale here so we can represent percentages with decimal points by
+ * scaling the value by this factor and so 0.5% becomes a value of 500.
+ * Default is 1% and thus min and max range is 0 to 100%. */
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_SCALE 1000.0
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_DEFAULT 1000
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_MIN 0
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_MAX 10
+

[tor-commits] [tor/release-0.4.6] changes: Add file for ticket 40491

2021-10-20 Thread dgoulet
commit caa305a5adec8a0a50006d1bed3e6b019e016dd4
Author: David Goulet 
Date:   Wed Oct 20 09:15:51 2021 -0400

changes: Add file for ticket 40491

Signed-off-by: David Goulet 
---
 changes/ticket40491 | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/changes/ticket40491 b/changes/ticket40491
new file mode 100644
index 00..01c6c7d748
--- /dev/null
+++ b/changes/ticket40491
@@ -0,0 +1,7 @@
+  o Major bugfixes (relay, overload state):
+- Report the general overload state for DNS timeout errors only if X% of 
all
+  DNS queries over Y seconds are errors. Before that, it only took 1 
timeout
+  to report the overload state which was just too low of a threshold. The X
+  and Y values are 1% and 10 minutes respectively but they are also
+  controlled by consensus parameters. Fixes bug 40491; bugfix on
+  0.4.6.1-alpha.



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


[tor-commits] [tor/release-0.4.6] test: Add unit tests for DNS timeout overload state

2021-10-20 Thread dgoulet
commit 996409c9c4691fbb6cccaba11ceb84c1a5ef7906
Author: David Goulet 
Date:   Tue Oct 19 15:07:11 2021 -0400

test: Add unit tests for DNS timeout overload state

Signed-off-by: David Goulet 
---
 src/test/test_stats.c | 78 +++
 1 file changed, 78 insertions(+)

diff --git a/src/test/test_stats.c b/src/test/test_stats.c
index 081ae22cd5..3b9a192c75 100644
--- a/src/test/test_stats.c
+++ b/src/test/test_stats.c
@@ -51,6 +51,8 @@
 #include "feature/stats/bw_array_st.h"
 #include "feature/relay/router.h"
 
+#include "event2/dns.h"
+
 /** Run unit tests for some stats code. */
 static void
 test_stats(void *arg)
@@ -865,6 +867,81 @@ test_overload_stats(void *arg)
   tor_free(stats_str);
 }
 
+/** Test the overload stats logic. */
+static void
+test_overload_dns_timeout(void *arg)
+{
+  char *stats_str = NULL;
+  (void) arg;
+
+  /* Lets simulate a series of timeouts but below our default 1% threshold. */
+
+  for (int i = 0; i < 1000; i++) {
+/* This should trigger 9 timeouts which is just below 1% (10) */
+if (i > 0 && !(i % 100)) {
+  rep_hist_note_dns_query(0, DNS_ERR_TIMEOUT);
+} else {
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+}
+  }
+
+  /* No overload yet. */
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(!stats_str);
+
+  /* Move it 10 minutes in the future and see if we get a general overload. */
+  update_approx_time(approx_time() + (10 * 60));
+
+  /* This query should NOT trigger the general overload because we are below
+   * our default of 1%. */
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(!stats_str);
+
+  /* We'll now go above our 1% threshold. */
+  for (int i = 0; i < 1000; i++) {
+/* This should trigger 10 timeouts which is our threshold of 1% (10) */
+if (!(i % 10)) {
+  rep_hist_note_dns_query(0, DNS_ERR_TIMEOUT);
+} else {
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+}
+  }
+
+  /* Move it 10 minutes in the future and see if we get a general overload. */
+  update_approx_time(approx_time() + (10 * 60));
+
+  /* This query should trigger the general overload because we are above 1%. */
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(stats_str);
+  tor_free(stats_str);
+
+  /* Move 72h in the future, we should NOT get an overload anymore. */
+  update_approx_time(approx_time() + (72 * 3600));
+
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(!stats_str);
+
+  /* This query should NOT trigger the general overload. */
+  rep_hist_note_dns_query(0, DNS_ERR_TIMEOUT);
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(!stats_str);
+
+  /* Move it 10 minutes in the future and see if we get a general overload. We
+   * have now 100% of requests timing out. */
+  update_approx_time(approx_time() + (10 * 60));
+
+  /* This query should trigger the general overload with 50% of timeouts. */
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(stats_str);
+  tor_free(stats_str);
+
+ done:
+  tor_free(stats_str);
+}
+
 #define ENT(name)   \
   { #name, test_ ## name , 0, NULL, NULL }
 #define FORK(name)  \
@@ -881,6 +958,7 @@ struct testcase_t stats_tests[] = {
   FORK(rephist_v3_onions),
   FORK(load_stats_file),
   FORK(overload_stats),
+  FORK(overload_dns_timeout),
 
   END_OF_TESTCASES
 };



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


[tor-commits] [tor/maint-0.4.6] changes: Add file for ticket 40491

2021-10-20 Thread dgoulet
commit caa305a5adec8a0a50006d1bed3e6b019e016dd4
Author: David Goulet 
Date:   Wed Oct 20 09:15:51 2021 -0400

changes: Add file for ticket 40491

Signed-off-by: David Goulet 
---
 changes/ticket40491 | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/changes/ticket40491 b/changes/ticket40491
new file mode 100644
index 00..01c6c7d748
--- /dev/null
+++ b/changes/ticket40491
@@ -0,0 +1,7 @@
+  o Major bugfixes (relay, overload state):
+- Report the general overload state for DNS timeout errors only if X% of 
all
+  DNS queries over Y seconds are errors. Before that, it only took 1 
timeout
+  to report the overload state which was just too low of a threshold. The X
+  and Y values are 1% and 10 minutes respectively but they are also
+  controlled by consensus parameters. Fixes bug 40491; bugfix on
+  0.4.6.1-alpha.

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


[tor-commits] [tor/release-0.4.6] hs: Fix merge conflicts after merging forward 40476

2021-10-20 Thread dgoulet
commit af48f5736aec6ae67b52bc26e3cbb74d47dd8db1
Author: David Goulet 
Date:   Tue Oct 19 10:55:29 2021 -0400

hs: Fix merge conflicts after merging forward 40476

Signed-off-by: David Goulet 
---
 changes/ticket40476 | 11 +++
 src/core/or/connection_edge.c   | 28 +++-
 src/feature/dircache/dircache.c |  2 --
 src/test/test_hs_common.c   | 10 ++
 4 files changed, 36 insertions(+), 15 deletions(-)

diff --git a/changes/ticket40476 b/changes/ticket40476
index 062e36f9bc..86e4377a1c 100644
--- a/changes/ticket40476
+++ b/changes/ticket40476
@@ -1,8 +1,3 @@
-  o Major feature (onion service v2):
-- Tor does NOT allow anymore to create v2 services, to connect as a client
-  to a v2 service and for a relay to be a v2 HSDir or introduction point.
-  This effectively disable onion service version 2 tor wide. Closes 40476.
-- The control port command HSFETCH and HSPOST don't allow version 2 as 
well.
-  It is also not possible to create a v2 service with ADD_ONION.
-- See https://blog.torproject.org/v2-deprecation-timeline for details on
-  how to transition from v2 to v3.
+  o Minor bugfix (onion service):
+- Improve logging when a bad HS version is given. Fixes bug 40476; bugfix 
on
+  0.4.6.1-alpha.
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index 60a2f88ccb..d3979b3a7e 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -1612,6 +1612,23 @@ consider_plaintext_ports(entry_connection_t *conn, 
uint16_t port)
   return 0;
 }
 
+/** Return true iff query is a syntactically valid service ID (as
+ * generated by rend_get_service_id).  */
+static int
+rend_valid_v2_service_id(const char *query)
+{
+  /** Length of 'y' portion of 'y.onion' URL. */
+#define REND_SERVICE_ID_LEN_BASE32 16
+
+  if (strlen(query) != REND_SERVICE_ID_LEN_BASE32)
+return 0;
+
+  if (strspn(query, BASE32_CHARS) != REND_SERVICE_ID_LEN_BASE32)
+return 0;
+
+  return 1;
+}
+
 /** Parse the given hostname in address. Returns true if the parsing was
  * successful and type_out contains the type of the hostname. Else, false is
  * returned which means it was not recognized and type_out is set to
@@ -1675,6 +1692,14 @@ parse_extended_hostname(char *address, hostname_type_t 
*type_out)
   if (q != address) {
 memmove(address, q, strlen(q) + 1 /* also get \0 */);
   }
+  /* v2 onion address check. */
+  if (strlen(query) == REND_SERVICE_ID_LEN_BASE32) {
+*type_out = ONION_V2_HOSTNAME;
+if (rend_valid_v2_service_id(query)) {
+  goto success;
+}
+goto failed;
+  }
 
   /* v3 onion address check. */
   if (strlen(query) == HS_SERVICE_ADDR_LEN_BASE32) {
@@ -1694,7 +1719,8 @@ parse_extended_hostname(char *address, hostname_type_t 
*type_out)
  failed:
   /* otherwise, return to previous state and return 0 */
   *s = '.';
-  const bool is_onion = (*type_out == ONION_V3_HOSTNAME);
+  const bool is_onion = (*type_out == ONION_V2_HOSTNAME) ||
+(*type_out == ONION_V3_HOSTNAME);
   log_warn(LD_APP, "Invalid %shostname %s; rejecting",
is_onion ? "onion " : "",
safe_str_client(address));
diff --git a/src/feature/dircache/dircache.c b/src/feature/dircache/dircache.c
index 7319b96caf..7fdb1bc70f 100644
--- a/src/feature/dircache/dircache.c
+++ b/src/feature/dircache/dircache.c
@@ -1569,8 +1569,6 @@ directory_handle_command_post,(dir_connection_t *conn, 
const char *headers,
   char *url = NULL;
   const or_options_t *options = get_options();
 
-  (void) body_len;
-
   log_debug(LD_DIRSERV,"Received POST command.");
 
   conn->base_.state = DIR_CONN_STATE_SERVER_WRITING;
diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c
index 347a5b7174..7cb6a36f8e 100644
--- a/src/test/test_hs_common.c
+++ b/src/test/test_hs_common.c
@@ -808,11 +808,13 @@ test_parse_extended_hostname(void *arg)
   tt_assert(parse_extended_hostname(address4, ));
   tt_int_op(type, OP_EQ, NORMAL_HOSTNAME);
 
-  tt_assert(!parse_extended_hostname(address5, ));
-  tt_int_op(type, OP_EQ, BAD_HOSTNAME);
+  tt_assert(parse_extended_hostname(address5, ));
+  tt_int_op(type, OP_EQ, ONION_V2_HOSTNAME);
+  tt_str_op(address5, OP_EQ, "abcdefghijklmnop");
 
-  tt_assert(!parse_extended_hostname(address6, ));
-  tt_int_op(type, OP_EQ, BAD_HOSTNAME);
+  tt_assert(parse_extended_hostname(address6, ));
+  tt_int_op(type, OP_EQ, ONION_V2_HOSTNAME);
+  tt_str_op(address6, OP_EQ, "abcdefghijklmnop");
 
   tt_assert(!parse_extended_hostname(address7, ));
   tt_int_op(type, OP_EQ, BAD_HOSTNAME);



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


[tor-commits] [tor/maint-0.4.6] test: Add unit tests for DNS timeout overload state

2021-10-20 Thread dgoulet
commit 996409c9c4691fbb6cccaba11ceb84c1a5ef7906
Author: David Goulet 
Date:   Tue Oct 19 15:07:11 2021 -0400

test: Add unit tests for DNS timeout overload state

Signed-off-by: David Goulet 
---
 src/test/test_stats.c | 78 +++
 1 file changed, 78 insertions(+)

diff --git a/src/test/test_stats.c b/src/test/test_stats.c
index 081ae22cd5..3b9a192c75 100644
--- a/src/test/test_stats.c
+++ b/src/test/test_stats.c
@@ -51,6 +51,8 @@
 #include "feature/stats/bw_array_st.h"
 #include "feature/relay/router.h"
 
+#include "event2/dns.h"
+
 /** Run unit tests for some stats code. */
 static void
 test_stats(void *arg)
@@ -865,6 +867,81 @@ test_overload_stats(void *arg)
   tor_free(stats_str);
 }
 
+/** Test the overload stats logic. */
+static void
+test_overload_dns_timeout(void *arg)
+{
+  char *stats_str = NULL;
+  (void) arg;
+
+  /* Lets simulate a series of timeouts but below our default 1% threshold. */
+
+  for (int i = 0; i < 1000; i++) {
+/* This should trigger 9 timeouts which is just below 1% (10) */
+if (i > 0 && !(i % 100)) {
+  rep_hist_note_dns_query(0, DNS_ERR_TIMEOUT);
+} else {
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+}
+  }
+
+  /* No overload yet. */
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(!stats_str);
+
+  /* Move it 10 minutes in the future and see if we get a general overload. */
+  update_approx_time(approx_time() + (10 * 60));
+
+  /* This query should NOT trigger the general overload because we are below
+   * our default of 1%. */
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(!stats_str);
+
+  /* We'll now go above our 1% threshold. */
+  for (int i = 0; i < 1000; i++) {
+/* This should trigger 10 timeouts which is our threshold of 1% (10) */
+if (!(i % 10)) {
+  rep_hist_note_dns_query(0, DNS_ERR_TIMEOUT);
+} else {
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+}
+  }
+
+  /* Move it 10 minutes in the future and see if we get a general overload. */
+  update_approx_time(approx_time() + (10 * 60));
+
+  /* This query should trigger the general overload because we are above 1%. */
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(stats_str);
+  tor_free(stats_str);
+
+  /* Move 72h in the future, we should NOT get an overload anymore. */
+  update_approx_time(approx_time() + (72 * 3600));
+
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(!stats_str);
+
+  /* This query should NOT trigger the general overload. */
+  rep_hist_note_dns_query(0, DNS_ERR_TIMEOUT);
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(!stats_str);
+
+  /* Move it 10 minutes in the future and see if we get a general overload. We
+   * have now 100% of requests timing out. */
+  update_approx_time(approx_time() + (10 * 60));
+
+  /* This query should trigger the general overload with 50% of timeouts. */
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(stats_str);
+  tor_free(stats_str);
+
+ done:
+  tor_free(stats_str);
+}
+
 #define ENT(name)   \
   { #name, test_ ## name , 0, NULL, NULL }
 #define FORK(name)  \
@@ -881,6 +958,7 @@ struct testcase_t stats_tests[] = {
   FORK(rephist_v3_onions),
   FORK(load_stats_file),
   FORK(overload_stats),
+  FORK(overload_dns_timeout),
 
   END_OF_TESTCASES
 };



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


[tor-commits] [tor/maint-0.4.6] relay: Overload state on DNS timeout is now X% over Y secs

2021-10-20 Thread dgoulet
commit de907893befdb2bf6bb0b95b183cc1f01b8a464c
Author: David Goulet 
Date:   Tue Oct 19 14:13:33 2021 -0400

relay: Overload state on DNS timeout is now X% over Y secs

With this commit, we will only report a general overload state if we've
seen more than X% of DNS timeout errors over Y seconds. Previous
behavior was to report when a single timeout occured which is really too
small of a threshold.

The value X is a consensus parameters called
"overload_dns_timeout_scale_percent" which is a scaled percentage
(factor of 1000) so we can represent decimal points for X like 0.5% for
instance. Its default is 1000 which ends up being 1%.

The value Y is a consensus parameters called
"overload_dns_timeout_period_secs" which is the time period for which
will gather DNS errors and once over, we assess if that X% has been
reached ultimately triggering a general overload signal.

Closes #40491

Signed-off-by: David Goulet 
---
 src/feature/nodelist/networkstatus.c |   2 +
 src/feature/relay/dns.c  |  14 ++--
 src/feature/stats/rephist.c  | 133 +++
 src/feature/stats/rephist.h  |   3 +
 4 files changed, 142 insertions(+), 10 deletions(-)

diff --git a/src/feature/nodelist/networkstatus.c 
b/src/feature/nodelist/networkstatus.c
index 2ffa6da1a3..af808a6ba7 100644
--- a/src/feature/nodelist/networkstatus.c
+++ b/src/feature/nodelist/networkstatus.c
@@ -103,6 +103,7 @@
 #include "feature/dirauth/vote_microdesc_hash_st.h"
 #include "feature/nodelist/vote_routerstatus_st.h"
 #include "feature/nodelist/routerstatus_st.h"
+#include "feature/stats/rephist.h"
 
 #ifdef HAVE_UNISTD_H
 #include 
@@ -1663,6 +1664,7 @@ notify_before_networkstatus_changes(const networkstatus_t 
*old_c,
   dos_consensus_has_changed(new_c);
   relay_consensus_has_changed(new_c);
   hs_dos_consensus_has_changed(new_c);
+  rep_hist_consensus_has_changed(new_c);
 }
 
 /* Called after a new consensus has been put in the global state. It is safe
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 22f929808e..ed8d235e92 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -1548,16 +1548,6 @@ evdns_callback(int result, char type, int count, int 
ttl, void *addresses,
 
   tor_addr_make_unspec();
 
-  /* Note down any DNS errors to the statistics module */
-  if (result == DNS_ERR_TIMEOUT) {
-/* libevent timed out while resolving a name. However, because libevent
- * handles retries and timeouts internally, this means that all attempts of
- * libevent timed out. If we wanted to get more granular information about
- * individual libevent attempts, we would have to implement our own DNS
- * timeout/retry logic */
-rep_hist_note_overload(OVERLOAD_GENERAL);
-  }
-
   /* Keep track of whether IPv6 is working */
   if (type == DNS_IPv6_) {
 if (result == DNS_ERR_TIMEOUT) {
@@ -1659,6 +1649,10 @@ evdns_callback(int result, char type, int count, int 
ttl, void *addresses,
 dns_found_answer(string_address, orig_query_type,
  result, , hostname, ttl);
 
+  /* The result can be changed within this function thus why we note the result
+   * at the end. */
+  rep_hist_note_dns_query(type, result);
+
   tor_free(arg_);
 }
 
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c
index e25c01331d..c3a281a8c2 100644
--- a/src/feature/stats/rephist.c
+++ b/src/feature/stats/rephist.c
@@ -84,6 +84,8 @@
 #include "feature/nodelist/networkstatus_st.h"
 #include "core/or/or_circuit_st.h"
 
+#include 
+
 #ifdef HAVE_FCNTL_H
 #include 
 #endif
@@ -204,6 +206,54 @@ typedef struct {
   uint64_t overload_fd_exhausted;
 } overload_stats_t;
 
+/* DNS statistics */
+
+/** Represents the statistics of DNS queries seen if it is an Exit. */
+typedef struct {
+  /** Total number of DNS request seen at an Exit. They might not all end
+   * successfully or might even be lost by tor. This counter is incremented
+   * right before the DNS request is initiated. */
+  uint64_t stats_n_request;
+
+  /** Total number of DNS timeout errors. */
+  uint64_t stats_n_error_timeout;
+
+  /** When is the next assessment time of the general overload for DNS errors.
+   * Once this time is reached, all stats are reset and this time is set to the
+   * next assessment time. */
+  time_t next_assessment_time;
+} overload_dns_stats_t;
+
+/** Keep track of the DNS requests for the general overload state. */
+static overload_dns_stats_t overload_dns_stats;
+
+/* We use a scale here so we can represent percentages with decimal points by
+ * scaling the value by this factor and so 0.5% becomes a value of 500.
+ * Default is 1% and thus min and max range is 0 to 100%. */
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_SCALE 1000.0
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_DEFAULT 1000
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_MIN 0
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_MAX 10
+

[tor-commits] [tor/main] test: Add unit tests for DNS timeout overload state

2021-10-20 Thread dgoulet
commit 996409c9c4691fbb6cccaba11ceb84c1a5ef7906
Author: David Goulet 
Date:   Tue Oct 19 15:07:11 2021 -0400

test: Add unit tests for DNS timeout overload state

Signed-off-by: David Goulet 
---
 src/test/test_stats.c | 78 +++
 1 file changed, 78 insertions(+)

diff --git a/src/test/test_stats.c b/src/test/test_stats.c
index 081ae22cd5..3b9a192c75 100644
--- a/src/test/test_stats.c
+++ b/src/test/test_stats.c
@@ -51,6 +51,8 @@
 #include "feature/stats/bw_array_st.h"
 #include "feature/relay/router.h"
 
+#include "event2/dns.h"
+
 /** Run unit tests for some stats code. */
 static void
 test_stats(void *arg)
@@ -865,6 +867,81 @@ test_overload_stats(void *arg)
   tor_free(stats_str);
 }
 
+/** Test the overload stats logic. */
+static void
+test_overload_dns_timeout(void *arg)
+{
+  char *stats_str = NULL;
+  (void) arg;
+
+  /* Lets simulate a series of timeouts but below our default 1% threshold. */
+
+  for (int i = 0; i < 1000; i++) {
+/* This should trigger 9 timeouts which is just below 1% (10) */
+if (i > 0 && !(i % 100)) {
+  rep_hist_note_dns_query(0, DNS_ERR_TIMEOUT);
+} else {
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+}
+  }
+
+  /* No overload yet. */
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(!stats_str);
+
+  /* Move it 10 minutes in the future and see if we get a general overload. */
+  update_approx_time(approx_time() + (10 * 60));
+
+  /* This query should NOT trigger the general overload because we are below
+   * our default of 1%. */
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(!stats_str);
+
+  /* We'll now go above our 1% threshold. */
+  for (int i = 0; i < 1000; i++) {
+/* This should trigger 10 timeouts which is our threshold of 1% (10) */
+if (!(i % 10)) {
+  rep_hist_note_dns_query(0, DNS_ERR_TIMEOUT);
+} else {
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+}
+  }
+
+  /* Move it 10 minutes in the future and see if we get a general overload. */
+  update_approx_time(approx_time() + (10 * 60));
+
+  /* This query should trigger the general overload because we are above 1%. */
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(stats_str);
+  tor_free(stats_str);
+
+  /* Move 72h in the future, we should NOT get an overload anymore. */
+  update_approx_time(approx_time() + (72 * 3600));
+
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(!stats_str);
+
+  /* This query should NOT trigger the general overload. */
+  rep_hist_note_dns_query(0, DNS_ERR_TIMEOUT);
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(!stats_str);
+
+  /* Move it 10 minutes in the future and see if we get a general overload. We
+   * have now 100% of requests timing out. */
+  update_approx_time(approx_time() + (10 * 60));
+
+  /* This query should trigger the general overload with 50% of timeouts. */
+  rep_hist_note_dns_query(0, DNS_ERR_NONE);
+  stats_str = rep_hist_get_overload_general_line();
+  tt_assert(stats_str);
+  tor_free(stats_str);
+
+ done:
+  tor_free(stats_str);
+}
+
 #define ENT(name)   \
   { #name, test_ ## name , 0, NULL, NULL }
 #define FORK(name)  \
@@ -881,6 +958,7 @@ struct testcase_t stats_tests[] = {
   FORK(rephist_v3_onions),
   FORK(load_stats_file),
   FORK(overload_stats),
+  FORK(overload_dns_timeout),
 
   END_OF_TESTCASES
 };



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


[tor-commits] [tor/main] hs: Fix merge conflicts after merging forward 40476

2021-10-20 Thread dgoulet
commit af48f5736aec6ae67b52bc26e3cbb74d47dd8db1
Author: David Goulet 
Date:   Tue Oct 19 10:55:29 2021 -0400

hs: Fix merge conflicts after merging forward 40476

Signed-off-by: David Goulet 
---
 changes/ticket40476 | 11 +++
 src/core/or/connection_edge.c   | 28 +++-
 src/feature/dircache/dircache.c |  2 --
 src/test/test_hs_common.c   | 10 ++
 4 files changed, 36 insertions(+), 15 deletions(-)

diff --git a/changes/ticket40476 b/changes/ticket40476
index 062e36f9bc..86e4377a1c 100644
--- a/changes/ticket40476
+++ b/changes/ticket40476
@@ -1,8 +1,3 @@
-  o Major feature (onion service v2):
-- Tor does NOT allow anymore to create v2 services, to connect as a client
-  to a v2 service and for a relay to be a v2 HSDir or introduction point.
-  This effectively disable onion service version 2 tor wide. Closes 40476.
-- The control port command HSFETCH and HSPOST don't allow version 2 as 
well.
-  It is also not possible to create a v2 service with ADD_ONION.
-- See https://blog.torproject.org/v2-deprecation-timeline for details on
-  how to transition from v2 to v3.
+  o Minor bugfix (onion service):
+- Improve logging when a bad HS version is given. Fixes bug 40476; bugfix 
on
+  0.4.6.1-alpha.
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index 60a2f88ccb..d3979b3a7e 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -1612,6 +1612,23 @@ consider_plaintext_ports(entry_connection_t *conn, 
uint16_t port)
   return 0;
 }
 
+/** Return true iff query is a syntactically valid service ID (as
+ * generated by rend_get_service_id).  */
+static int
+rend_valid_v2_service_id(const char *query)
+{
+  /** Length of 'y' portion of 'y.onion' URL. */
+#define REND_SERVICE_ID_LEN_BASE32 16
+
+  if (strlen(query) != REND_SERVICE_ID_LEN_BASE32)
+return 0;
+
+  if (strspn(query, BASE32_CHARS) != REND_SERVICE_ID_LEN_BASE32)
+return 0;
+
+  return 1;
+}
+
 /** Parse the given hostname in address. Returns true if the parsing was
  * successful and type_out contains the type of the hostname. Else, false is
  * returned which means it was not recognized and type_out is set to
@@ -1675,6 +1692,14 @@ parse_extended_hostname(char *address, hostname_type_t 
*type_out)
   if (q != address) {
 memmove(address, q, strlen(q) + 1 /* also get \0 */);
   }
+  /* v2 onion address check. */
+  if (strlen(query) == REND_SERVICE_ID_LEN_BASE32) {
+*type_out = ONION_V2_HOSTNAME;
+if (rend_valid_v2_service_id(query)) {
+  goto success;
+}
+goto failed;
+  }
 
   /* v3 onion address check. */
   if (strlen(query) == HS_SERVICE_ADDR_LEN_BASE32) {
@@ -1694,7 +1719,8 @@ parse_extended_hostname(char *address, hostname_type_t 
*type_out)
  failed:
   /* otherwise, return to previous state and return 0 */
   *s = '.';
-  const bool is_onion = (*type_out == ONION_V3_HOSTNAME);
+  const bool is_onion = (*type_out == ONION_V2_HOSTNAME) ||
+(*type_out == ONION_V3_HOSTNAME);
   log_warn(LD_APP, "Invalid %shostname %s; rejecting",
is_onion ? "onion " : "",
safe_str_client(address));
diff --git a/src/feature/dircache/dircache.c b/src/feature/dircache/dircache.c
index 7319b96caf..7fdb1bc70f 100644
--- a/src/feature/dircache/dircache.c
+++ b/src/feature/dircache/dircache.c
@@ -1569,8 +1569,6 @@ directory_handle_command_post,(dir_connection_t *conn, 
const char *headers,
   char *url = NULL;
   const or_options_t *options = get_options();
 
-  (void) body_len;
-
   log_debug(LD_DIRSERV,"Received POST command.");
 
   conn->base_.state = DIR_CONN_STATE_SERVER_WRITING;
diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c
index 347a5b7174..7cb6a36f8e 100644
--- a/src/test/test_hs_common.c
+++ b/src/test/test_hs_common.c
@@ -808,11 +808,13 @@ test_parse_extended_hostname(void *arg)
   tt_assert(parse_extended_hostname(address4, ));
   tt_int_op(type, OP_EQ, NORMAL_HOSTNAME);
 
-  tt_assert(!parse_extended_hostname(address5, ));
-  tt_int_op(type, OP_EQ, BAD_HOSTNAME);
+  tt_assert(parse_extended_hostname(address5, ));
+  tt_int_op(type, OP_EQ, ONION_V2_HOSTNAME);
+  tt_str_op(address5, OP_EQ, "abcdefghijklmnop");
 
-  tt_assert(!parse_extended_hostname(address6, ));
-  tt_int_op(type, OP_EQ, BAD_HOSTNAME);
+  tt_assert(parse_extended_hostname(address6, ));
+  tt_int_op(type, OP_EQ, ONION_V2_HOSTNAME);
+  tt_str_op(address6, OP_EQ, "abcdefghijklmnop");
 
   tt_assert(!parse_extended_hostname(address7, ));
   tt_int_op(type, OP_EQ, BAD_HOSTNAME);



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


[tor-commits] [tor/main] Merge branch 'maint-0.4.6'

2021-10-20 Thread dgoulet
commit 3752a71ded247cd6b32e0ee6c3dfaf906a63a915
Merge: d455f9e18a caa305a5ad
Author: David Goulet 
Date:   Wed Oct 20 09:16:45 2021 -0400

Merge branch 'maint-0.4.6'

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


[tor-commits] [tor/main] relay: Overload state on DNS timeout is now X% over Y secs

2021-10-20 Thread dgoulet
commit de907893befdb2bf6bb0b95b183cc1f01b8a464c
Author: David Goulet 
Date:   Tue Oct 19 14:13:33 2021 -0400

relay: Overload state on DNS timeout is now X% over Y secs

With this commit, we will only report a general overload state if we've
seen more than X% of DNS timeout errors over Y seconds. Previous
behavior was to report when a single timeout occured which is really too
small of a threshold.

The value X is a consensus parameters called
"overload_dns_timeout_scale_percent" which is a scaled percentage
(factor of 1000) so we can represent decimal points for X like 0.5% for
instance. Its default is 1000 which ends up being 1%.

The value Y is a consensus parameters called
"overload_dns_timeout_period_secs" which is the time period for which
will gather DNS errors and once over, we assess if that X% has been
reached ultimately triggering a general overload signal.

Closes #40491

Signed-off-by: David Goulet 
---
 src/feature/nodelist/networkstatus.c |   2 +
 src/feature/relay/dns.c  |  14 ++--
 src/feature/stats/rephist.c  | 133 +++
 src/feature/stats/rephist.h  |   3 +
 4 files changed, 142 insertions(+), 10 deletions(-)

diff --git a/src/feature/nodelist/networkstatus.c 
b/src/feature/nodelist/networkstatus.c
index 2ffa6da1a3..af808a6ba7 100644
--- a/src/feature/nodelist/networkstatus.c
+++ b/src/feature/nodelist/networkstatus.c
@@ -103,6 +103,7 @@
 #include "feature/dirauth/vote_microdesc_hash_st.h"
 #include "feature/nodelist/vote_routerstatus_st.h"
 #include "feature/nodelist/routerstatus_st.h"
+#include "feature/stats/rephist.h"
 
 #ifdef HAVE_UNISTD_H
 #include 
@@ -1663,6 +1664,7 @@ notify_before_networkstatus_changes(const networkstatus_t 
*old_c,
   dos_consensus_has_changed(new_c);
   relay_consensus_has_changed(new_c);
   hs_dos_consensus_has_changed(new_c);
+  rep_hist_consensus_has_changed(new_c);
 }
 
 /* Called after a new consensus has been put in the global state. It is safe
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 22f929808e..ed8d235e92 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -1548,16 +1548,6 @@ evdns_callback(int result, char type, int count, int 
ttl, void *addresses,
 
   tor_addr_make_unspec();
 
-  /* Note down any DNS errors to the statistics module */
-  if (result == DNS_ERR_TIMEOUT) {
-/* libevent timed out while resolving a name. However, because libevent
- * handles retries and timeouts internally, this means that all attempts of
- * libevent timed out. If we wanted to get more granular information about
- * individual libevent attempts, we would have to implement our own DNS
- * timeout/retry logic */
-rep_hist_note_overload(OVERLOAD_GENERAL);
-  }
-
   /* Keep track of whether IPv6 is working */
   if (type == DNS_IPv6_) {
 if (result == DNS_ERR_TIMEOUT) {
@@ -1659,6 +1649,10 @@ evdns_callback(int result, char type, int count, int 
ttl, void *addresses,
 dns_found_answer(string_address, orig_query_type,
  result, , hostname, ttl);
 
+  /* The result can be changed within this function thus why we note the result
+   * at the end. */
+  rep_hist_note_dns_query(type, result);
+
   tor_free(arg_);
 }
 
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c
index e25c01331d..c3a281a8c2 100644
--- a/src/feature/stats/rephist.c
+++ b/src/feature/stats/rephist.c
@@ -84,6 +84,8 @@
 #include "feature/nodelist/networkstatus_st.h"
 #include "core/or/or_circuit_st.h"
 
+#include 
+
 #ifdef HAVE_FCNTL_H
 #include 
 #endif
@@ -204,6 +206,54 @@ typedef struct {
   uint64_t overload_fd_exhausted;
 } overload_stats_t;
 
+/* DNS statistics */
+
+/** Represents the statistics of DNS queries seen if it is an Exit. */
+typedef struct {
+  /** Total number of DNS request seen at an Exit. They might not all end
+   * successfully or might even be lost by tor. This counter is incremented
+   * right before the DNS request is initiated. */
+  uint64_t stats_n_request;
+
+  /** Total number of DNS timeout errors. */
+  uint64_t stats_n_error_timeout;
+
+  /** When is the next assessment time of the general overload for DNS errors.
+   * Once this time is reached, all stats are reset and this time is set to the
+   * next assessment time. */
+  time_t next_assessment_time;
+} overload_dns_stats_t;
+
+/** Keep track of the DNS requests for the general overload state. */
+static overload_dns_stats_t overload_dns_stats;
+
+/* We use a scale here so we can represent percentages with decimal points by
+ * scaling the value by this factor and so 0.5% becomes a value of 500.
+ * Default is 1% and thus min and max range is 0 to 100%. */
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_SCALE 1000.0
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_DEFAULT 1000
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_MIN 0
+#define OVERLOAD_DNS_TIMEOUT_PERCENT_MAX 10
+

[tor-commits] [tor/main] changes: Add file for ticket 40491

2021-10-20 Thread dgoulet
commit caa305a5adec8a0a50006d1bed3e6b019e016dd4
Author: David Goulet 
Date:   Wed Oct 20 09:15:51 2021 -0400

changes: Add file for ticket 40491

Signed-off-by: David Goulet 
---
 changes/ticket40491 | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/changes/ticket40491 b/changes/ticket40491
new file mode 100644
index 00..01c6c7d748
--- /dev/null
+++ b/changes/ticket40491
@@ -0,0 +1,7 @@
+  o Major bugfixes (relay, overload state):
+- Report the general overload state for DNS timeout errors only if X% of 
all
+  DNS queries over Y seconds are errors. Before that, it only took 1 
timeout
+  to report the overload state which was just too low of a threshold. The X
+  and Y values are 1% and 10 minutes respectively but they are also
+  controlled by consensus parameters. Fixes bug 40491; bugfix on
+  0.4.6.1-alpha.



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


[tor-commits] [translation/communitytpo-contentspot] https://gitweb.torproject.org/translation.git/commit/?h=communitytpo-contentspot

2021-10-20 Thread translation
commit 4de0fef8ed81f7cf77a21698f0ea4085bb268d94
Author: Translation commit bot 
Date:   Wed Oct 20 11:45:12 2021 +


https://gitweb.torproject.org/translation.git/commit/?h=communitytpo-contentspot
---
 contents+es.po | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/contents+es.po b/contents+es.po
index 4ee608d81b..a5c84710f6 100644
--- a/contents+es.po
+++ b/contents+es.po
@@ -3011,7 +3011,7 @@ msgid ""
 "/onion-service-01.png\" alt=\"Onion Services: Step 1\">"
 msgstr ""
 ""
+"/onion-service-01.png\" alt=\"Servicios Cebolla: Paso 1\">"
 
 #: https//community.torproject.org/onion-services/overview/
 #: (content/onion-services/overview/contents+en.lrpage.body)
@@ -3074,7 +3074,7 @@ msgid ""
 "/onion-service-02.png\" alt=\"Onion Services: Step 2\">"
 msgstr ""
 ""
+"/onion-service-02.png\" alt=\"Servicios Cebolla: Paso 2\">"
 
 #: https//community.torproject.org/onion-services/overview/
 #: (content/onion-services/overview/contents+en.lrpage.body)
@@ -3106,7 +3106,7 @@ msgid ""
 "/onion-service-03.png\" alt=\"Onion Services: Step 3\">"
 msgstr ""
 ""
+"/onion-service-03.png\" alt=\"Servicios Cebolla: Paso 3\">"
 
 #: https//community.torproject.org/onion-services/overview/
 #: (content/onion-services/overview/contents+en.lrpage.body)
@@ -3158,7 +3158,7 @@ msgid ""
 "/onion-service-04.png\" alt=\"Onion Services: Step 4\">"
 msgstr ""
 ""
+"/onion-service-04.png\" alt=\"Servicios Cebolla: Paso 4\">"
 
 #: https//community.torproject.org/onion-services/overview/
 #: (content/onion-services/overview/contents+en.lrpage.body)
@@ -3202,7 +3202,7 @@ msgid ""
 "/onion-service-05.png\" alt=\"Onion Services: Step 5\">"
 msgstr ""
 ""
+"/onion-service-05.png\" alt=\"Servicios Cebolla: Paso 5\">"
 
 #: https//community.torproject.org/onion-services/overview/
 #: (content/onion-services/overview/contents+en.lrpage.body)
@@ -3235,7 +3235,7 @@ msgid ""
 "/onion-service-06.png\" alt=\"Onion Services: Step 6\">"
 msgstr ""
 ""
+"/onion-service-06.png\" alt=\"Servicios Cebolla: Paso 6\">"
 
 #: https//community.torproject.org/onion-services/overview/
 #: (content/onion-services/overview/contents+en.lrpage.body)
@@ -3260,7 +3260,7 @@ msgid ""
 "/onion-service-07.png\" alt=\"Onion Services: Step 7\">"
 msgstr ""
 ""
+"/onion-service-07.png\" alt=\"Servicios Cebolla: Paso 7\">"
 
 #: https//community.torproject.org/onion-services/overview/
 #: (content/onion-services/overview/contents+en.lrpage.body)
@@ -3304,7 +3304,7 @@ msgid ""
 "/onion-service-08.png\" alt=\"Onion Services: Step 8\">"
 msgstr ""
 ""
+"/onion-service-08.png\" alt=\"Servicios Cebolla: Paso 8\">"
 
 #: https//community.torproject.org/onion-services/overview/
 #: (content/onion-services/overview/contents+en.lrpage.body)
@@ -3345,7 +3345,7 @@ msgid ""
 "/onion-service-09.png\" alt=\"Onion Services: Step 9\">"
 msgstr ""
 ""
+"/onion-service-09.png\" alt=\"Servicios Cebolla: Paso 9\">"
 
 #: https//community.torproject.org/onion-services/overview/
 #: (content/onion-services/overview/contents+en.lrpage.body)

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


[tor-commits] [translation/support-portal] https://gitweb.torproject.org/translation.git/commit/?h=support-portal

2021-10-20 Thread translation
commit e44a13e8aae73d782c68b5f5d3c543138eb4674d
Author: Translation commit bot 
Date:   Wed Oct 20 11:17:53 2021 +

https://gitweb.torproject.org/translation.git/commit/?h=support-portal
---
 contents+ar.po |  6 +++---
 contents+cs.po | 11 ++-
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/contents+ar.po b/contents+ar.po
index 4b52cd7f9a..d319e3fcbc 100644
--- a/contents+ar.po
+++ b/contents+ar.po
@@ -16,8 +16,8 @@
 # Ahmed A., 2021
 # William Ward , 2021
 # erinm, 2021
-# Emma Peel, 2021
 # NASI₿ , 2021
+# Emma Peel, 2021
 # 
 msgid ""
 msgstr ""
@@ -25,7 +25,7 @@ msgstr ""
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-10-11 15:59+CET\n"
 "PO-Revision-Date: 2018-10-02 22:41+\n"
-"Last-Translator: NASI₿ , 2021\n"
+"Last-Translator: Emma Peel, 2021\n"
 "Language-Team: Arabic (https://www.transifex.com/otf/teams/1519/ar/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -7372,7 +7372,7 @@ msgid ""
 "and then restart (or hup) Tor."
 msgstr ""
 "إذا كنت ترغب في تعديل التطبيقات على أجهزة 
كمبيوتر مختلفة عن عميل Tor، فيجب "
-"عليك تحرير ملف torrc الخاص بك لتعريف 
SocksListenAddress 0.0.0.0 ثم إعادة "
+"عليك تحرير ملف torrc الخاص بك لتعريف 
`SocksListenAddress 0.0.0.0` ثم إعادة "
 "تشغيل (or hup) Tor."
 
 #: https//support.torproject.org/tbb/tbb-run-client-different-computer/
diff --git a/contents+cs.po b/contents+cs.po
index 5beb951b6e..187d1e27d8 100644
--- a/contents+cs.po
+++ b/contents+cs.po
@@ -13,6 +13,7 @@
 # Pavel Borecki , 2021
 # erinm, 2021
 # Michal Stanke , 2021
+# Lenka Šimečková , 2021
 # 
 msgid ""
 msgstr ""
@@ -20,7 +21,7 @@ msgstr ""
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-10-11 15:59+CET\n"
 "PO-Revision-Date: 2018-10-02 22:41+\n"
-"Last-Translator: Michal Stanke , 2021\n"
+"Last-Translator: Lenka Šimečková , 2021\n"
 "Language-Team: Czech (https://www.transifex.com/otf/teams/1519/cs/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -308,7 +309,7 @@ msgstr ""
 #: https//support.torproject.org/glossary/browsing-history/
 #: (content/glossary/browsing-history/contents+en.lrword.term)
 msgid "browsing history"
-msgstr ""
+msgstr "historie prohlížení"
 
 #: https//support.torproject.org/glossary/browsing-history/
 #: (content/glossary/browsing-history/contents+en.lrword.definition)
@@ -384,7 +385,7 @@ msgstr ""
 #: https//support.torproject.org/glossary/client/
 #: (content/glossary/client/contents+en.lrword.term)
 msgid "client"
-msgstr ""
+msgstr "klient"
 
 #: https//support.torproject.org/glossary/client/
 #: (content/glossary/client/contents+en.lrword.definition)
@@ -559,7 +560,7 @@ msgstr ""
 #: https//support.torproject.org/glossary/encryption/
 #: (content/glossary/encryption/contents+en.lrword.term)
 msgid "encryption"
-msgstr ""
+msgstr "šifrování"
 
 #: https//support.torproject.org/glossary/encryption/
 #: (content/glossary/encryption/contents+en.lrword.definition)
@@ -1529,7 +1530,7 @@ msgstr ""
 #: https//support.torproject.org/glossary/server/
 #: (content/glossary/server/contents+en.lrword.term)
 msgid "server"
-msgstr ""
+msgstr "server"
 
 #: https//support.torproject.org/glossary/server/
 #: (content/glossary/server/contents+en.lrword.definition)

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


[tor-commits] [translation/tails-misc_release] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release

2021-10-20 Thread translation
commit 2bba6dc96d26e2d5bf4bcb208c3fa88e7fae6f3c
Author: Translation commit bot 
Date:   Wed Oct 20 11:16:39 2021 +

https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release
---
 cs.po | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cs.po b/cs.po
index 4be83e6e22..0e93e66d4c 100644
--- a/cs.po
+++ b/cs.po
@@ -15,6 +15,7 @@
 # Jiří Vírava , 2013-2014
 # trendspotter , 2019
 # Plarome, 2019
+# Lenka Šimečková , 2021
 # Michal Stanke , 2019
 # Michal Vašíček , 2017
 # multiflexi , 2019
@@ -28,8 +29,8 @@ msgstr ""
 "Project-Id-Version: Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-09-06 12:01+0200\n"
-"PO-Revision-Date: 2021-09-06 12:26+\n"
-"Last-Translator: Transifex Bot <>\n"
+"PO-Revision-Date: 2021-10-20 10:55+\n"
+"Last-Translator: Lenka Šimečková \n"
 "Language-Team: Czech (http://www.transifex.com/otf/torproject/language/cs/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"

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


[tor-commits] [translation/tails-misc] https://gitweb.torproject.org/translation.git/commit/?h=tails-misc

2021-10-20 Thread translation
commit 7e282c4ed1bca5347a1b3f7a8f8ecd838eb85ef4
Author: Translation commit bot 
Date:   Wed Oct 20 11:15:49 2021 +

https://gitweb.torproject.org/translation.git/commit/?h=tails-misc
---
 cs.po | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/cs.po b/cs.po
index d27b696288..7d58d9d88c 100644
--- a/cs.po
+++ b/cs.po
@@ -15,6 +15,7 @@
 # Jiří Vírava , 2013-2014
 # trendspotter , 2019
 # Plarome, 2019
+# Lenka Šimečková , 2021
 # Michal Stanke , 2019
 # Michal Vašíček , 2017
 # multiflexi , 2019
@@ -28,8 +29,8 @@ msgstr ""
 "Project-Id-Version: Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-09-06 12:01+0200\n"
-"PO-Revision-Date: 2021-09-06 12:26+\n"
-"Last-Translator: Transifex Bot <>\n"
+"PO-Revision-Date: 2021-10-20 10:55+\n"
+"Last-Translator: Lenka Šimečková \n"
 "Language-Team: Czech (http://www.transifex.com/otf/torproject/language/cs/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -2592,7 +2593,7 @@ msgstr "Kontejner TrueCrypt/VeraCrypt"
 
 #: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:21
 msgid "image"
-msgstr ""
+msgstr "obrázek"
 
 #: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:70
 msgid "Configure a Tor bridge"
@@ -2600,7 +2601,7 @@ msgstr "Nastavit Tor bridge"
 
 #: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:76
 msgid "heading"
-msgstr ""
+msgstr "nadpis"
 
 #: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:94
 msgid ""
@@ -2909,11 +2910,11 @@ msgstr ""
 
 #: ../config/chroot_local-includes/usr/share/tails/tca/time-dialog.ui.in:117
 msgid "Select the time zone you want to use"
-msgstr ""
+msgstr "Zvolte časovou zónu, kterou chcete používat"
 
 #: ../config/chroot_local-includes/usr/share/tails/tca/time-dialog.ui.in:134
 msgid "Time zone"
-msgstr ""
+msgstr "Časová zóna"
 
 #: ../config/chroot_local-includes/usr/share/tails/tca/time-dialog.ui.in:178
 msgid "Time"

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


[tor-commits] [translation/communitytpo-contentspot] https://gitweb.torproject.org/translation.git/commit/?h=communitytpo-contentspot

2021-10-20 Thread translation
commit 21d101c5cead12e88bf4a6b64c40018b449c449b
Author: Translation commit bot 
Date:   Wed Oct 20 11:15:10 2021 +


https://gitweb.torproject.org/translation.git/commit/?h=communitytpo-contentspot
---
 contents+es.po | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/contents+es.po b/contents+es.po
index bc7ff434ad..4ee608d81b 100644
--- a/contents+es.po
+++ b/contents+es.po
@@ -14,8 +14,8 @@
 # David Figuera , 2021
 # Đorđe Marušić , 2021
 # erinm, 2021
-# Emma Peel, 2021
 # Zuhualime Akoochimoya, 2021
+# Emma Peel, 2021
 # 
 msgid ""
 msgstr ""
@@ -23,7 +23,7 @@ msgstr ""
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-10-11 07:32+CET\n"
 "PO-Revision-Date: 2019-12-11 10:50+\n"
-"Last-Translator: Zuhualime Akoochimoya, 2021\n"
+"Last-Translator: Emma Peel, 2021\n"
 "Language-Team: Spanish (https://www.transifex.com/otf/teams/1519/es/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -5228,6 +5228,8 @@ msgid ""
 ""
 msgstr ""
+""
 
 #: https//community.torproject.org/localization/becoming-tor-translator/
 #: (content/localization/becoming-tor-translator/contents+en.lrpage.body)
@@ -5242,6 +5244,8 @@ msgid ""
 ""
 msgstr ""
+""
 
 #: https//community.torproject.org/localization/becoming-tor-translator/
 #: (content/localization/becoming-tor-translator/contents+en.lrpage.body)

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


  1   2   >