Skip to content

Commit 1fa8ae7

Browse files
Release video call daemon (#176)
1 parent c924c7a commit 1fa8ae7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+460
-239
lines changed

.github/workflows/cut-video-daemon-dev.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
tags:
99
- '*'
1010
paths:
11-
- 'video-daemon/**'
11+
- 'videocall-daemon/**'
1212

1313
jobs:
1414
build_and_package:
@@ -33,10 +33,10 @@ jobs:
3333
- name: Build and Create DEB Package
3434
run: |
3535
cargo install cargo-deb
36-
cd video-daemon
36+
cd videocall-daemon
3737
cargo deb
3838
3939
- uses: actions/upload-artifact@v2
4040
with:
41-
name: video-daemon.deb
42-
path: video-daemon/target/debian/*.deb
41+
name: videocall-daemon.deb
42+
path: videocall-daemon/target/debian/*.deb

Cargo.lock

+29-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ resolver = "2"
33
members = [
44
"actix-api",
55
"bot",
6-
"types",
6+
"videocall-types",
77
"videocall-client"
88
]
99
exclude = [
1010
"src-tauri",
11-
"video-daemon",
11+
"videocall-daemon",
1212
"yew-ui",
13-
"leptos-website"
13+
"leptos-website",
1414
]
1515

Dockerfile.video-daemon

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN apt-get update && \
2727
apt-get install -y pkg-config libvpx-dev && \
2828
apt-get clean
2929

30-
COPY --from=build /app/target/release/video-daemon /usr/bin/
30+
COPY --from=build /app/target/release/videocall-daemon /usr/bin/
3131

32-
CMD ["video-daemon"]
32+
CMD ["videocall-daemon"]
3333

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Security Union
3+
Copyright (c) 2024 Security Union
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

actix-api/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ tokio = { version = "1.28.2", features = ["full"] }
5050
tracing = "0.1.37"
5151
tracing-subscriber = { version = "0.3.17", features = ["fmt", "ansi", "env-filter", "time", "tracing-log"] }
5252
tracing-tree = "0.2.3"
53-
types = { path= "../types"}
53+
videocall-types = { path= "../videocall-types"}
5454
urlencoding = "2.1.3"
5555
uuid = { version = "0.8", features = ["serde", "v4"] }
5656
web-transport-quinn = "0.3.1"

actix-api/src/bin/websocket_server.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use sec_api::{
2525
models::{AppConfig, AppState},
2626
};
2727
use tracing::{debug, error, info};
28-
use types::truthy;
28+
use videocall_types::truthy;
2929

3030
const SCOPE: &str = "email%20profile%20openid";
3131
/**

actix-api/src/webtransport/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ use std::{fs, io};
1111
use std::{net::SocketAddr, path::PathBuf, sync::Arc};
1212
use tokio::sync::{watch, RwLock};
1313
use tracing::{error, info, trace_span};
14-
use types::protos::connection_packet::ConnectionPacket;
15-
use types::protos::packet_wrapper::packet_wrapper::PacketType;
16-
use types::protos::packet_wrapper::PacketWrapper;
14+
use videocall_types::protos::connection_packet::ConnectionPacket;
15+
use videocall_types::protos::packet_wrapper::packet_wrapper::PacketType;
16+
use videocall_types::protos::packet_wrapper::PacketWrapper;
1717
use web_transport_quinn::Session;
1818

1919
pub const WEB_TRANSPORT_ALPN: &[&[u8]] = &[b"h3", b"h3-32", b"h3-31", b"h3-30", b"h3-29"];

bot/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ serde = "1.0.130"
1010
serde_json = "1.0.72"
1111
rand = "0.8.5"
1212
futures = "0.3.16"
13-
types = { path= "../types"}
14-
protobuf = "3.2.0"
13+
videocall-types = { path= "../videocall-types"}
14+
protobuf = "3.3.0"
1515
chrono = "0.4.25"
1616
dotenv = "0.15.0"
1717

bot/src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ use rand::Rng;
77
use std::env;
88
use tokio::task::JoinHandle;
99
use tokio_tungstenite::{connect_async, tungstenite::Message};
10-
use types::protos::media_packet::media_packet::MediaType;
11-
use types::protos::media_packet::MediaPacket;
1210
use url::Url;
11+
use videocall_types::protos::media_packet::media_packet::MediaType;
12+
use videocall_types::protos::media_packet::MediaPacket;
1313

1414
#[tokio::main]
1515
async fn main() {

cut_build_push_video_daemon.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22
set -e
33

4-
IMAGE_URL=securityunion/video-daemon:staging
4+
IMAGE_URL=securityunion/videocall-daemon:staging
55
echo "Building image $IMAGE_URL"
66

7-
if ! docker build -t $IMAGE_URL . --file Dockerfile.video-daemon; then
7+
if ! docker build -t $IMAGE_URL . --file Dockerfile.videocall-daemon; then
88
echo "Failed to build docker image"
99
else
1010
docker push $IMAGE_URL

protobuf/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ build/rust:
2020

2121
.PHONY: generate_rust
2222
generate_rust: build/rust
23-
protoc --rust_out=build/rust types/*.proto
23+
protoc --rs_out=build/rust types/*.proto
2424

2525
.PHONY: build-env-rust
2626
build-env-rust:
@@ -30,7 +30,7 @@ build-env-rust:
3030

3131
build-env-generate-rust:
3232
$(DOCKER_RUN_RUST_CMD) make generate_rust
33-
mv build/rust/* ../types/src/protos
33+
mv build/rust/* ../videocall-types/src/protos
3434

3535
.PHONY: build
3636
build:

protobuf/build-env-rust.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN apt-get update && \
1010
curl \
1111
protobuf-compiler
1212

13-
RUN cargo install protobuf-codegen --vers 3.3.0
13+
RUN cargo install protobuf-codegen --vers 3.7.1
1414

1515
RUN useradd --create-home $USER --uid $UID && \
1616
adduser $USER sudo && \

types/Cargo.toml

-12
This file was deleted.

videocall-client/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ gloo-timers = "0.2.6"
1515
gloo-utils = "0.1"
1616
js-sys = "0.3"
1717
log = "0.4.19"
18-
protobuf = "3.2.0"
18+
protobuf = "3.3.0"
1919
rand = { version = "0.8.5", features = ["std_rng", "small_rng"] }
2020
rsa = "0.9.2"
21-
types = { path= "../types"}
21+
videocall-types = { path= "../videocall-types"}
2222
wasm-bindgen = "0.2.78"
2323
wasm-bindgen-futures = "0.4.30"
2424
yew = { version = "0.21" }

videocall-client/src/client/video_call_client.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ use rsa::pkcs8::{DecodePublicKey, EncodePublicKey};
99
use rsa::RsaPublicKey;
1010
use std::cell::RefCell;
1111
use std::rc::{Rc, Weak};
12-
use types::protos::aes_packet::AesPacket;
13-
use types::protos::media_packet::media_packet::MediaType;
14-
use types::protos::packet_wrapper::packet_wrapper::PacketType;
15-
use types::protos::packet_wrapper::PacketWrapper;
16-
use types::protos::rsa_packet::RsaPacket;
12+
use videocall_types::protos::aes_packet::AesPacket;
13+
use videocall_types::protos::media_packet::media_packet::MediaType;
14+
use videocall_types::protos::packet_wrapper::packet_wrapper::PacketType;
15+
use videocall_types::protos::packet_wrapper::PacketWrapper;
16+
use videocall_types::protos::rsa_packet::RsaPacket;
1717
use wasm_bindgen::JsValue;
1818
use yew::prelude::Callback;
1919

videocall-client/src/connection/connection.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use gloo::timers::callback::Interval;
99
use protobuf::Message;
1010
use std::cell::Cell;
1111
use std::rc::Rc;
12-
use types::protos::media_packet::media_packet::MediaType;
13-
use types::protos::media_packet::MediaPacket;
14-
use types::protos::packet_wrapper::packet_wrapper::PacketType;
15-
use types::protos::packet_wrapper::PacketWrapper;
12+
use videocall_types::protos::media_packet::media_packet::MediaType;
13+
use videocall_types::protos::media_packet::MediaPacket;
14+
use videocall_types::protos::packet_wrapper::packet_wrapper::PacketType;
15+
use videocall_types::protos::packet_wrapper::PacketWrapper;
1616
use yew::prelude::Callback;
1717

1818
#[derive(Clone, Copy, Debug)]

videocall-client/src/connection/task.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Handles rollover of connection from WebTransport to WebSocket
55
//
66
use log::{debug, error};
7-
use types::protos::packet_wrapper::PacketWrapper;
7+
use videocall_types::protos::packet_wrapper::PacketWrapper;
88
use yew_websocket::websocket::WebSocketTask;
99
use yew_webtransport::webtransport::WebTransportTask;
1010

videocall-client/src/connection/webmedia.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//
66
use log::error;
77
use protobuf::Message;
8-
use types::protos::packet_wrapper::PacketWrapper;
8+
use videocall_types::protos::packet_wrapper::PacketWrapper;
99
use wasm_bindgen::JsValue;
1010
use yew::prelude::Callback;
1111

videocall-client/src/connection/webtransport.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use log::debug;
1212
use log::error;
1313
use log::info;
1414
use protobuf::Message;
15-
use types::protos::packet_wrapper::PacketWrapper;
15+
use videocall_types::protos::packet_wrapper::PacketWrapper;
1616
use wasm_bindgen::JsCast;
1717
use wasm_bindgen_futures::JsFuture;
1818
use web_sys::ReadableStreamDefaultReader;

videocall-client/src/decode/peer_decode_manager.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ use super::hash_map_with_ordered_keys::HashMapWithOrderedKeys;
22
use log::debug;
33
use protobuf::Message;
44
use std::{fmt::Display, sync::Arc};
5-
use types::protos::media_packet::MediaPacket;
6-
use types::protos::packet_wrapper::packet_wrapper::PacketType;
7-
use types::protos::{media_packet::media_packet::MediaType, packet_wrapper::PacketWrapper};
5+
use videocall_types::protos::media_packet::MediaPacket;
6+
use videocall_types::protos::packet_wrapper::packet_wrapper::PacketType;
7+
use videocall_types::protos::{
8+
media_packet::media_packet::MediaType, packet_wrapper::PacketWrapper,
9+
};
810
use yew::prelude::Callback;
911

1012
use crate::crypto::aes::Aes128State;

videocall-client/src/decode/peer_decoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::constants::AUDIO_SAMPLE_RATE;
2020
use crate::constants::VIDEO_CODEC;
2121
use log::error;
2222
use std::sync::Arc;
23-
use types::protos::media_packet::MediaPacket;
23+
use videocall_types::protos::media_packet::MediaPacket;
2424
use wasm_bindgen::prelude::Closure;
2525
use wasm_bindgen::JsCast;
2626
use wasm_bindgen::JsValue;

0 commit comments

Comments
 (0)