This commit is contained in:
ayesha-mitzcov
2026-04-15 17:39:48 +01:00
36 changed files with 38 additions and 25 deletions
+10 -5
View File
@@ -3,7 +3,6 @@ TODO-IMPROVEMENTS.md
upx-reference.txt
Overlord-Desktop-Tauri\*
plugin-clipreplace
claude.md
# Node/Bun
node_modules/
@@ -47,10 +46,16 @@ dist-clients/*
# Plugins
Overlord-Server/plugins/*.zip
Overlord-Server/plugins/.plugin-state.json
plugin-sample-go/*.wasm
plugin-sample-go/*.zip
plugin-sample-go/*.h
plugin-hrdp/*
plugins/sample-go/*.wasm
plugins/sample-go/*.zip
plugins/sample-go/*.h
plugins/hrdp/*
plugins/netscan/
plugins/sysprofile/
plugins/build-netscan.bat
plugins/build-netscan.sh
plugins/build-sysprofile.bat
plugins/build-sysprofile.sh
# Runtime data
Overlord-Server/data/
+1 -1
View File
@@ -2,5 +2,5 @@ go 1.26.0
use (
./Overlord-Client
./plugin-sample-go/native
./plugins/sample-go/native
)
+9 -9
View File
@@ -164,13 +164,13 @@ The `hostInfo` buffer passed to `PluginOnLoad` is JSON:
## 3) Sample plugins by language
### Go (`plugin-sample-go/`)
### Go (`sample-go/`)
Go plugins use `-buildmode=c-shared` with platform-specific export wrappers.
**Project structure:**
```
plugin-sample-go/native/
sample-go/native/
├─ main.go (shared core logic)
├─ exports_unix.go (exports for Linux/macOS)
├─ exports_windows.go (exports for Windows)
@@ -213,13 +213,13 @@ CGO_ENABLED=1 go build -buildmode=c-shared -o sample-windows-amd64.dll ./native
---
### C (`plugin-sample-c/`)
### C (`sample-c/`)
Pure C plugins are the simplest — no runtime, no GC, fully unloadable.
**Project structure:**
```
plugin-sample-c/
sample-c/
├─ native/plugin.c
├─ sample-c.html
├─ sample-c.css
@@ -278,13 +278,13 @@ gcc -shared -fPIC -O2 -o sample-c-linux-amd64.so plugin.c
---
### C++ (`plugin-sample-cpp/`)
### C++ (`sample-cpp/`)
C++ plugins can use the full standard library (STL containers, `std::mutex`, `std::string`, etc.) while still being fully unloadable.
**Project structure:**
```
plugin-sample-cpp/
sample-cpp/
├─ native/plugin.cpp
├─ sample-cpp.html
├─ sample-cpp.css
@@ -310,13 +310,13 @@ g++ -shared -fPIC -O2 -o sample-cpp-linux-amd64.so plugin.cpp
---
### Rust (`plugin-sample-rust/`)
### Rust (`sample-rust/`)
Rust plugins compile as `cdylib` crates. Exports use `#[no_mangle]` and `extern "C"`.
**Project structure:**
```
plugin-sample-rust/
sample-rust/
├─ native/
│ ├─ Cargo.toml
│ └─ src/lib.rs
@@ -819,7 +819,7 @@ The fingerprint (64-char hex SHA-256) is printed to the console. Add it to your
```bash
cd Overlord-Server
bun run scripts/plugin-sign.ts --key my-signing-key.key ../plugin-sample-go/sample.zip
bun run scripts/plugin-sign.ts --key my-signing-key.key ../plugins/sample-go/sample.zip
```
This injects a `signature.json` into the ZIP containing the Ed25519 public key and signature.
@@ -2,7 +2,7 @@
setlocal enabledelayedexpansion
set "ROOT=%~dp0"
set "PLUGIN_DIR=%ROOT%plugin-sample-c"
set "PLUGIN_DIR=%ROOT%sample-c"
if not "%~1"=="" set "PLUGIN_DIR=%~1"
set "NATIVE_DIR=%PLUGIN_DIR%\native"
@@ -2,7 +2,7 @@
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PLUGIN_DIR="${1:-${ROOT_DIR}/plugin-sample-c}"
PLUGIN_DIR="${1:-${ROOT_DIR}/sample-c}"
NATIVE_DIR="${PLUGIN_DIR}/native"
PLUGIN_NAME="sample-c"
ZIP_OUT="${PLUGIN_DIR}/${PLUGIN_NAME}.zip"
@@ -2,7 +2,7 @@
setlocal enabledelayedexpansion
set "ROOT=%~dp0"
set "PLUGIN_DIR=%ROOT%plugin-sample-cpp"
set "PLUGIN_DIR=%ROOT%sample-cpp"
if not "%~1"=="" set "PLUGIN_DIR=%~1"
set "NATIVE_DIR=%PLUGIN_DIR%\native"
@@ -2,7 +2,7 @@
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PLUGIN_DIR="${1:-${ROOT_DIR}/plugin-sample-cpp}"
PLUGIN_DIR="${1:-${ROOT_DIR}/sample-cpp}"
NATIVE_DIR="${PLUGIN_DIR}/native"
PLUGIN_NAME="sample-cpp"
ZIP_OUT="${PLUGIN_DIR}/${PLUGIN_NAME}.zip"
@@ -2,7 +2,7 @@
setlocal enabledelayedexpansion
set "ROOT=%~dp0"
set "PLUGIN_DIR=%ROOT%plugin-sample-rust"
set "PLUGIN_DIR=%ROOT%sample-rust"
if not "%~1"=="" set "PLUGIN_DIR=%~1"
set "NATIVE_DIR=%PLUGIN_DIR%\native"
@@ -2,7 +2,7 @@
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PLUGIN_DIR="${1:-${ROOT_DIR}/plugin-sample-rust}"
PLUGIN_DIR="${1:-${ROOT_DIR}/sample-rust}"
NATIVE_DIR="${PLUGIN_DIR}/native"
PLUGIN_NAME="sample-rust"
ZIP_OUT="${PLUGIN_DIR}/${PLUGIN_NAME}.zip"
@@ -2,7 +2,7 @@
setlocal enabledelayedexpansion
set "ROOT=%~dp0"
set "PLUGIN_DIR=%ROOT%plugin-sample-go"
set "PLUGIN_DIR=%ROOT%sample-go"
if not "%~1"=="" set "PLUGIN_DIR=%~1"
set "NATIVE_DIR=%PLUGIN_DIR%\native"
+1 -1
View File
@@ -2,7 +2,7 @@
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PLUGIN_DIR="${1:-${ROOT_DIR}/plugin-sample-go}"
PLUGIN_DIR="${1:-${ROOT_DIR}/sample-go}"
NATIVE_DIR="${PLUGIN_DIR}/native"
PLUGIN_NAME="sample"
ZIP_OUT="${PLUGIN_DIR}/${PLUGIN_NAME}.zip"
@@ -1,6 +1,6 @@
# Sample Go Plugin (sample)
This sample lives at the repo root and builds a native Go plugin.
This sample lives in the `plugins/` directory and builds a native Go plugin.
## Files to include in the plugin zip
@@ -43,7 +43,7 @@ Click "Send event" and the plugin will echo back to the server logs.
The plugin receives host metadata in the `init` payload. The sample plugin shows
how to detect the host OS and branch logic (see
`plugin-sample-go/native/main.go`). For example:
`sample-go/native/main.go`). For example:
- If `host.os == "windows"`, you can safely run Windows-only flows (e.g., WinAPI-backed behavior).
- Otherwise, skip or provide a fallback path.
+7
View File
@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "sample-rust"
version = "0.1.0"
@@ -0,0 +1 @@
{"rustc_fingerprint":2568544898921049753,"outputs":{"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.94.0 (4a4ef493e 2026-03-02)\nbinary: rustc\ncommit-hash: 4a4ef493e3a1488c6e321570238084b38948f6db\ncommit-date: 2026-03-02\nhost: x86_64-pc-windows-msvc\nrelease: 1.94.0\nLLVM version: 21.1.8\n","stderr":""},"12004014463585500860":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\this1\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\npacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\this1\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\npacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""}},"successes":{}}
Binary file not shown.