SkillAgentSearch skills...

WiretapKMP

Kotlin Multiplatform library for network inspection and mocking. Intercept HTTP and WebSocket traffic, mock API responses, and throttle requests.

Install / Use

/learn @skymansandy/WiretapKMP
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<p align="center"> <img src="docs/art/IntroImage.png" alt="WiretapKMP — Powerful, Cross-Platform Network Inspection for Kotlin Multiplatform"/> </p> <p align="center"> <a href="https://github.com/skymansandy/wiretapKMP/actions/workflows/deploy.yml"><img src="https://github.com/skymansandy/wiretapKMP/actions/workflows/deploy.yml/badge.svg" alt="Build"/></a> <a href="https://github.com/skymansandy/wiretapKMP/actions/workflows/deploy.yml"><img src="https://img.shields.io/badge/coverage-0%25-red" alt="Coverage"/></a> <a href="https://central.sonatype.com/search?q=dev.skymansandy+wiretap"><img src="https://img.shields.io/badge/maven--central-1.0.0--preview-blue" alt="Maven Central"/></a> </p>

Kotlin Multiplatform network inspection and mocking SDK. Intercept HTTP and WebSocket traffic, mock API responses, and throttle requests — no proxy server needed.

📸 Screenshots

HTTP Inspector

| Overview | Request | Response | |:--------:|:-------:|:--------:| | <img src="docs/art/screenshots/http/overview.png" width="260"/> | <img src="docs/art/screenshots/http/request.png" width="260"/> | <img src="docs/art/screenshots/http/respose.png" width="260"/> |

WebSocket Inspector

| Connections | Messages | |:-----------:|:--------:| | <img src="docs/art/screenshots/socket/socketlist.png" width="260"/> | <img src="docs/art/screenshots/socket/socketdetail.png" width="260"/> |

API Mocking & Throttling

| Mocked Requests | Mocked Response | Mock Rule | Throttle Rule | Mock + Throttle | |:---------------:|:---------------:|:---------:|:-------------:|:---------------:| | <img src="docs/art/screenshots/http/mocked requests.png" width="200"/> | <img src="docs/art/screenshots/http/mocked_response.png" width="200"/> | <img src="docs/art/screenshots/http/just mock.png" width="200"/> | <img src="docs/art/screenshots/http/throttle only.png" width="200"/> | <img src="docs/art/screenshots/http/mock+throttle.png" width="200"/> |

Rules Engine

| Swipe to Create | Request Setup | Response Setup | Rules List | Rule Details | |:---------------:|:-------------:|:--------------:|:----------:|:------------:| | <img src="docs/art/screenshots/http/swipetocreaterule.png" width="200"/> | <img src="docs/art/screenshots/http/rulecreate-requestsetup.png" width="200"/> | <img src="docs/art/screenshots/http/rulecreate-responsesetup.png" width="200"/> | <img src="docs/art/screenshots/http/ruleslist.png" width="200"/> | <img src="docs/art/screenshots/http/rule-view.png" width="200"/> |

Notifications

| HTTP | WebSocket | |:----:|:---------:| | <img src="docs/art/screenshots/http/notification.png" width="300"/> | <img src="docs/art/screenshots/socket/notification.png" width="300"/> |

List-Detail Pane (Tablet / Desktop)

<img src="docs/art/screenshots/listdetailpane.png" width="600"/>

📱 Platforms

KMP Plugins

| Client | Android | iOS | JVM Desktop | |--------|:-------:|:---:|:-----------:| | Ktor | ✅ | ✅ | ✅ | | OkHttp | ✅ | — | ✅ |

Swift UrlSession

| Client | iOS | |-----------------------|:---:| | WiretapURLSession | ✅ |

wiretap-urlsession is a dedicated Swift wrapper exported as an XCFramework via KMMBridge/SPM.

✨ Features

  • API Mocking — Return fake responses without hitting the network. Match on method, URL, headers, and body.
  • Request Throttling — Add artificial delay with fixed or random ranges.
  • HTTP Logging — Capture URL, method, headers, bodies, status codes, duration, TLS details (OkHttp).
  • WebSocket Logging — Full lifecycle tracking with message capture for Ktor and OkHttp.
  • Header Masking — Keep, mask, or skip headers from logs.
  • Log Retention — Forever, per app session, or time-based auto-pruning.
  • Built-in Inspector UI — Compose Multiplatform UI for browsing logs, WebSocket streams, and managing rules.
  • No-op Variants — Drop-in release replacements with zero overhead.

📖 Plugin Documentation

Each plugin module has its own README with detailed setup, configuration, usage examples, WebSocket support, and mock/throttle rules:

| Plugin | Platforms | README | |-----------------------|-------------------|-----------------------------------------------------------------| | Ktor | Android, iOS, JVM | wiretap-ktor/README.md | | OkHttp | Android, JVM | wiretap-okhttp/README.md | | WiretapURLSession | iOS | wiretap-urlsession/README.md |

🔇 No-op Variants

Swap dependencies for release builds — no conditional code needed.

| Debug | Release | |------------------|------------------------| | wiretap-ktor | wiretap-ktor-noop | | wiretap-okhttp | wiretap-okhttp-noop |

For URLSession, use WiretapURLSession in debug and plain URLSession in release (see installation above).

📚 Documentation

Full documentation

🤝 Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

🙏 Acknowledgements

📄 License

Copyright 2025 skymansandy

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Related Skills

View on GitHub
GitHub Stars17
CategoryProduct
Updated3h ago
Forks0

Languages

Kotlin

Security Score

75/100

Audited on Apr 1, 2026

No findings