mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Add "internal" to some bootstrap statuses when no exits are available.
If the consensus does not contain Exits, Tor will only build internal circuits. In this case, relevant statuses will contain the word "internal" as indicated in the Tor control-spec.txt. When bootstrap completes, Tor will be ready to handle an application requesting an internal circuit to hidden services at ".onion" addresses. If a future consensus contains Exits, exit circuits may become available. Tor already notifies the user at "notice" level if they have no exits in the consensus, and can therefor only build internal paths. Consequential change from #13718.
This commit is contained in:
parent
cb94f7534d
commit
c3a4201faa
9
changes/bug13718-add-internal-bootstrap-statuses
Normal file
9
changes/bug13718-add-internal-bootstrap-statuses
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- Add "internal" to some bootstrap statuses when no exits are available.
|
||||||
|
If the consensus does not contain Exits, Tor will only build internal
|
||||||
|
circuits. In this case, relevant statuses will contain the word
|
||||||
|
"internal" as indicated in the Tor control-spec.txt. When bootstrap
|
||||||
|
completes, Tor will be ready to handle an application requesting an
|
||||||
|
internal circuit to hidden services at ".onion" addresses.
|
||||||
|
If a future consensus contains Exits, exit circuits may become available.
|
||||||
|
Consequential change from #13718.
|
@ -4807,23 +4807,43 @@ bootstrap_status_to_string(bootstrap_status_t s, const char **tag,
|
|||||||
break;
|
break;
|
||||||
case BOOTSTRAP_STATUS_REQUESTING_DESCRIPTORS:
|
case BOOTSTRAP_STATUS_REQUESTING_DESCRIPTORS:
|
||||||
*tag = "requesting_descriptors";
|
*tag = "requesting_descriptors";
|
||||||
*summary = "Asking for relay descriptors";
|
/* XXXX this appears to incorrectly report internal on most loads */
|
||||||
|
*summary = router_have_consensus_path() == CONSENSUS_PATH_INTERNAL ?
|
||||||
|
"Asking for relay descriptors for internal paths" :
|
||||||
|
"Asking for relay descriptors";
|
||||||
break;
|
break;
|
||||||
|
/* If we're sure there are no exits in the consensus,
|
||||||
|
* inform the controller by adding "internal"
|
||||||
|
* to the status summaries.
|
||||||
|
* (We only check this while loading descriptors,
|
||||||
|
* so we may not know in the earlier stages.)
|
||||||
|
* But if there are exits, we can't be sure whether
|
||||||
|
* we're creating internal or exit paths/circuits.
|
||||||
|
* XXXX Or should be use different tags or statuses
|
||||||
|
* for internal and exit/all? */
|
||||||
case BOOTSTRAP_STATUS_LOADING_DESCRIPTORS:
|
case BOOTSTRAP_STATUS_LOADING_DESCRIPTORS:
|
||||||
*tag = "loading_descriptors";
|
*tag = "loading_descriptors";
|
||||||
*summary = "Loading relay descriptors";
|
*summary = router_have_consensus_path() == CONSENSUS_PATH_INTERNAL ?
|
||||||
|
"Loading relay descriptors for internal paths" :
|
||||||
|
"Loading relay descriptors";
|
||||||
break;
|
break;
|
||||||
case BOOTSTRAP_STATUS_CONN_OR:
|
case BOOTSTRAP_STATUS_CONN_OR:
|
||||||
*tag = "conn_or";
|
*tag = "conn_or";
|
||||||
*summary = "Connecting to the Tor network";
|
*summary = router_have_consensus_path() == CONSENSUS_PATH_INTERNAL ?
|
||||||
|
"Connecting to the Tor network internally" :
|
||||||
|
"Connecting to the Tor network";
|
||||||
break;
|
break;
|
||||||
case BOOTSTRAP_STATUS_HANDSHAKE_OR:
|
case BOOTSTRAP_STATUS_HANDSHAKE_OR:
|
||||||
*tag = "handshake_or";
|
*tag = "handshake_or";
|
||||||
*summary = "Finishing handshake with first hop";
|
*summary = router_have_consensus_path() == CONSENSUS_PATH_INTERNAL ?
|
||||||
|
"Finishing handshake with first hop of internal circuit" :
|
||||||
|
"Finishing handshake with first hop";
|
||||||
break;
|
break;
|
||||||
case BOOTSTRAP_STATUS_CIRCUIT_CREATE:
|
case BOOTSTRAP_STATUS_CIRCUIT_CREATE:
|
||||||
*tag = "circuit_create";
|
*tag = "circuit_create";
|
||||||
*summary = "Establishing a Tor circuit";
|
*summary = router_have_consensus_path() == CONSENSUS_PATH_INTERNAL ?
|
||||||
|
"Establishing an internal Tor circuit" :
|
||||||
|
"Establishing a Tor circuit";
|
||||||
break;
|
break;
|
||||||
case BOOTSTRAP_STATUS_DONE:
|
case BOOTSTRAP_STATUS_DONE:
|
||||||
*tag = "done";
|
*tag = "done";
|
||||||
|
Loading…
Reference in New Issue
Block a user