You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add plugin support: load custom protections from a plugins directory (#227)
Drop plugin DLLs (custom IProtection implementations) into a `plugins`
directory and BitMono discovers and runs them like the built-ins. External
plugin dependencies are resolved via a single AppDomain.AssemblyResolve
handler, which is the only mechanism that works across every BitMono target
(net462, netstandard2.0/2.1, net6-net10) since AssemblyLoadContext is absent
on the older ones.
- PluginLoader + PluginProbing in BitMono.Shared, hooked from AddProtections
- The resolver prefers already-loaded host assemblies so plugins bind to the
host's BitMono.API (avoids the duplicate-contract trap), then probes the
plugin directories; the hook is AppDomain-global and attached once
- Plugins live at the plugins root or one folder deep; nested folders (e.g.
a libs/ of NuGet deps) are resolved lazily by the handler
- Type discovery now uses IProtection.IsAssignableFrom (warns on a shadowed
BitMono.API), skips open generics, and instantiates each protection
defensively so one broken plugin can't abort the run
- PluginsDirectoryName setting in obfuscation.json (default "plugins")
- Unit tests for the probing logic and developer docs (developers/plugins)
Closes#227
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,7 @@ Read the **[docs][bitmono_docs]** to read protection, functionality, and more.
84
84
* AntiDe4dot
85
85
* AntiILdasm
86
86
* and you can integrate existing/make own feature ;)
87
+
***Plugins** - drop your own protections in a `plugins` folder, no rebuild required ([guide](https://bitmono.readthedocs.io/en/latest/developers/plugins.html))
0 commit comments