Compare commits

...

3 Commits

Author SHA1 Message Date
Septias
e005226cc6 always use iroh.testrun.org:4443 as relay 2024-10-20 13:59:06 +02:00
Septias
b5983035d5 fix: use "ir.testrun.org" as default url 2024-10-20 13:59:06 +02:00
Septias
ab6bb743b5 fix: use relay only for tests 2024-10-20 13:59:02 +02:00

View File

@@ -235,20 +235,15 @@ impl Context {
let secret_key = SecretKey::generate();
let public_key = secret_key.public();
let relay_mode = if let Some(relay_url) = self
let relay_url = self
.metadata
.read()
.await
.as_ref()
.and_then(|conf| conf.iroh_relay.clone())
{
RelayMode::Custom(RelayMap::from_url(RelayUrl::from(relay_url)))
} else {
// FIXME: this should be RelayMode::Disabled instead.
// Currently using default relays because otherwise Rust tests fail.
RelayMode::Default
};
.unwrap_or(Url::parse("https://iroh.testrun.org:4443").unwrap());
let relay_mode = RelayMode::Custom(RelayMap::from_url(RelayUrl::from(relay_url)));
let endpoint = Endpoint::builder()
.secret_key(secret_key)
.alpns(vec![GOSSIP_ALPN.to_vec()])