Commit c8d9ae45 authored by Ian Jackson's avatar Ian Jackson 💬
Browse files

Merge branch 'fallback_status_v2' into 'main'

Refactor FallbackDir handling and implement a retry-after-delay mechanism.

Closes #406 and #220

See merge request tpo/core/arti!433
parents 5d27710e 33399bed
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -148,6 +148,7 @@ dependencies = [
 "tor-config",
 "tor-dirmgr",
 "tor-error",
 "tor-guardmgr",
 "tor-netdoc",
 "tor-persist",
 "tor-proto",
@@ -3250,6 +3251,7 @@ dependencies = [
 "futures-await-test",
 "humantime-serde",
 "itertools",
 "once_cell",
 "pin-project",
 "rand 0.8.5",
 "retry-error",
@@ -3361,6 +3363,7 @@ dependencies = [
 "tor-consdiff",
 "tor-dirclient",
 "tor-error",
 "tor-guardmgr",
 "tor-llcrypto",
 "tor-netdir",
 "tor-netdoc",
@@ -3396,6 +3399,7 @@ name = "tor-guardmgr"
version = "0.1.0"
dependencies = [
 "derive_builder",
 "derive_more",
 "educe",
 "futures",
 "humantime-serde",
+3 −7
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ tor-config = { path = "../tor-config", version = "0.1.0" }
tor-chanmgr = { path = "../tor-chanmgr", version = "0.1.0" }
tor-dirmgr = { path = "../tor-dirmgr", version = "0.1.0" }
tor-error = { path = "../tor-error", version = "0.1.0" }
tor-guardmgr = { path = "../tor-guardmgr", version = "0.1.0" }
tor-netdoc = { path = "../tor-netdoc", version = "0.1.0" }
tor-persist = { path = "../tor-persist", version = "0.1.0" }
tor-proto = { path = "../tor-proto", version = "0.1.0" }
@@ -47,19 +48,14 @@ derive_more = "0.99"
directories = "4"
educe = "0.4.6"
futures = "0.3.14"
postage = { version = "0.4", default-features = false, features = [
    "futures-traits",
] }
postage = { version = "0.4", default-features = false, features = ["futures-traits"] }
tracing = "0.1.18"
serde = { version = "1.0.103", features = ["derive"] }
thiserror = "1"
pin-project = "1"

[dev-dependencies]
tor-rtcompat = { path = "../tor-rtcompat", version = "0.1.0", features = [
    "tokio",
    "native-tls",
] }
tor-rtcompat = { path = "../tor-rtcompat", version = "0.1.0", features = ["tokio", "native-tls"] }
tokio-crate = { package = "tokio", version = "1.7", features = [
    "rt",
    "rt-multi-thread",
+6 −0
Original line number Diff line number Diff line
@@ -275,6 +275,12 @@ pub struct TorClientConfig {

impl tor_circmgr::CircMgrConfig for TorClientConfig {}

impl AsRef<tor_guardmgr::fallback::FallbackList> for TorClientConfig {
    fn as_ref(&self) -> &tor_guardmgr::fallback::FallbackList {
        self.tor_network.fallback_caches()
    }
}

impl Default for TorClientConfig {
    fn default() -> Self {
        Self::builder()
+22 −21
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ educe = "0.4.6"
futures = "0.3.14"
humantime-serde = "1.1.1"
itertools = "0.10.1"
once_cell = "1"
tracing = "0.1.18"
pin-project = "1"
rand = "0.8"
+2 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@

use tor_basic_utils::define_accessor_trait;
use tor_config::ConfigBuildError;
use tor_guardmgr::fallback::FallbackList;

use derive_builder::Builder;
use serde::Deserialize;
@@ -281,6 +282,7 @@ define_accessor_trait! {
        path_rules: PathConfig,
        circuit_timing: CircuitTiming,
        preemptive_circuits: PreemptiveCircuitConfig,
        fallbacks: FallbackList,
    }
}

Loading