GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still and

Verified Commit 24180fa8 authored by Georg Koppen's avatar Georg Koppen

Merge remote-tracking branch 'gitlab/merge-requests/41' into maint-1.1

parents a66516f8 033603a6
Pipeline #1944 passed with stage
in 48 minutes and 41 seconds
......@@ -25,7 +25,7 @@ http_timeout = 10
# to give to stem for waiting on a circuit to be built since
# CircuitBuildTimeout doesn't handle the case of a TLS connection to a relay
# taking forever, and probably other not-yet-discovered cases.
circuit_timeout = 10
circuit_timeout = 60
# Whether or not to reset the bandwidth measurements when the relay's IP
# address changes. If it changes, we only consider results for the relay that
# we obtained while the relay was located at its most recent IP address.
......@@ -318,6 +318,17 @@ def measure_relay(args, conf, destinations, cb, rl, relay):
# Build the circuit
circ_id, reason = cb.build_circuit(circ_fps)
if not circ_id and relay.fingerprint == circ_fps[0]:
# We detected that some exits fail to build circuits as 1st hop.
# If that's the case, try again using them as 2nd hop.
# We could reuse the helper, but it does not need to be an exit now,
# so choose other again.
helper = _pick_ideal_second_hop(
relay, dest, rl, cb.controller, is_exit=False)
if helper:
circ_fps = [helper.fingerprint, relay.fingerprint]
nicknames = [helper.nickname, relay.nickname]
circ_id, reason = cb.build_circuit(circ_fps)
if not circ_id:
log.debug('Could not build circuit with path %s (%s): %s ',
circ_fps, nicknames, reason)
......@@ -205,6 +205,11 @@ class Relay:
# and ips and that port. See #40006.
# Using `strip_private` to ignore reject rules to private
# networks.
# We could increase the chances that the exit can exit
# checking IPv6 with:
# ``or self.exit_policy_v6.can_exit_to(port=443, strict=True)``
# But if it can still not exit to our Web server, then we
# should retry to measure it as entry.
return (
.can_exit_to(port=port, strict=True)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment