Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release video call daemon #176

Merged
merged 17 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/cut-video-daemon-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
tags:
- '*'
paths:
- 'video-daemon/**'
- 'videocall-daemon/**'

jobs:
build_and_package:
Expand All @@ -33,10 +33,10 @@ jobs:
- name: Build and Create DEB Package
run: |
cargo install cargo-deb
cd video-daemon
cd videocall-daemon
cargo deb

- uses: actions/upload-artifact@v2
with:
name: video-daemon.deb
path: video-daemon/target/debian/*.deb
name: videocall-daemon.deb
path: videocall-daemon/target/debian/*.deb
50 changes: 29 additions & 21 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ resolver = "2"
members = [
"actix-api",
"bot",
"types",
"videocall-types",
"videocall-client"
]
exclude = [
"src-tauri",
"video-daemon",
"videocall-daemon",
"yew-ui",
"leptos-website"
"leptos-website",
]

4 changes: 2 additions & 2 deletions Dockerfile.video-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN apt-get update && \
apt-get install -y pkg-config libvpx-dev && \
apt-get clean

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

CMD ["video-daemon"]
CMD ["videocall-daemon"]

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Security Union
Copyright (c) 2024 Security Union

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion actix-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tokio = { version = "1.28.2", features = ["full"] }
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.17", features = ["fmt", "ansi", "env-filter", "time", "tracing-log"] }
tracing-tree = "0.2.3"
types = { path= "../types"}
videocall-types = { path= "../videocall-types"}
urlencoding = "2.1.3"
uuid = { version = "0.8", features = ["serde", "v4"] }
web-transport-quinn = "0.3.1"
Expand Down
2 changes: 1 addition & 1 deletion actix-api/src/bin/websocket_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use sec_api::{
models::{AppConfig, AppState},
};
use tracing::{debug, error, info};
use types::truthy;
use videocall_types::truthy;

const SCOPE: &str = "email%20profile%20openid";
/**
Expand Down
6 changes: 3 additions & 3 deletions actix-api/src/webtransport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ use std::{fs, io};
use std::{net::SocketAddr, path::PathBuf, sync::Arc};
use tokio::sync::{watch, RwLock};
use tracing::{error, info, trace_span};
use types::protos::connection_packet::ConnectionPacket;
use types::protos::packet_wrapper::packet_wrapper::PacketType;
use types::protos::packet_wrapper::PacketWrapper;
use videocall_types::protos::connection_packet::ConnectionPacket;
use videocall_types::protos::packet_wrapper::packet_wrapper::PacketType;
use videocall_types::protos::packet_wrapper::PacketWrapper;
use web_transport_quinn::Session;

pub const WEB_TRANSPORT_ALPN: &[&[u8]] = &[b"h3", b"h3-32", b"h3-31", b"h3-30", b"h3-29"];
Expand Down
4 changes: 2 additions & 2 deletions bot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ serde = "1.0.130"
serde_json = "1.0.72"
rand = "0.8.5"
futures = "0.3.16"
types = { path= "../types"}
protobuf = "3.2.0"
videocall-types = { path= "../videocall-types"}
protobuf = "3.3.0"
chrono = "0.4.25"
dotenv = "0.15.0"

Expand Down
4 changes: 2 additions & 2 deletions bot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use rand::Rng;
use std::env;
use tokio::task::JoinHandle;
use tokio_tungstenite::{connect_async, tungstenite::Message};
use types::protos::media_packet::media_packet::MediaType;
use types::protos::media_packet::MediaPacket;
use url::Url;
use videocall_types::protos::media_packet::media_packet::MediaType;
use videocall_types::protos::media_packet::MediaPacket;

#[tokio::main]
async fn main() {
Expand Down
4 changes: 2 additions & 2 deletions cut_build_push_video_daemon.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
set -e

IMAGE_URL=securityunion/video-daemon:staging
IMAGE_URL=securityunion/videocall-daemon:staging
echo "Building image $IMAGE_URL"

if ! docker build -t $IMAGE_URL . --file Dockerfile.video-daemon; then
if ! docker build -t $IMAGE_URL . --file Dockerfile.videocall-daemon; then
echo "Failed to build docker image"
else
docker push $IMAGE_URL
Expand Down
4 changes: 2 additions & 2 deletions protobuf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ build/rust:

.PHONY: generate_rust
generate_rust: build/rust
protoc --rust_out=build/rust types/*.proto
protoc --rs_out=build/rust types/*.proto

.PHONY: build-env-rust
build-env-rust:
Expand All @@ -30,7 +30,7 @@ build-env-rust:

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

.PHONY: build
build:
Expand Down
2 changes: 1 addition & 1 deletion protobuf/build-env-rust.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN apt-get update && \
curl \
protobuf-compiler

RUN cargo install protobuf-codegen --vers 3.3.0
RUN cargo install protobuf-codegen --vers 3.7.1

RUN useradd --create-home $USER --uid $UID && \
adduser $USER sudo && \
Expand Down
12 changes: 0 additions & 12 deletions types/Cargo.toml

This file was deleted.

4 changes: 2 additions & 2 deletions videocall-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ gloo-timers = "0.2.6"
gloo-utils = "0.1"
js-sys = "0.3"
log = "0.4.19"
protobuf = "3.2.0"
protobuf = "3.3.0"
rand = { version = "0.8.5", features = ["std_rng", "small_rng"] }
rsa = "0.9.2"
types = { path= "../types"}
videocall-types = { path= "../videocall-types"}
wasm-bindgen = "0.2.78"
wasm-bindgen-futures = "0.4.30"
yew = { version = "0.21" }
Expand Down
10 changes: 5 additions & 5 deletions videocall-client/src/client/video_call_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ use rsa::pkcs8::{DecodePublicKey, EncodePublicKey};
use rsa::RsaPublicKey;
use std::cell::RefCell;
use std::rc::{Rc, Weak};
use types::protos::aes_packet::AesPacket;
use types::protos::media_packet::media_packet::MediaType;
use types::protos::packet_wrapper::packet_wrapper::PacketType;
use types::protos::packet_wrapper::PacketWrapper;
use types::protos::rsa_packet::RsaPacket;
use videocall_types::protos::aes_packet::AesPacket;
use videocall_types::protos::media_packet::media_packet::MediaType;
use videocall_types::protos::packet_wrapper::packet_wrapper::PacketType;
use videocall_types::protos::packet_wrapper::PacketWrapper;
use videocall_types::protos::rsa_packet::RsaPacket;
use wasm_bindgen::JsValue;
use yew::prelude::Callback;

Expand Down
8 changes: 4 additions & 4 deletions videocall-client/src/connection/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ use gloo::timers::callback::Interval;
use protobuf::Message;
use std::cell::Cell;
use std::rc::Rc;
use types::protos::media_packet::media_packet::MediaType;
use types::protos::media_packet::MediaPacket;
use types::protos::packet_wrapper::packet_wrapper::PacketType;
use types::protos::packet_wrapper::PacketWrapper;
use videocall_types::protos::media_packet::media_packet::MediaType;
use videocall_types::protos::media_packet::MediaPacket;
use videocall_types::protos::packet_wrapper::packet_wrapper::PacketType;
use videocall_types::protos::packet_wrapper::PacketWrapper;
use yew::prelude::Callback;

#[derive(Clone, Copy, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion videocall-client/src/connection/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Handles rollover of connection from WebTransport to WebSocket
//
use log::{debug, error};
use types::protos::packet_wrapper::PacketWrapper;
use videocall_types::protos::packet_wrapper::PacketWrapper;
use yew_websocket::websocket::WebSocketTask;
use yew_webtransport::webtransport::WebTransportTask;

Expand Down
2 changes: 1 addition & 1 deletion videocall-client/src/connection/webmedia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//
use log::error;
use protobuf::Message;
use types::protos::packet_wrapper::PacketWrapper;
use videocall_types::protos::packet_wrapper::PacketWrapper;
use wasm_bindgen::JsValue;
use yew::prelude::Callback;

Expand Down
2 changes: 1 addition & 1 deletion videocall-client/src/connection/webtransport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use log::debug;
use log::error;
use log::info;
use protobuf::Message;
use types::protos::packet_wrapper::PacketWrapper;
use videocall_types::protos::packet_wrapper::PacketWrapper;
use wasm_bindgen::JsCast;
use wasm_bindgen_futures::JsFuture;
use web_sys::ReadableStreamDefaultReader;
Expand Down
8 changes: 5 additions & 3 deletions videocall-client/src/decode/peer_decode_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ use super::hash_map_with_ordered_keys::HashMapWithOrderedKeys;
use log::debug;
use protobuf::Message;
use std::{fmt::Display, sync::Arc};
use types::protos::media_packet::MediaPacket;
use types::protos::packet_wrapper::packet_wrapper::PacketType;
use types::protos::{media_packet::media_packet::MediaType, packet_wrapper::PacketWrapper};
use videocall_types::protos::media_packet::MediaPacket;
use videocall_types::protos::packet_wrapper::packet_wrapper::PacketType;
use videocall_types::protos::{
media_packet::media_packet::MediaType, packet_wrapper::PacketWrapper,
};
use yew::prelude::Callback;

use crate::crypto::aes::Aes128State;
Expand Down
2 changes: 1 addition & 1 deletion videocall-client/src/decode/peer_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::constants::AUDIO_SAMPLE_RATE;
use crate::constants::VIDEO_CODEC;
use log::error;
use std::sync::Arc;
use types::protos::media_packet::MediaPacket;
use videocall_types::protos::media_packet::MediaPacket;
use wasm_bindgen::prelude::Closure;
use wasm_bindgen::JsCast;
use wasm_bindgen::JsValue;
Expand Down
Loading
Loading