mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-09 06:47:59 -06:00
Move manager into it's own project
This commit is contained in:
Generated
+14
-2
@@ -164,9 +164,10 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "client"
|
||||
version = "0.1.0"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"unshell-lib",
|
||||
"unshell-manager",
|
||||
"unshell-obfuscate",
|
||||
]
|
||||
|
||||
@@ -662,13 +663,24 @@ dependencies = [
|
||||
"chrono",
|
||||
"crossbeam-channel",
|
||||
"libc",
|
||||
"libloading",
|
||||
"rand",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"unshell-obfuscate",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unshell-manager"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"libc",
|
||||
"libloading",
|
||||
"rand",
|
||||
"unshell-lib",
|
||||
"unshell-obfuscate",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unshell-obfuscate"
|
||||
version = "0.0.0"
|
||||
|
||||
@@ -2,19 +2,19 @@ cargo-features = ["trim-paths", "panic-immediate-abort"]
|
||||
|
||||
[package]
|
||||
name = "client"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[features]
|
||||
log_debug = ["unshell-lib/log_debug"]
|
||||
obfuscate = ["unshell-lib/obfuscate", "unshell-obfuscate/obfuscate"]
|
||||
log_debug = ["unshell-lib/log_debug", "unshell-manager/obfuscate"]
|
||||
obfuscate = ["unshell-lib/obfuscate", "unshell-obfuscate/obfuscate", "unshell-manager/obfuscate"]
|
||||
|
||||
[dependencies]
|
||||
unshell-lib = {path = "../../unshell-lib", default-featues = false}
|
||||
unshell-obfuscate = {path = "../../unshell-obfuscate", default-featues = false}
|
||||
unshell-manager = {path = "../../unshell-manager", default-featues = false}
|
||||
|
||||
[profile.release]
|
||||
strip = true # Strip symbols from the binary
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cargo clean
|
||||
# cargo clean
|
||||
|
||||
OBFUSCATION_KEY=abc123abc \
|
||||
cargo build --release
|
||||
|
||||
@@ -8,15 +8,13 @@ use std::{
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use unshell_lib::{
|
||||
config::RuntimeConfig,
|
||||
module::Manager,
|
||||
network::{Stream, TcpStream},
|
||||
*,
|
||||
};
|
||||
use unshell_lib::{ModuleError, Result, config::RuntimeConfig, debug, error, info};
|
||||
// use unshell_modules::{Manager, ModuleRuntime};
|
||||
|
||||
use unshell_lib::ModuleRuntime;
|
||||
use unshell_manager::{
|
||||
Manager, ModuleRuntime,
|
||||
network::{Stream, TcpStream},
|
||||
};
|
||||
|
||||
pub struct ClientRuntime {
|
||||
config: &'static RuntimeConfig,
|
||||
@@ -25,7 +23,7 @@ pub struct ClientRuntime {
|
||||
}
|
||||
|
||||
impl ClientRuntime {
|
||||
pub fn new(config: &'static RuntimeConfig) -> Result<ClientRuntime, ModuleError> {
|
||||
pub fn new(config: &'static RuntimeConfig) -> Result<ClientRuntime> {
|
||||
let join_signal = Arc::new(AtomicBool::new(false));
|
||||
|
||||
Ok(Self {
|
||||
@@ -66,7 +64,7 @@ impl ModuleRuntime for ClientRuntime {
|
||||
}
|
||||
}
|
||||
|
||||
fn init(&mut self, manager: Arc<Mutex<Manager>>) -> Result<(), ModuleError> {
|
||||
fn init(&mut self, manager: Arc<Mutex<Manager>>) -> Result<()> {
|
||||
let host = match self.config.config.get("host") {
|
||||
Some(host) => host,
|
||||
None => {
|
||||
|
||||
@@ -6,13 +6,13 @@ use std::any::TypeId;
|
||||
|
||||
use unshell_lib::{
|
||||
ModuleError,
|
||||
ModuleRuntime,
|
||||
// client::client_runtime::ClientRuntime,
|
||||
config::{InterfaceWrapper, NamedComponent, RuntimeConfig},
|
||||
module_interface,
|
||||
warn, // module_interface,
|
||||
config::RuntimeConfig,
|
||||
warn, // module_interface
|
||||
};
|
||||
|
||||
use unshell_manager::{InterfaceWrapper, ModuleRuntime, NamedComponent, module_interface};
|
||||
|
||||
use crate::client_runtime::ClientRuntime;
|
||||
|
||||
pub use unshell_lib::logger::setup_logger;
|
||||
|
||||
Reference in New Issue
Block a user