Poseidon is a framework for intercepting OkHttp network traffic and integrating it with the Proxyman Mac app for debugging and inspection.
It is the Android equivalent of Atlantis for iOS.
It does not yet support WebSockets or HTTPUrlConnection.
- Minimum API 24
- API 34+ recommended (NsdManager is much more reliable after Android 14)
The latest version is available on Maven Central
To help exclude Poseidon from release builds while keeping the same API, we've also provided a poseidon-noop artifact.
So a typical setup would look like this:
// In your app/build.gradle.kts
dependencies {
debugImplementation("fm.castro.poseidon:poseidon:1.1.2")
releaseImplementation("fm.castro.poseidon:poseidon-noop:1.1.2")
}The noop variant provides stub implementations so you don't need conditional initialization code.
// In Application#onCreate() or wherever you build your okhttp client
Poseidon.initialize(context)
// This takes an optional PoseidonConfig parameter so if you want to enable verbose logging or send a custom device name you can do this
Poseidon.initialize(
context,
PoseidonConfig.create(
deviceName = "My Custom Device Name",
debugLogging = true
)
)
// Add the PoseidonInterceptor as a *network* interceptor
val client = OkHttpClient.Builder()
.addNetworkInterceptor(PoseidonInterceptor())
.build()Poseidon was created by the team behind Castro, because we noticed how much better the iOS/Proxyman experience is for monitoring network requests compared to anything available on Android.
In Greek mythology, Poseidon ruled over Atlantis.
- Proxyman is developed by Proxyman LLC (https://proxyman.com/). This library is an independent project and is not affiliated with, endorsed by, or sponsored by Proxyman LLC.
- This library was inspired by Atlantis and a similar Android implementation. Due to the absence of an open source license on the latter, this library was developed independently from scratch.
Apache 2.0