11 Commits
Author SHA1 Message Date
tiennm99 1da4af498b chore: add push/PR CI, drop unused windows dep, refresh docs
Add a CI workflow running fmt, clippy with warnings denied, and the test
suite on every push and pull request. Remove the unused workspace windows
dependency now that only windows-sys is used. Update the README architecture
name and Java harness reference, clarify the plans gitignore comment, and
carry the code-reviewer agent memory.
2026-09-21 16:14:04 +07:00
tiennm99 a2e34060e0 docs(readme): drop link to retired time-mocker-target repo
The standalone repo was deleted after its content and history were
merged here; the Java test target lives in-repo only now.
2026-08-05 21:09:39 +07:00
tiennm99 78edb78649 Remove C# and C++ port trees; update README references
The earlier C# (EasyHook) and C++ (MS Detours) ports were merged into
this repo under csharp/ and cpp/ so their full histories stay reachable
(git log -- csharp/ cpp/). Their trees are removed from HEAD because
their IPC tick epoch (delta against DateTime.UtcNow.Ticks) is
incompatible with the Rust implementation's raw FILETIME contract —
keeping both in the working tree would present two contradictory IPC
designs side by side.

The Java test target remains in the working tree; README links now
point at in-repo paths instead of the retired port repositories.
2026-08-05 20:46:39 +07:00
tiennm99 79d3b69dcd fix(mmf): fall back to Local\ namespace when controller is not elevated
Creating a `Global\TimeMocker_<pid>` mapping requires
`SeCreateGlobalPrivilege`, which an unelevated token (e.g. debug `cargo run`
where the UAC manifest is intentionally skipped) does not have, so
`CreateFileMappingW` returned NULL with `ERROR_ACCESS_DENIED` and the
auto-inject scanner spammed `create MMF Global\TimeMocker_<pid>` for every
enumerated PID.

The UI now tries `Global\` first and falls back to `Local\` on access
denied, with a one-shot log warning so the auto-inject loop doesn't
flood. The hook DLL probes both names on attach so the IPC pairs up
symmetrically. Release builds keep their elevated `Global\` cross-session
reach; debug builds work against same-session targets without admin.

Also adds a dedicated `time-mocker-test-target` crate — a small console
binary that prints all 5 hooked time APIs every second with its own PID
banner, so dev verification can inject into a controlled harness instead
of arbitrary running processes.
2026-05-20 21:46:31 +07:00
tiennm99 52a01be2e4 chore: relicense under Apache-2.0
Switch from MIT to Apache-2.0 across LICENSE, workspace manifest, and README.
2026-05-20 17:08:09 +07:00
tiennm99 4d3c35a126 docs: drop "(Rust)" suffix; promote to canonical time-mocker
Repo renamed from tiennm99/time-mocker-rs to tiennm99/time-mocker.
README and workspace Cargo.toml updated to reflect the new canonical
identity; C# and C++ ports linked as language siblings.
2026-05-20 15:43:42 +07:00
tiennm99 001cf53c37 feat: initial Rust port of time-mocker
Rust workspace with three crates:
- time-mocker-core: shared MockTimeInfo + named MMF helper + FILETIME helpers
- time-mocker-hook: cdylib injected into targets; inline detours via retour
  on GetSystemTime / GetLocalTime / GetSystemTimeAsFileTime /
  GetSystemTimePreciseAsFileTime / NtQuerySystemTime
- time-mocker-ui: egui controller with process list, time picker, and
  glob/regex auto-inject rules; injects via dll-syringe; UAC manifest
  embedded in release builds

IPC: 8-byte MMF named TimeMocker_<pid> holding an i64 delta in FILETIME
ticks. Hook adds delta to the real FILETIME on every call. Note this
differs from the C# version's .NET-tick delta -- contracts are not
interoperable.

Requires nightly toolchain (retour uses unboxed_closures / tuple_trait);
pinned via rust-toolchain.toml.
2026-05-20 14:59:36 +07:00
tiennm99 57aaf45d11 Clear and rewrite 2026-08-19 09:09:35 +07:00
tiennm99 bbac847d2d docs(readme): clarify GUI nature, admin requirement, related link to time-mocker 2026-05-11 21:45:40 +07:00
tiennm99 3f927bef6c docs: flesh out README 2026-05-11 20:15:35 +07:00
Tien Nguyen Minh d474486327 Initial commit 2026-01-19 17:40:29 +07:00