Commit Graph
74 Commits
Author SHA1 Message Date
xiaozhou233 3626abb35a Refactor: migrate TOML parser from toml11 to toml++
- Replace vendored single-header toml11 (includes/toml.hpp) with the toml++ library (includes/toml++)

- Rewrite Config to use toml::parse_file and expose typed get/getArray/getPath/contains accessors, storing parse errors instead of logging them

- Update bundled license to toml++
2026-10-14 16:21:48 +08:00
xiaozhou233 0ddcfcd7c8 Remove remapper whitelist JNI declarations 2026-08-19 18:30:58 +08:00
xiaozhou233 87a91376c5 Remove JuiceRemapper module
Remove the runtime class remapping feature including its JNI bindings, service, config example, and Remapper singleton from global.hpp.
2026-08-19 18:29:38 +08:00
xiaozhou233 dbae5e5258 Fix: do not auto-read config when runtime dir is empty
Config no longer falls back to the current working directory when no
runtime directory is specified, so an empty runtime dir leaves the config
invalid instead of silently parsing config.toml from the CWD.
2026-08-18 20:11:00 +08:00
xiaozhou233 4bed99f417 Feat: add JuiceRemapper runtime class remapping
- add JuiceRemapperService that listens for ClassFileLoadHook and calls
  the Java static Remap.remap(String, byte[]) via cached JNI declarations,
  then writes the returned bytes back to the JVMTI callback
- add JNI bindings (initNative, add/remove/clear include/exclude) with
  Remapper singleton init state and cached jclass/jmethodID stored in
  Remapper (global.hpp)
- cache static class/method declarations lazily in initNative to avoid
  repeated FindClass/GetStaticMethodID
- add generated JuiceRemapper JNI header and runtime-remap example config
2026-08-18 16:28:29 +08:00
xiaozhou233 51bcfbd549 Refactor: rebuild libagent with simplified lifecycle
- Replace eventbus/services with Agent preload/init lifecycle
- Move JNI header to shared includes; add jni_common.hpp umbrella header
- Reduce ClassFileLoadHook to a stub for later implementation
- Add eventpp dependency
- Document custom API JAR workflow (WIP)
2026-08-16 21:14:44 +08:00
xiaozhou233 3b180e7199 Fix: harden libloader config handling
- Guard Config against NULL runtime_dir
- Read JuiceAgent.Version from config instead of hardcoding 2
- Move LoaderConfig to ConfigStruct.hpp; remove obsolete JuiceAgent.hpp
2026-08-16 21:08:13 +08:00
xiaozhou233 a1b0eb8b84 Feat: add inject-via-java-api example with JNI refactor
- Rename JNI class from InjectorNative to Injector in libinject.c

- Add JNI header for cn.xiaozhou233.juiceagent.injector.Injector

- Add inject-via-java-api example with HowToUse.txt and 如何使用.txt
2026-08-15 21:51:48 +08:00
xiaozhou233 1931072b96 Fix: harden injector/libinject/loader against UB, format bugs and leaks 2026-08-15 12:30:49 +08:00
xiaozhou233 ce08b19170 Feat: add Config/Utils headers and Loader module, wire entrypoint into DllMain 2026-08-15 12:26:12 +08:00
xiaozhou233 998f4d139e Fix: switch Logger to truncating file sink with flush-on-trace 2026-08-15 11:42:15 +08:00
xiaozhou233 5023ecf90c Feat: add reflective DLL injection library, JVM headers and libinject JNI module 2026-08-15 11:37:15 +08:00
xiaozhou233 01f966c5f2 Refactor: add spdlog vendored headers, Logger wrapper and libloader module skeleton 2026-08-15 11:20:36 +08:00
xiaozhou233 fe64308942 DELETE: all code 2026-08-15 10:23:15 +08:00
xiaozhou233 1dcad52e15 Revert "Perf & Fix: reduce ClassFileLoadHook overhead and fix retransform patch path"
This reverts commit bb5b215a33.
2026-08-14 23:09:40 +08:00
xiaozhou233 bb5b215a33 Perf & Fix: reduce ClassFileLoadHook overhead and fix retransform patch path
- Skip mutable event dispatch when no mutable listeners exist (hot path)
- Wire retransformClass bytecode into pendingRetransform so patches are applied
- Guard pendingRetransform with its mutex; check jvmti Allocate result
- Store global refs in captured ClassFileData and release on re-capture
- Add null/exception checks in defineClass/getLoadedClasses
- Extract shared find_class_by_internal_name helper
- Use CONFIGURE_DEPENDS for CMake globs; guard InitLogger; delete leaked jArgs
2026-08-14 17:07:36 +08:00
xiaozhou233 3842585777 Build: Add MinGW cross-compilation support 2026-08-12 09:49:34 +08:00
xiaozhou233 cc1c2bff30 BugFix: The path for JuiceAgentNativeLibraryPath could not be resolved 2026-05-04 20:46:15 +08:00
xiaozhou233 4be6324cf3 BugFix: Handle path 2026-04-29 19:47:02 +08:00
xiaozhou233andCopilot 01c46c6b98 feat: remove timestamp generation from tempfile creation and improve error logging
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 21:54:14 +08:00
xiaozhou233andCopilot e2d6dcaa25 feat: remove JuiceAgentAPIJarPath from LoaderConfig and update loader logic to use temporary file
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 21:31:21 +08:00
xiaozhou233 75062b805c refactor: add JuiceAgent-API bytes/ write_to_tempfile / make_timestamp_filename 2026-04-28 21:25:02 +08:00
xiaozhou233 6564a0e020 feat: Update logger to use ColorConsoleAppender for improved output 2026-04-22 21:37:23 +08:00
xiaozhou233 92837c9597 Docs: Readme 2026-04-21 14:44:35 +08:00
xiaozhou233 50773f5456 Feat: Call Java Implementation 2026-04-20 14:04:53 +08:00
xiaozhou233 ccb332cb42 [Feat] Serializer 2026-04-20 13:18:58 +08:00
xiaozhou233 9a2dd217f1 [Refactor] Update configuration handling in JarLoader and enhance Config class 2026-04-19 22:26:51 +08:00
xiaozhou233 e7ce54188b [Refactor] Enhance Config class with type-safe get method and value reading 2026-04-19 18:44:59 +08:00
xiaozhou233 9f366645c9 Feat: libagent can now read the config 2026-04-19 18:36:26 +08:00
xiaozhou233 6a7e5a1d38 [Refactor] Config and Loader
[Add] toml11 library
[Refactor] Config
[Refactor] Data Struct
[Refactor] Loader
2026-04-19 16:41:39 +08:00
xiaozhou233 8b0bf8f211 Style: move LocalRef to header / move check_and_clear_exception to header 2026-04-18 19:24:49 +08:00
xiaozhou233 11aaac0f0b Style: Config 2026-04-16 21:29:13 +08:00
xiaozhou233 a64bbb8bb8 Update: Add eventpp library 2026-04-04 21:02:04 +08:00
xiaozhou233 3ce1bccf02 Impl: Read config and print 2026-03-24 19:56:51 +08:00
xiaozhou233 172f354b04 [Refactor] Config 2026-03-07 16:41:20 +08:00
xiaozhou233 353fe3e5a5 Update libagent 2025-11-21 23:13:39 +08:00
xiaozhou233 ffaa234bbf ReflectiveDLLInjection 2025-11-21 20:15:16 +08:00
xiaozhou233 76055183d2 [Update] Logger and injector 2025-11-21 19:52:15 +08:00
xiaozhou233 80713ace68 Update agent 2025-11-21 17:19:06 +08:00
xiaozhou233 07a71eab12 Delete Code 2025-11-21 16:55:40 +08:00
xiaozhou233 ebc557c2f2 [Update] Remove useless code 2025-11-14 21:18:24 +08:00
xiaozhou233 e3481d007c [WIP] Add ReflectiveDLLInjection 2025-11-10 10:20:31 +08:00
xiaozhou233 386dc14a01 [WIP] move juiceloader 2025-11-09 15:33:07 +08:00
xiaozhou233 094e7bc0d4 [WIP] update example config and add JuiceLoaderLibraryPath 2025-11-09 15:07:31 +08:00
xiaozhou233 21df0346db [Update] Read Config 2025-11-08 19:25:09 +08:00
xiaozhou233 73910150b2 [Update] 2025-11-08 18:59:34 +08:00
xiaozhou233 01b437cd9f [Update] Remove unuse libraries 2025-11-08 18:17:27 +08:00
xiaozhou233 1ea23faab9 [Update] Remove Reflective Inject 2025-11-08 18:15:02 +08:00
xiaozhou233 de971d6481 [Refactor] CPP 2025-11-08 14:12:35 +08:00
xiaozhou233 ee97c10702 [Update] library plog 2025-11-08 12:59:20 +08:00