feat(ios): local proxy, async API, URLProtocol, mobile DLP, expanded tool mappings#86
Merged
chen-zichen merged 3 commits intomainfrom Mar 14, 2026
Merged
feat(ios): local proxy, async API, URLProtocol, mobile DLP, expanded tool mappings#86chen-zichen merged 3 commits intomainfrom
chen-zichen merged 3 commits intomainfrom
Conversation
β¦tool mappings - Add local reverse proxy (pkg/libcrust/proxy.go) for on-device AI API response interception β replaces impractical PacketTunnelProvider approach - Add async Swift API (evaluateAsync, interceptResponseAsync) to avoid blocking the main thread - Add CrustURLProtocol for zero-config URLSession interception with URLSessionConfiguration.crustProtected convenience - Add 6 new mobile tool categories: camera, microphone, Bluetooth, NFC, biometric auth, in-app purchases, call log, SMS (30+ tool aliases) - Add 3 new builtin security rules: protect-mobile-hardware, protect-mobile-biometric, protect-mobile-purchases (27β30 locked) - Add 4 mobile DLP patterns: vCard, iCalendar, Apple mobileconfig, FHIR health bundles (42β46 patterns) - Add iOS xcframework build to release workflow for remote SPM distribution - Update README iOS section with three integration paths and protection table - Update docs and verify checksums for new rule/DLP counts
Unified step numbering to 1-indexed (steps 1-13) across engine.go, how-it-works.md diagram, and all code/test comments. Added mobile DLP patterns (vCard, iCalendar, mobileconfig, FHIR) to provider table and attack scenario matrix. Updated mobile protection categories in docs.
The proxy forwards JSON API responses, not HTML β XSS via ResponseWriter.Write is not applicable here.
cyyever
added a commit
that referenced
this pull request
Mar 14, 2026
β¦tool mappings (#86) * feat(ios): local proxy, async API, URLProtocol, mobile DLP, expanded tool mappings - Add local reverse proxy (pkg/libcrust/proxy.go) for on-device AI API response interception β replaces impractical PacketTunnelProvider approach - Add async Swift API (evaluateAsync, interceptResponseAsync) to avoid blocking the main thread - Add CrustURLProtocol for zero-config URLSession interception with URLSessionConfiguration.crustProtected convenience - Add 6 new mobile tool categories: camera, microphone, Bluetooth, NFC, biometric auth, in-app purchases, call log, SMS (30+ tool aliases) - Add 3 new builtin security rules: protect-mobile-hardware, protect-mobile-biometric, protect-mobile-purchases (27β30 locked) - Add 4 mobile DLP patterns: vCard, iCalendar, Apple mobileconfig, FHIR health bundles (42β46 patterns) - Add iOS xcframework build to release workflow for remote SPM distribution - Update README iOS section with three integration paths and protection table - Update docs and verify checksums for new rule/DLP counts * docs: align pipeline step numbering (1-indexed) across code and docs Unified step numbering to 1-indexed (steps 1-13) across engine.go, how-it-works.md diagram, and all code/test comments. Added mobile DLP patterns (vCard, iCalendar, mobileconfig, FHIR) to provider table and attack scenario matrix. Updated mobile protection categories in docs. * fix(ci): suppress semgrep false positive on reverse proxy w.Write() The proxy forwards JSON API responses, not HTML β XSS via ResponseWriter.Write is not applicable here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pkg/libcrust/proxy.go): in-process HTTP reverse proxy for iOS β intercepts API calls without PacketTunnelProvider or TLS MITM. Reuses the existingsecurity.Interceptor.evaluateAsync(),interceptResponseAsync(),validateYAMLAsync()β off-main-thread wrappers around gomobile-bound Go calls.URLProtocolsubclass for zero-configURLSessioninterception β register once, all requests to configured hosts are automatically proxied through the rule engine.protect-mobile-hardware,protect-mobile-biometric,protect-mobile-purchases.iosjob in release workflow for xcframework build + SHA-256 checksum artifact.Test plan
go test ./...)