mirror of
https://github.com/chatmail/core.git
synced 2026-05-14 04:16:30 +03:00
Bind to 0.0.0.0
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
//! download to an impersonated getter.
|
//! download to an impersonated getter.
|
||||||
|
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
|
use std::net::Ipv4Addr;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
@@ -159,7 +160,10 @@ impl BackupProvider {
|
|||||||
// Start listening.
|
// Start listening.
|
||||||
let (db, hash) = iroh::provider::create_collection(files).await?;
|
let (db, hash) = iroh::provider::create_collection(files).await?;
|
||||||
context.emit_event(SendProgress::CollectionCreated.into());
|
context.emit_event(SendProgress::CollectionCreated.into());
|
||||||
let provider = Provider::builder(db).auth_token(token).spawn()?;
|
let provider = Provider::builder(db)
|
||||||
|
.bind_addr((Ipv4Addr::UNSPECIFIED, 0).into())
|
||||||
|
.auth_token(token)
|
||||||
|
.spawn()?;
|
||||||
context.emit_event(SendProgress::ProviderListening.into());
|
context.emit_event(SendProgress::ProviderListening.into());
|
||||||
info!(context, "Waiting for remote to connect");
|
info!(context, "Waiting for remote to connect");
|
||||||
let ticket = provider.ticket(hash);
|
let ticket = provider.ticket(hash);
|
||||||
|
|||||||
Reference in New Issue
Block a user