Migrated to TTP.

This commit is contained in:
Ben Markendorf 2026-03-19 22:32:48 +01:00
commit 5831ec10ed
4 changed files with 35 additions and 35 deletions

56
Cargo.lock generated
View file

@ -13,8 +13,6 @@ dependencies = [
"base64", "base64",
"dashmap", "dashmap",
"dotenv", "dotenv",
"epsilon-core",
"epsilon-native",
"hex", "hex",
"hkdf", "hkdf",
"json", "json",
@ -30,6 +28,8 @@ dependencies = [
"strum_macros 0.27.2", "strum_macros 0.27.2",
"thiserror 2.0.18", "thiserror 2.0.18",
"tokio", "tokio",
"ttp-core",
"ttp-native",
"uuid", "uuid",
"x448", "x448",
"zip", "zip",
@ -1023,32 +1023,6 @@ dependencies = [
"cfg-if", "cfg-if",
] ]
[[package]]
name = "epsilon-core"
version = "0.1.0"
source = "git+https://github.com/Tensamin/Epsilon.git#d5edc693a91954834a38c39517b79092983eac5c"
dependencies = [
"base64",
"byteorder",
"rand 0.8.5",
"strum 0.28.0",
"strum_macros 0.28.0",
]
[[package]]
name = "epsilon-native"
version = "0.1.0"
source = "git+https://github.com/Tensamin/Epsilon.git#d5edc693a91954834a38c39517b79092983eac5c"
dependencies = [
"epsilon-core",
"quinn",
"rustls",
"rustls-native-certs",
"thiserror 2.0.18",
"tokio",
"wtransport",
]
[[package]] [[package]]
name = "equivalent" name = "equivalent"
version = "1.0.2" version = "1.0.2"
@ -3510,6 +3484,32 @@ version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "ttp-core"
version = "0.1.0"
source = "git+https://github.com/t3kkm0tt/ttp.git#8a3cd5cea756d62e7f85824ebfa1e64c7594c7de"
dependencies = [
"base64",
"byteorder",
"rand 0.8.5",
"strum 0.28.0",
"strum_macros 0.28.0",
]
[[package]]
name = "ttp-native"
version = "0.1.0"
source = "git+https://github.com/t3kkm0tt/ttp.git#8a3cd5cea756d62e7f85824ebfa1e64c7594c7de"
dependencies = [
"quinn",
"rustls",
"rustls-native-certs",
"thiserror 2.0.18",
"tokio",
"ttp-core",
"wtransport",
]
[[package]] [[package]]
name = "typenum" name = "typenum"
version = "1.19.0" version = "1.19.0"

View file

@ -4,8 +4,8 @@ version = "0.1.0"
edition = "2024" edition = "2024"
[dependencies] [dependencies]
epsilon-core = { git = "https://github.com/Tensamin/Epsilon.git", package = "epsilon-core" } ttp-core = { git = "https://github.com/Tensamin/ttp.git", package = "ttp-core" }
epsilon-native = { git = "https://github.com/Tensamin/Epsilon.git", package = "epsilon-native" } ttp-native = { git = "https://github.com/Tensamin/ttp.git", package = "ttp-native" }
actix-web = { version = "4.12.1", features = ["rustls-0_23"] } actix-web = { version = "4.12.1", features = ["rustls-0_23"] }
aes-gcm = "*" aes-gcm = "*"

View file

@ -11,8 +11,6 @@ use crate::{
}; };
use base64::{Engine as _, engine::general_purpose::STANDARD}; use base64::{Engine as _, engine::general_purpose::STANDARD};
use dashmap::DashMap; use dashmap::DashMap;
use epsilon_core::{CommunicationType, CommunicationValue, DataTypes, DataValue};
use epsilon_native::{Host, Receiver, Sender};
use rand::{Rng, distributions::Alphanumeric}; use rand::{Rng, distributions::Alphanumeric};
use std::{ use std::{
sync::Arc, sync::Arc,
@ -22,6 +20,8 @@ use tokio::{
sync::{Mutex, RwLock}, sync::{Mutex, RwLock},
time::interval, time::interval,
}; };
use ttp_core::{CommunicationType, CommunicationValue, DataTypes, DataValue};
use ttp_native::{Host, Receiver, Sender};
use x448::PublicKey; use x448::PublicKey;
// ============================================================================ // ============================================================================
@ -92,7 +92,7 @@ impl AuthState {
} }
// ============================================================================ // ============================================================================
// Omikron Connection (Epsilon/QUIC-based) // Omikron Connection (ttp/QUIC-based)
// ============================================================================ // ============================================================================
pub struct OmikronConnection { pub struct OmikronConnection {
@ -1125,7 +1125,7 @@ pub async fn start(port: u16) -> Result<(), Box<dyn std::error::Error>> {
let key_pem = load_file_vec("certs", "transport_key.pem").expect("Error loading Keyfile"); let key_pem = load_file_vec("certs", "transport_key.pem").expect("Error loading Keyfile");
let mut host: Host = epsilon_native::host(port, cert_pem, key_pem).await?; let mut host: Host = ttp_native::host(port, cert_pem, key_pem).await?;
log!("OmikronServer listening on port {}", port); log!("OmikronServer listening on port {}", port);
while let Some((sender, mut receiver)) = host.next().await { while let Some((sender, mut receiver)) = host.next().await {

View file

@ -9,8 +9,8 @@ use std::{
}; };
use ansi_term::Color; use ansi_term::Color;
use epsilon_core::{CommunicationValue, DataTypes, DataValue};
use json::JsonValue; use json::JsonValue;
use ttp_core::{CommunicationValue, DataTypes, DataValue};
static LOGGER: OnceLock<mpsc::Sender<LogMessage>> = OnceLock::new(); static LOGGER: OnceLock<mpsc::Sender<LogMessage>> = OnceLock::new();