"Keep the Truth in the Physical Universe, Exchange Safety in the Digital Universe."
SafeMask is an industrial-grade local privacy masking engine built for the AI era. Powered by Rust 2024 and Tauri v2, it ensures your sensitive data never leaves your machine. Through its innovative "Shadow Mode" and parallel computing architecture, SafeMask achieves a perfect balance between ironclad security and frictionless productivity.
Rust Tauri Performance Security
SafeMask revolutionizes the traditional "all-or-nothing" interceptor logic by introducing a quantum-state masking experience:
- The Phenomenon: You press
Ctrl+Cto copy. The clipboard still holds your original plain text. Local debugging and development continue as usual; SafeMask remains invisible. - The Collapse: When you are ready to send content to ChatGPT/Claude, press
Alt+V. SafeMask instantly executes a lightning-fast sequence (150ms): Backup → Inject Masked Text → Simulate Paste → Instant Restore. - The Value: The AI receives a safe
<API_KEY>, while your physical clipboard "heals" back to the original text the moment the paste is complete. 演示Alt + V粘贴
- Logic: System-level forceful interception. Any sensitive data hitting the clipboard is "bleached" into masked text within milliseconds.
- Use Case: Remote meetings/screen sharing, high-security office environments, or working in public spaces. 剪切板 哨兵宇宙
For giant log files (GB+), SafeMask abandons traditional memory-loading schemes in favor of:
- Memory Mapping (Mmap): Directly maps disk files into the process virtual address space for zero-copy reads.
- Three-Stage Ordered Pipeline:
- Splitter: Intelligently carves files into 8MB macro-chunks, locating the nearest newline to ensure line integrity.
- Compute (Rayon): Multi-core CPU parallel masking, squeezing every bit of power from your hardware.
- Reassembly (Ordered Writer): Uses a
BTreeMapbuffer and index sequencing to ensure the output file's line order is 100% identical to the input.
- Throughput: Real-world benchmarks on NVMe SSDs exceed 340MB/s, processing a 2GB log file in just 8 seconds.
-
Aho-Corasick Automaton: For tens of thousands of literal rules (e.g., project names, employee IDs), it provides
$O(n)$ time complexity constant-speed matching. -
Byte-Level Regex: Operates directly on
[u8]byte streams, skipping expensive UTF-8 validation and boosting performance by ~30%. - COW (Copy-On-Write) Optimization: If no privacy data is found in a line, the engine returns a reference only, incurring zero memory allocation.
- Atomic Lock Control: Uses Rust's
AtomicBoolto synchronize the listener and executor, completely avoiding "Recursive Masking" deadlocks during simulated pastes. - Injection Latency Compensation: Supports precise 50ms-800ms latency adjustments to ensure accurate injection even in high-load applications.
SafeMask is not just a masker; it's a professional Regex debugging terminal:
- Real-time Simulation: As you write a regular expression, the sandbox below shows the masking result instantly.
- Error Backtracking: If the Regex syntax is invalid (e.g., unclosed parentheses), the sandbox captures the low-level engine error and highlights it.
- System Lock Mechanism: Built-in rules are physically protected. Users are encouraged to use the "Save As" logic to build custom private libraries based on industrial-standard templates. 规则页面 规则实验室
We believe productivity tools should be as elegant as precision instruments:
- Amber Ivory Theme: A deep, warm color palette combined with asymmetric white space significantly reduces eye strain during long sessions.
- Mechanical Audio System: Real-time synthesis via Web Audio API. Opening, closing, recording, and errors each have unique physical feedback sounds.
- Precision Indicators: A dynamic breathing light in the top-right corner displays the "Universe Mode" status in real-time. 首页GIF图
| Shortcut | Action | Semantics |
|---|---|---|
Alt + V |
Magic Paste | Injects the masked copy from the Shadow Universe into the focused window. |
Alt + M |
Universe Switch | Instantly toggles between "Silent Monitoring" and "Active Interception." |
App Button |
Always on Top | Pins the console to the front of all apps for real-time monitoring. |
- 100% Offline: No network permissions requested in configuration; the codebase contains zero HTTP request libraries.
- Zero Telemetry: We do not collect usage habits, rules, or masking frequency. Data sovereignty belongs entirely to you.
- Audit Transparency: All masking history (audit records) can be physically destroyed with one click, leaving no trace on the disk.
- Kernel: Rust 2024 (Edition)
- Frontend: Vue 3 + Pinia + Vite 6
- Communication: Tauri v2 IPC (Binary stream)
- Styling: Tailwind CSS v3 + PostCSS
- Memory Footprint: ~40MB at idle (thanks to Rust's memory management)
Go to Releases to download:
- Windows:
.msi(Installer) or.zip(Portable Green Version - Recommended). - macOS: Universal Binary
.dmg(Supports M1/M2/M3/Intel).
# 1. Clone git clone https://github.com/AiToByte/SafeMask.git # 2. Install Dependencies npm install # 3. Start the Development Universe npx tauri dev --no-watch # 4. Build Release Version npx tauri build
- 如果您觉得 SafeMask 有用,请考虑给代码库点个星标!这有助于我们发展壮大,也体现了您对安全脱敏工具的支持。 Star History Chart
SafeMask - Empowering every line of data to safely embrace AI.
Developed with ❤️ by XiaoSheng