Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Commit

Permalink
feat(proxy): keep CoCo alive (#977)
Browse files Browse the repository at this point in the history
Bumps to the link version that keeps connections alive sending keep
alive messages. Additionally introduces the ability to listen on all
network addresses to enable communication with remote hosts.

Co-authored-by: Rūdolfs Ošiņš <rudolfs@osins.org>
Co-authored-by: Nuno Alexandre <hi@nunoalexandre.com>
  • Loading branch information
3 people committed Sep 30, 2020
1 parent 26ecccd commit 91c1f19
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions proxy/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proxy/api/src/main.rs
Expand Up @@ -155,7 +155,7 @@ async fn rig(args: Args) -> Result<Rigging, Box<dyn std::error::Error>> {
log::error!("Error parsing seed list {:?}: {}", seeds, err);
vec![]
});
let config = coco::config::configure(paths, key, *coco::config::LOCALHOST_ANY, seeds);
let config = coco::config::configure(paths, key, *coco::config::INADDR_ANY, seeds);

coco::into_peer_state(config, signer.clone(), store.clone(), RunConfig::default()).await?
};
Expand Down
4 changes: 2 additions & 2 deletions proxy/coco/Cargo.toml
Expand Up @@ -29,11 +29,11 @@ features = [ "json-value" ]

[dependencies.librad]
git = "https://github.com/radicle-dev/radicle-link.git"
rev = "3eb9d1fb671d8123cb40b2365e2fbde7f3ea8973"
rev = "01f95786b1c05bf167b27dcf54e4cbe0e9b38a43"

[dependencies.radicle-git-helpers]
git = "https://github.com/radicle-dev/radicle-link.git"
rev = "3eb9d1fb671d8123cb40b2365e2fbde7f3ea8973"
rev = "01f95786b1c05bf167b27dcf54e4cbe0e9b38a43"

[dependencies.radicle-surf]
version = "0.4.1"
Expand Down
4 changes: 4 additions & 0 deletions proxy/coco/src/config.rs
Expand Up @@ -13,6 +13,10 @@ lazy_static::lazy_static! {
/// Localhost binding to any available port, i.e. `127.0.0.1:0`.
pub static ref LOCALHOST_ANY: SocketAddr =
SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 0));

/// Binds to all local interfaces and any available port.
pub static ref INADDR_ANY: SocketAddr =
SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(0, 0, 0, 0), 0));
}

/// The environment variable that points to where librad data lives.
Expand Down

0 comments on commit 91c1f19

Please sign in to comment.