mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-08 22:38:01 -06:00
fcb3b2be17
- Write PROTOCOL.md with full wire format spec and 8 real-world scenario
analyses (reconnect, multi-operator, large files, AV evasion, router crash,
malformed packets, future pivoting)
- Rewrite workspace structure:
- unshell lib: protocol types (PacketHeader, TreeRequest/Response,
HandshakeMessage/Ack), Transport trait, TcpTransport, Tree routing
- ush-router: router binary with per-node threads, NodeRegistry with
longest-prefix path matching, packet relay
- ush-payload: implant binary with reconnect loop, module tree, InfoModule
- ush-cli: operator REPL with rustyline, session management, command parser
- Protocol design: two-part rkyv frame [header][payload]; router reads only
header for routing, payload bytes forwarded opaque
- All code documented with doc comments and examples
- Zero warnings, zero errors across entire workspace
- 32 tests pass (unit tests for tree routing, TCP transport, framing,
command parsing, node registry)
30 lines
1.0 KiB
TOML
30 lines
1.0 KiB
TOML
# =============================================================================
|
|
# ush-router — The UnShell Router Binary
|
|
# =============================================================================
|
|
#
|
|
# The router is a dumb packet relay. It:
|
|
# 1. Accepts TCP connections from payload nodes and operator nodes.
|
|
# 2. Reads the PacketHeader to determine the destination path.
|
|
# 3. Forwards the packet to whichever node registered that path prefix.
|
|
# 4. Has a small set of built-in endpoints at /router/... for node discovery.
|
|
#
|
|
# Run with:
|
|
# cargo run -p ush-router -- --bind 0.0.0.0:9000
|
|
#
|
|
# The router binary is NOT no_std — it uses the full standard library.
|
|
|
|
[package]
|
|
name = "ush-router"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
description = "UnShell router/relay binary"
|
|
|
|
[dependencies]
|
|
unshell = { workspace = true, features = ["tcp", "log"] }
|
|
crossbeam-channel = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
rkyv = { workspace = true }
|
|
|
|
[lints]
|
|
workspace = true
|