organize repo
This commit is contained in:
+11
-5
@@ -2,7 +2,7 @@
|
|||||||
TODO-IMPROVEMENTS.md
|
TODO-IMPROVEMENTS.md
|
||||||
upx-reference.txt
|
upx-reference.txt
|
||||||
Overlord-Desktop-Tauri\*
|
Overlord-Desktop-Tauri\*
|
||||||
plugin-clipreplace
|
plugins/clipreplace
|
||||||
|
|
||||||
# Node/Bun
|
# Node/Bun
|
||||||
node_modules/
|
node_modules/
|
||||||
@@ -46,10 +46,16 @@ dist-clients/*
|
|||||||
# Plugins
|
# Plugins
|
||||||
Overlord-Server/plugins/*.zip
|
Overlord-Server/plugins/*.zip
|
||||||
Overlord-Server/plugins/.plugin-state.json
|
Overlord-Server/plugins/.plugin-state.json
|
||||||
plugin-sample-go/*.wasm
|
plugins/sample-go/*.wasm
|
||||||
plugin-sample-go/*.zip
|
plugins/sample-go/*.zip
|
||||||
plugin-sample-go/*.h
|
plugins/sample-go/*.h
|
||||||
plugin-hrdp/*
|
plugins/hrdp/*
|
||||||
|
plugins/netscan/
|
||||||
|
plugins/sysprofile/
|
||||||
|
plugins/build-netscan.bat
|
||||||
|
plugins/build-netscan.sh
|
||||||
|
plugins/build-sysprofile.bat
|
||||||
|
plugins/build-sysprofile.sh
|
||||||
|
|
||||||
# Runtime data
|
# Runtime data
|
||||||
Overlord-Server/data/
|
Overlord-Server/data/
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ go 1.26.0
|
|||||||
|
|
||||||
use (
|
use (
|
||||||
./Overlord-Client
|
./Overlord-Client
|
||||||
./plugin-sample-go/native
|
./plugins/sample-go/native
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -164,13 +164,13 @@ The `hostInfo` buffer passed to `PluginOnLoad` is JSON:
|
|||||||
|
|
||||||
## 3) Sample plugins by language
|
## 3) Sample plugins by language
|
||||||
|
|
||||||
### Go (`plugin-sample-go/`)
|
### Go (`sample-go/`)
|
||||||
|
|
||||||
Go plugins use `-buildmode=c-shared` with platform-specific export wrappers.
|
Go plugins use `-buildmode=c-shared` with platform-specific export wrappers.
|
||||||
|
|
||||||
**Project structure:**
|
**Project structure:**
|
||||||
```
|
```
|
||||||
plugin-sample-go/native/
|
sample-go/native/
|
||||||
├─ main.go (shared core logic)
|
├─ main.go (shared core logic)
|
||||||
├─ exports_unix.go (exports for Linux/macOS)
|
├─ exports_unix.go (exports for Linux/macOS)
|
||||||
├─ exports_windows.go (exports for Windows)
|
├─ 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.
|
Pure C plugins are the simplest — no runtime, no GC, fully unloadable.
|
||||||
|
|
||||||
**Project structure:**
|
**Project structure:**
|
||||||
```
|
```
|
||||||
plugin-sample-c/
|
sample-c/
|
||||||
├─ native/plugin.c
|
├─ native/plugin.c
|
||||||
├─ sample-c.html
|
├─ sample-c.html
|
||||||
├─ sample-c.css
|
├─ 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.
|
C++ plugins can use the full standard library (STL containers, `std::mutex`, `std::string`, etc.) while still being fully unloadable.
|
||||||
|
|
||||||
**Project structure:**
|
**Project structure:**
|
||||||
```
|
```
|
||||||
plugin-sample-cpp/
|
sample-cpp/
|
||||||
├─ native/plugin.cpp
|
├─ native/plugin.cpp
|
||||||
├─ sample-cpp.html
|
├─ sample-cpp.html
|
||||||
├─ sample-cpp.css
|
├─ 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"`.
|
Rust plugins compile as `cdylib` crates. Exports use `#[no_mangle]` and `extern "C"`.
|
||||||
|
|
||||||
**Project structure:**
|
**Project structure:**
|
||||||
```
|
```
|
||||||
plugin-sample-rust/
|
sample-rust/
|
||||||
├─ native/
|
├─ native/
|
||||||
│ ├─ Cargo.toml
|
│ ├─ Cargo.toml
|
||||||
│ └─ src/lib.rs
|
│ └─ src/lib.rs
|
||||||
@@ -819,7 +819,7 @@ The fingerprint (64-char hex SHA-256) is printed to the console. Add it to your
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd Overlord-Server
|
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.
|
This injects a `signature.json` into the ZIP containing the Ed25519 public key and signature.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
set "ROOT=%~dp0"
|
set "ROOT=%~dp0"
|
||||||
set "PLUGIN_DIR=%ROOT%plugin-sample-c"
|
set "PLUGIN_DIR=%ROOT%sample-c"
|
||||||
if not "%~1"=="" set "PLUGIN_DIR=%~1"
|
if not "%~1"=="" set "PLUGIN_DIR=%~1"
|
||||||
|
|
||||||
set "NATIVE_DIR=%PLUGIN_DIR%\native"
|
set "NATIVE_DIR=%PLUGIN_DIR%\native"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
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"
|
NATIVE_DIR="${PLUGIN_DIR}/native"
|
||||||
PLUGIN_NAME="sample-c"
|
PLUGIN_NAME="sample-c"
|
||||||
ZIP_OUT="${PLUGIN_DIR}/${PLUGIN_NAME}.zip"
|
ZIP_OUT="${PLUGIN_DIR}/${PLUGIN_NAME}.zip"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
set "ROOT=%~dp0"
|
set "ROOT=%~dp0"
|
||||||
set "PLUGIN_DIR=%ROOT%plugin-sample-cpp"
|
set "PLUGIN_DIR=%ROOT%sample-cpp"
|
||||||
if not "%~1"=="" set "PLUGIN_DIR=%~1"
|
if not "%~1"=="" set "PLUGIN_DIR=%~1"
|
||||||
|
|
||||||
set "NATIVE_DIR=%PLUGIN_DIR%\native"
|
set "NATIVE_DIR=%PLUGIN_DIR%\native"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
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"
|
NATIVE_DIR="${PLUGIN_DIR}/native"
|
||||||
PLUGIN_NAME="sample-cpp"
|
PLUGIN_NAME="sample-cpp"
|
||||||
ZIP_OUT="${PLUGIN_DIR}/${PLUGIN_NAME}.zip"
|
ZIP_OUT="${PLUGIN_DIR}/${PLUGIN_NAME}.zip"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
set "ROOT=%~dp0"
|
set "ROOT=%~dp0"
|
||||||
set "PLUGIN_DIR=%ROOT%plugin-sample-rust"
|
set "PLUGIN_DIR=%ROOT%sample-rust"
|
||||||
if not "%~1"=="" set "PLUGIN_DIR=%~1"
|
if not "%~1"=="" set "PLUGIN_DIR=%~1"
|
||||||
|
|
||||||
set "NATIVE_DIR=%PLUGIN_DIR%\native"
|
set "NATIVE_DIR=%PLUGIN_DIR%\native"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
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"
|
NATIVE_DIR="${PLUGIN_DIR}/native"
|
||||||
PLUGIN_NAME="sample-rust"
|
PLUGIN_NAME="sample-rust"
|
||||||
ZIP_OUT="${PLUGIN_DIR}/${PLUGIN_NAME}.zip"
|
ZIP_OUT="${PLUGIN_DIR}/${PLUGIN_NAME}.zip"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
set "ROOT=%~dp0"
|
set "ROOT=%~dp0"
|
||||||
set "PLUGIN_DIR=%ROOT%plugin-sample-go"
|
set "PLUGIN_DIR=%ROOT%sample-go"
|
||||||
if not "%~1"=="" set "PLUGIN_DIR=%~1"
|
if not "%~1"=="" set "PLUGIN_DIR=%~1"
|
||||||
|
|
||||||
set "NATIVE_DIR=%PLUGIN_DIR%\native"
|
set "NATIVE_DIR=%PLUGIN_DIR%\native"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
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"
|
NATIVE_DIR="${PLUGIN_DIR}/native"
|
||||||
PLUGIN_NAME="sample"
|
PLUGIN_NAME="sample"
|
||||||
ZIP_OUT="${PLUGIN_DIR}/${PLUGIN_NAME}.zip"
|
ZIP_OUT="${PLUGIN_DIR}/${PLUGIN_NAME}.zip"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Sample Go Plugin (sample)
|
# 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
|
## 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
|
The plugin receives host metadata in the `init` payload. The sample plugin shows
|
||||||
how to detect the host OS and branch logic (see
|
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).
|
- If `host.os == "windows"`, you can safely run Windows-only flows (e.g., WinAPI-backed behavior).
|
||||||
- Otherwise, skip or provide a fallback path.
|
- Otherwise, skip or provide a fallback path.
|
||||||
Generated
+7
@@ -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.
Reference in New Issue
Block a user