start work on prudp v0
This commit is contained in:
parent
5954ea434c
commit
4d4fc6c7bf
10 changed files with 160 additions and 7 deletions
32
Cargo.lock
generated
32
Cargo.lock
generated
|
|
@ -395,6 +395,16 @@ dependencies = [
|
|||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "macros"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/RusticMaple/VByteMacros#e2f31bded8c5591e847ba03faf79ae0351e43e69"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "md-5"
|
||||
version = "0.10.6"
|
||||
|
|
@ -536,6 +546,13 @@ dependencies = [
|
|||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prudpv0"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"rnex-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prudpv1"
|
||||
version = "0.1.0"
|
||||
|
|
@ -551,7 +568,7 @@ dependencies = [
|
|||
"thiserror",
|
||||
"tokio",
|
||||
"typenum",
|
||||
"v-byte-helpers",
|
||||
"v-byte-helpers 0.1.1 (git+https://github.com/RusticMaple/VByteMacros)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -648,7 +665,7 @@ dependencies = [
|
|||
"tokio",
|
||||
"typenum",
|
||||
"ureq",
|
||||
"v-byte-helpers",
|
||||
"v-byte-helpers 0.1.1 (git+https://github.com/DJMrTV/VByteMacros)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -958,7 +975,16 @@ version = "0.1.1"
|
|||
source = "git+https://github.com/DJMrTV/VByteMacros#e2f31bded8c5591e847ba03faf79ae0351e43e69"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"macros 0.1.1",
|
||||
"macros 0.1.1 (git+https://github.com/DJMrTV/VByteMacros)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "v-byte-helpers"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/RusticMaple/VByteMacros#e2f31bded8c5591e847ba03faf79ae0351e43e69"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"macros 0.1.1 (git+https://github.com/RusticMaple/VByteMacros)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
|||
|
|
@ -3,5 +3,6 @@ resolver = "3"
|
|||
members = [
|
||||
"macros",
|
||||
"rnex-core",
|
||||
"prudpv1"
|
||||
]
|
||||
"prudpv1",
|
||||
"prudpv0"
|
||||
]
|
||||
|
|
|
|||
61
flake.lock
generated
Normal file
61
flake.lock
generated
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1767609335,
|
||||
"narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "250481aafeb741edfe23d29195671c19b36b6dca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1767640445,
|
||||
"narHash": "sha256-UWYqmD7JFBEDBHWYcqE6s6c77pWdcU/i+bwD6XxMb8A=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9f0c42f8bc7151b8e7e5840fb3bd454ad850d8c5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1765674936,
|
||||
"narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
28
flake.nix
Normal file
28
flake.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
description = "rust nex server";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
perSystem =
|
||||
{ pkgs, lib, ... }:
|
||||
rec {
|
||||
devShells.default = import ./shell.nix { inherit pkgs; };
|
||||
};
|
||||
};
|
||||
}
|
||||
BIN
perf.data
Normal file
BIN
perf.data
Normal file
Binary file not shown.
7
prudpv0/Cargo.toml
Normal file
7
prudpv0/Cargo.toml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[package]
|
||||
name = "prudpv0"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
rnex-core = { path = "../rnex-core", version = "0.1.1" }
|
||||
0
prudpv0/src/lib.rs
Normal file
0
prudpv0/src/lib.rs
Normal file
|
|
@ -9,7 +9,7 @@ tokio = { version = "1.47.0", features = ["full"] }
|
|||
hmac = "0.12.1"
|
||||
md-5 = "^0.10.6"
|
||||
rc4 = "0.1.0"
|
||||
v-byte-helpers = { git = "https://github.com/DJMrTV/VByteMacros", version = "0.1.1" }
|
||||
v-byte-helpers = { git = "https://github.com/RusticMaple/VByteMacros", version = "0.1.1" }
|
||||
thiserror = "2.0.12"
|
||||
log = "0.4.27"
|
||||
async-trait = "0.1.88"
|
||||
|
|
@ -23,4 +23,4 @@ path = "src/executables/proxy_insecure.rs"
|
|||
|
||||
[[bin]]
|
||||
name = "proxy_secure"
|
||||
path = "src/executables/proxy_secure.rs"
|
||||
path = "src/executables/proxy_secure.rs"
|
||||
|
|
|
|||
12
prudpv1/src/prudp/packet/v1/sanity_checks.rs
Normal file
12
prudpv1/src/prudp/packet/v1/sanity_checks.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
//! # PRUDPV1 Feature sanity checks
|
||||
//!
|
||||
//! Checks wether the set features are actually sensical or wether they are
|
||||
//! nonsense and throws a compiler error incase of nonsense
|
||||
|
||||
#[cfg(feature = "friends")]
|
||||
compile_error!(
|
||||
"friends uses prudpv0 instead of prudpv1, please do not enable both at the same time"
|
||||
);
|
||||
|
||||
#[cfg(feature = "prudpv0")]
|
||||
compile_error!("you cannot enable two prudp versions at the same time");
|
||||
18
shell.nix
Normal file
18
shell.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
pkg ? pkgs.callPackage ./. { },
|
||||
}:
|
||||
pkgs.mkShell {
|
||||
# Get dependencies from the main package
|
||||
# inputsFrom = [ pkg ];
|
||||
# Additional tooling
|
||||
buildInputs = with pkgs; [
|
||||
cargo
|
||||
rust-analyzer # LSP Server
|
||||
rustfmt # Formatter
|
||||
clippy # Linter
|
||||
podman
|
||||
yq
|
||||
jq
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue