mirror of
https://github.com/chatmail/core.git
synced 2026-05-06 06:46:35 +03:00
always use iroh.testrun.org:4443 as relay
This commit is contained in:
@@ -235,25 +235,15 @@ impl Context {
|
|||||||
let secret_key = SecretKey::generate();
|
let secret_key = SecretKey::generate();
|
||||||
let public_key = secret_key.public();
|
let public_key = secret_key.public();
|
||||||
|
|
||||||
let relay_mode = if let Some(relay_url) = self
|
let relay_url = self
|
||||||
.metadata
|
.metadata
|
||||||
.read()
|
.read()
|
||||||
.await
|
.await
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(|conf| conf.iroh_relay.clone())
|
.and_then(|conf| conf.iroh_relay.clone())
|
||||||
{
|
.unwrap_or(Url::parse("https://iroh.testrun.org:4443").unwrap());
|
||||||
RelayMode::Custom(RelayMap::from_url(RelayUrl::from(relay_url)))
|
|
||||||
} else {
|
|
||||||
#[cfg(test)]
|
|
||||||
{
|
|
||||||
RelayMode::Default
|
|
||||||
}
|
|
||||||
#[cfg(not(test))]
|
|
||||||
RelayMode::Custom(RelayMap::from_url(
|
|
||||||
Url::parse("ir.testrun.org").unwrap().into(),
|
|
||||||
))
|
|
||||||
};
|
|
||||||
|
|
||||||
|
let relay_mode = RelayMode::Custom(RelayMap::from_url(RelayUrl::from(relay_url)));
|
||||||
let endpoint = Endpoint::builder()
|
let endpoint = Endpoint::builder()
|
||||||
.secret_key(secret_key)
|
.secret_key(secret_key)
|
||||||
.alpns(vec![GOSSIP_ALPN.to_vec()])
|
.alpns(vec![GOSSIP_ALPN.to_vec()])
|
||||||
|
|||||||
Reference in New Issue
Block a user