mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-11-22 08:56:58 -06:00
Merge branch 'veilidchat-work' into 'main'
0.1.4 See merge request veilid/veilid!90
This commit is contained in:
commit
57b5de0639
@ -1,5 +1,5 @@
|
||||
[bumpversion]
|
||||
current_version = 0.1.3
|
||||
current_version = 0.1.4
|
||||
|
||||
[bumpversion:file:veilid-server/Cargo.toml]
|
||||
search = name = "veilid-server"
|
||||
|
24
Cargo.lock
generated
24
Cargo.lock
generated
@ -4380,9 +4380,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.171"
|
||||
version = "1.0.173"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9"
|
||||
checksum = "e91f70896d6720bc714a4a57d22fc91f1db634680e65c8efe13323f1fa38d53f"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
@ -4408,9 +4408,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.171"
|
||||
version = "1.0.173"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682"
|
||||
checksum = "a6250dde8342e0232232be9ca3db7aa40aceb5a3e5dd9bddbc00d99a007cde49"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -5627,7 +5627,7 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
||||
|
||||
[[package]]
|
||||
name = "veilid-cli"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"arboard",
|
||||
"async-std",
|
||||
@ -5663,7 +5663,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "veilid-core"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"argon2",
|
||||
"async-io",
|
||||
@ -5766,7 +5766,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "veilid-flutter"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"allo-isolate",
|
||||
"async-std",
|
||||
@ -5795,7 +5795,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "veilid-server"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
"async-std",
|
||||
@ -5845,7 +5845,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "veilid-tools"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"android-logd-logger",
|
||||
"async-lock",
|
||||
@ -5896,7 +5896,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "veilid-wasm"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"console_error_panic_hook",
|
||||
@ -6515,9 +6515,9 @@ checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a"
|
||||
|
||||
[[package]]
|
||||
name = "xml-rs"
|
||||
version = "0.8.15"
|
||||
version = "0.8.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a56c84a8ccd4258aed21c92f70c0f6dea75356b6892ae27c24139da456f9336"
|
||||
checksum = "47430998a7b5d499ccee752b41567bc3afc57e1327dc855b1a2aa44ce29b5fa1"
|
||||
|
||||
[[package]]
|
||||
name = "xmltree"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "veilid-cli"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
authors = ["Veilid Team <contact@veilid.com>"]
|
||||
edition = "2021"
|
||||
license = "MPL-2.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "veilid-core"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
authors = ["Veilid Team <contact@veilid.com>"]
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
@ -1046,11 +1046,17 @@ impl NetworkManager {
|
||||
};
|
||||
|
||||
if let Some(relay_nr) = some_relay_nr {
|
||||
// Ensure the protocol is forwarded exactly as is
|
||||
// Ensure the protocol used to forward is of the same sequencing requirement
|
||||
// Address type is allowed to change if connectivity is better
|
||||
let relay_nr = relay_nr.filtered_clone(
|
||||
NodeRefFilter::new().with_protocol_type(connection_descriptor.protocol_type()),
|
||||
);
|
||||
let relay_nr = if connection_descriptor.protocol_type().is_ordered() {
|
||||
// XXX: this is a little redundant
|
||||
let (_, nrf) = NodeRefFilter::new().with_sequencing(Sequencing::EnsureOrdered);
|
||||
let mut relay_nr = relay_nr.filtered_clone(nrf);
|
||||
relay_nr.set_sequencing(Sequencing::EnsureOrdered);
|
||||
relay_nr
|
||||
} else {
|
||||
relay_nr
|
||||
};
|
||||
|
||||
// Relay the packet to the desired destination
|
||||
log_net!("relaying {} bytes to {}", data.len(), relay_nr);
|
||||
|
@ -103,7 +103,7 @@ impl NetworkManager {
|
||||
target_node_ref: NodeRef,
|
||||
data: Vec<u8>,
|
||||
) -> EyreResult<NetworkResult<SendDataKind>> {
|
||||
// First try to send data to the last socket we've seen this peer on
|
||||
// First try to send data to the last connection we've seen this peer on
|
||||
let Some(connection_descriptor) = target_node_ref.last_connection() else {
|
||||
return Ok(NetworkResult::no_connection_other(
|
||||
format!("should have found an existing connection: {}", target_node_ref)
|
||||
@ -149,7 +149,7 @@ impl NetworkManager {
|
||||
.is_some()
|
||||
{
|
||||
return Ok(NetworkResult::no_connection_other(
|
||||
format!("failed to send to existing connection: {:?}", connection_descriptor)
|
||||
format!("failed to send to unreachable node over existing connection: {:?}", connection_descriptor)
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -43,12 +43,24 @@ impl RoutingTable {
|
||||
.set_relay_node_keepalive(Some(cur_ts))
|
||||
.commit();
|
||||
|
||||
// We need to keep-alive at one connection per ordering for relays
|
||||
// but also one per NAT mapping that we need to keep open for our inbound dial info
|
||||
let mut got_unordered = false;
|
||||
let mut got_ordered = false;
|
||||
|
||||
// Look up any NAT mappings we may need to try to preserve with keepalives
|
||||
let mut mapped_port_info = self.get_low_level_port_info();
|
||||
|
||||
// Relay nodes get pinged over all protocols we have inbound dialinfo for
|
||||
// This is so we can preserve the inbound NAT mappings at our router
|
||||
let mut relay_noderefs = vec![];
|
||||
for did in &dids {
|
||||
// Can skip the ones that are direct, those are not mapped or natted
|
||||
// because we can have both direct and natted dialinfo on the same
|
||||
// node, for example ipv4 can be natted, while ipv6 is direct
|
||||
if did.class == DialInfoClass::Direct {
|
||||
continue;
|
||||
}
|
||||
// Do we need to do this ping?
|
||||
// Check if we have already pinged over this low-level-protocol/address-type/port combo
|
||||
// We want to ensure we do the bare minimum required here
|
||||
@ -62,16 +74,35 @@ impl RoutingTable {
|
||||
} else {
|
||||
false
|
||||
};
|
||||
if !needs_ping_for_protocol {
|
||||
continue;
|
||||
if needs_ping_for_protocol {
|
||||
if pt.is_ordered() {
|
||||
got_ordered = true;
|
||||
} else {
|
||||
got_unordered = true;
|
||||
}
|
||||
let dif = did.dial_info.make_filter();
|
||||
let relay_nr_filtered =
|
||||
relay_nr.filtered_clone(NodeRefFilter::new().with_dial_info_filter(dif));
|
||||
relay_noderefs.push(relay_nr_filtered);
|
||||
}
|
||||
}
|
||||
// Add noderef filters for ordered or unordered sequencing if we havent already seen those
|
||||
if !got_ordered {
|
||||
let (_, nrf) = NodeRefFilter::new().with_sequencing(Sequencing::EnsureOrdered);
|
||||
let mut relay_nr_filtered = relay_nr.filtered_clone(nrf);
|
||||
relay_nr_filtered.set_sequencing(Sequencing::EnsureOrdered);
|
||||
relay_noderefs.push(relay_nr_filtered);
|
||||
}
|
||||
if !got_unordered {
|
||||
relay_noderefs.push(relay_nr);
|
||||
}
|
||||
|
||||
for relay_nr_filtered in relay_noderefs {
|
||||
let rpc = rpc.clone();
|
||||
let dif = did.dial_info.make_filter();
|
||||
let relay_nr_filtered =
|
||||
relay_nr.filtered_clone(NodeRefFilter::new().with_dial_info_filter(dif));
|
||||
|
||||
//#[cfg(feature = "network-result-extra")]
|
||||
#[cfg(feature = "network-result-extra")]
|
||||
log_rtab!(debug "--> Keepalive ping to {:?}", relay_nr_filtered);
|
||||
#[cfg(not(feature = "network-result-extra"))]
|
||||
log_rtab!("--> Keepalive ping to {:?}", relay_nr_filtered);
|
||||
|
||||
unord.push(
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: veilid
|
||||
version: 0.1.3
|
||||
version: 0.1.4
|
||||
description: Veilid Framework
|
||||
homepage: https://veilid.com
|
||||
publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "veilid-flutter"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
authors = ["Veilid Team <contact@veilid.com>"]
|
||||
license = "MPL-2.0"
|
||||
edition = "2021"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "veilid"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
description = ""
|
||||
authors = ["Veilid Team <contact@veilid.com>"]
|
||||
readme = "README.md"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "veilid-server"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
authors = ["Veilid Team <contact@veilid.com>"]
|
||||
license = "MPL-2.0"
|
||||
edition = "2021"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "veilid-tools"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
authors = ["Veilid Team <contact@veilid.com>"]
|
||||
license = "MPL-2.0"
|
||||
edition = "2021"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "veilid-wasm"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
authors = ["Veilid Team <contact@veilid.com>"]
|
||||
license = "MPL-2.0"
|
||||
edition = "2021"
|
||||
|
Loading…
Reference in New Issue
Block a user