deps: use usptream str0m (#3365)

All major upstream contributions to `str0m` have been merged, meaning we
can now discontinue the dependency on the fork.
This commit is contained in:
Thomas Eizinger
2024-01-23 15:28:55 -08:00
committed by GitHub
parent a62b8fe51b
commit 2cc68c067f
4 changed files with 24 additions and 24 deletions

View File

@@ -25,9 +25,9 @@ jobs:
- runs-on: ubuntu-22.04
packages: # Intentionally blank as a package catch-all linter
- runs-on: macos-13
packages: -p connlib-client-apple
packages: -p connlib-client-apple -p firezone-connection
- runs-on: windows-2022
packages: -p connlib-client-shared -p firezone-windows-client
packages: -p connlib-client-shared -p firezone-windows-client -p firezone-connection
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
@@ -47,17 +47,17 @@ jobs:
# TODO: https://github.com/rust-lang/cargo/issues/5220
include:
- runs-on: ubuntu-20.04
packages: -p firezone-linux-client -p firezone-gateway -p connlib-client-android
packages: -p firezone-linux-client -p firezone-gateway -p connlib-client-android -p firezone-connection
- runs-on: ubuntu-22.04
packages: -p firezone-linux-client -p firezone-gateway -p connlib-client-android
packages: -p firezone-linux-client -p firezone-gateway -p connlib-client-android -p firezone-connection
- runs-on: macos-12
packages: -p connlib-client-apple
packages: -p connlib-client-apple -p firezone-connection
- runs-on: macos-13
packages: -p connlib-client-apple
packages: -p connlib-client-apple -p firezone-connection
- runs-on: windows-2019
packages: -p firezone-windows-client -p connlib-client-shared
packages: -p firezone-windows-client -p connlib-client-shared -p firezone-connection
- runs-on: windows-2022
packages: -p firezone-windows-client -p connlib-client-shared
packages: -p firezone-windows-client -p connlib-client-shared -p firezone-connection
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4

4
rust/Cargo.lock generated
View File

@@ -6076,13 +6076,13 @@ checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0"
[[package]]
name = "str0m"
version = "0.4.1"
source = "git+https://github.com/thomaseizinger/str0m?branch=main#12575cab1c8c466cbf1e05b0b7459136eeaba8ed"
source = "git+https://github.com/algesten/str0m?branch=main#e6fa6808dfcdac23e0d1f61d405f938035e4eaf9"
dependencies = [
"combine",
"crc",
"fastrand 2.0.1",
"hmac",
"once_cell",
"rand 0.8.5",
"sctp-proto",
"serde",
"sha-1",

View File

@@ -27,7 +27,7 @@ tracing-subscriber = { version = "0.3.17", features = ["parking_lot"] }
secrecy = "0.8"
hickory-resolver = { version = "0.24", features = ["tokio-runtime"] }
webrtc = "0.9"
str0m = "0.4"
str0m = { version = "0.4", default-features = false }
futures-bounded = "0.2.1"
domain = { version = "0.9", features = ["serde"] }
dns-lookup = "2.0"
@@ -48,7 +48,7 @@ phoenix-channel = { path = "phoenix-channel"}
[patch.crates-io]
boringtun = { git = "https://github.com/cloudflare/boringtun", branch = "master" } # Contains unreleased patches we need (bump of x25519-dalek)
webrtc = { git = "https://github.com/firezone/webrtc", branch = "expose-new-endpoint" }
str0m = { git = "https://github.com/thomaseizinger/str0m", branch = "main" }
str0m = { git = "https://github.com/algesten/str0m", branch = "main" }
[profile.release]
strip = true

View File

@@ -15,9 +15,9 @@ use std::{
net::SocketAddr,
sync::Arc,
};
use str0m::ice::{IceAgent, IceAgentEvent, IceCreds};
use str0m::net::{Protocol, Receive};
use str0m::{Candidate, IceConnectionState, StunMessage};
use str0m::ice::{IceAgent, IceAgentEvent, IceCreds, StunMessage, StunPacket};
use str0m::net::Protocol;
use str0m::{Candidate, IceConnectionState};
use crate::index::IndexLfsr;
use crate::stun_binding::StunBinding;
@@ -147,17 +147,17 @@ where
}
// Next: If we can parse the message as a STUN message, cycle through all agents to check which one it is for.
if let Ok(stun_message) = StunMessage::parse(packet) {
if let Ok(message) = StunMessage::parse(packet) {
for (_, conn) in self.initial_connections.iter_mut() {
// TODO: `accepts_message` cannot demultiplexing multiple connections until https://github.com/algesten/str0m/pull/418 is merged.
if conn.agent.accepts_message(&stun_message) {
conn.agent.handle_receive(
if conn.agent.accepts_message(&message) {
conn.agent.handle_packet(
now,
Receive {
StunPacket {
proto: Protocol::Udp,
source: from,
destination: local,
contents: str0m::net::DatagramRecv::Stun(stun_message),
message,
},
);
return Ok(None);
@@ -166,14 +166,14 @@ where
for (_, conn) in self.negotiated_connections.iter_mut() {
// Would the ICE agent of this connection like to handle the packet?
if conn.agent.accepts_message(&stun_message) {
conn.agent.handle_receive(
if conn.agent.accepts_message(&message) {
conn.agent.handle_packet(
now,
Receive {
StunPacket {
proto: Protocol::Udp,
source: from,
destination: local,
contents: str0m::net::DatagramRecv::Stun(stun_message),
message,
},
);
return Ok(None);