PromptHub
Developer Tools Android Development

Stop Wrestling with Android Proxies! Atlantis Captures HTTPS Traffic Instantly

B

Bright Coding

Author

14 min read
47 views
Stop Wrestling with Android Proxies! Atlantis Captures HTTPS Traffic Instantly

Stop Wrestling with Android Proxies! Atlantis Captures HTTPS Traffic Instantly

What if I told you that everything you hate about debugging Android network traffic could disappear in the next five minutes?

You've been there. Staring at your screen at 2 AM, muttering curses under your breath. The proxy is configured. The certificate is installed — supposedly. Your Android app either refuses to connect, throws SSL handshake failures, or worse: silently ignores your carefully crafted proxy settings on newer API levels. You've burned hours wrestling with network_security_config.xml, fighting Android 14's tightened certificate restrictions, and questioning every life choice that led you to mobile development.

Here's the brutal truth: the traditional proxy-based approach to network debugging is fundamentally broken for modern Android development. Google's security enhancements, while excellent for users, have turned developers into digital contortionists. Certificate pinning bypasses? Frida scripts? Custom CA installations that evaporate on app reinstall? This isn't debugging — it's masochism.

But what if there was a secret weapon that top Android developers are already using? A tool that captures every HTTP request, every HTTPS response, every WebSocket message — without a single proxy configuration or certificate installation?

Enter Atlantis Android. This isn't just another library. It's a paradigm shift in how we inspect network traffic, built by the same brilliant team behind Proxyman. And once you experience the effortless flow of watching your app's network calls appear instantly in Proxyman's beautiful interface, you'll wonder how you ever tolerated the old way.

Ready to reclaim your sanity? Let's dive deep.


What is Atlantis Android?

Atlantis Android is a companion debugging library developed by Proxyman — the wildly popular macOS network debugging tool that has become the weapon of choice for iOS and macOS developers worldwide. Released as the Android counterpart to the existing Atlantis iOS library, it represents a strategic expansion that finally brings zero-configuration network inspection to the Android ecosystem.

The project's core mission is elegantly simple yet technically profound: intercept and forward HTTP/HTTPS traffic from Android applications directly to Proxyman, completely circumventing the traditional proxy-based architecture that has plagued developers for decades.

Why It's Exploding in Popularity Right Now

The timing of Atlantis Android's release couldn't be more perfect. Three converging forces have created a perfect storm of developer frustration:

  1. Android 14's security tightening has made traditional proxy debugging increasingly unreliable, with stricter certificate validation and network security policy enforcement.

  2. OkHttp 4.x dominance in the Android ecosystem means the vast majority of apps use an interceptor-friendly networking stack — making Atlantis's automatic interception possible out of the box.

  3. The rise of WebSocket-heavy architectures (GraphQL subscriptions, real-time collaboration, live data streaming) has exposed how poorly traditional proxies handle WebSocket debugging.

Atlantis Android exploits a brilliant architectural insight: instead of forcing network traffic through a proxy, instrument the client itself. By operating as an OkHttp interceptor within your app's process, Atlantis captures traffic at the application layer — after TLS decryption but before your business logic processes it. This means HTTPS traffic is captured in its fully decrypted, human-readable form without any certificate manipulation whatsoever.

The library is written in Kotlin 1.9+, targets Android API 26+ (Android 8.0 Oreo), and integrates seamlessly with OkHttp 4.x/5.x, Retrofit 2.9+, and Apollo Kotlin 3.x/4.x. With GZIP compression for efficient data transfer and Network Service Discovery (NSD) for automatic Proxyman detection, it's engineered for production-grade debugging scenarios.


Key Features That Will Transform Your Debugging Workflow

Atlantis Android isn't a toy — it's a precision-engineered debugging instrument. Let's dissect what makes it technically superior:

Automatic OkHttp Traffic Interception

The magic happens through AtlantisInterceptor, a standard OkHttp Interceptor implementation that plugs into your existing OkHttpClient builder. Because it operates as a network interceptor (positioned optimally in OkHttp's interceptor chain), it captures the complete request/response cycle including:

  • Full request headers and body (even multipart uploads)
  • Response headers, status codes, and bodies
  • Timing metrics for performance analysis
  • Redirect chains and retry attempts

The critical advantage? Your existing networking code requires zero modification beyond adding one line to your OkHttpClient.Builder.

WebSocket Message Capture (Send, Receive, Close)

This is where Atlantis absolutely demolishes traditional proxies. WebSocket debugging through Charles or mitmproxy is notoriously painful — binary frames, fragmented messages, and connection upgrade complexities make inspection nearly useless.

Atlantis's AtlantisWebSocketListener wrapper captures:

  • Text messages in human-readable form
  • Binary messages with Base64 encoding for inspection
  • Connection lifecycle events (open, closing, closed, failure)
  • Ping/pong frames for heartbeat debugging

For developers building real-time features with Apollo Kotlin's WebSocket subscriptions or raw OkHttp WebSockets, this is game-changing.

Zero-Configuration Proxyman Detection

Atlantis employs Network Service Discovery (NSD/mDNS) to automatically locate Proxyman on your local network. No IP addresses to memorize. No port configurations to juggle. Launch Proxyman on your Mac, start your Android app, and the connection establishes automatically.

For emulator development, direct connection support bypasses network discovery entirely — essential when emulators run on isolated virtual networks.

Efficient GZIP Compression

Network debugging can generate massive data volumes. Atlantis compresses all captured traffic using GZIP before transmission, ensuring your debugging session doesn't become a bandwidth bottleneck — critical when capturing media uploads or large API responses.

Debug-Only Build Integration

The library is designed for debugImplementation dependency scope, ensuring zero impact on release builds. Your production APK contains no Atlantis code, no debugging overhead, no security surface area expansion.


Real-World Use Cases Where Atlantis Shines

1. Debugging HTTPS APIs in Corporate Environments

Corporate networks with SSL inspection proxies, custom root CAs, and certificate pinning make traditional proxy debugging impossible. Atlantis operates entirely within your app's process, completely bypassing network-level interception. Your IT department's security policies become irrelevant to your debugging workflow.

2. Rapid Retrofit API Development

You're iterating on a new REST API endpoint. With Atlantis, you instantly see:

  • Whether your @Body annotation correctly serialized to JSON
  • If @Header parameters are actually attached
  • The exact response structure before Gson/Jackson parsing
  • Timing breakdowns to identify slow endpoints

No more Log.d() spam or Timber trees cluttering your codebase.

3. Apollo Kotlin GraphQL Subscription Debugging

GraphQL subscriptions over WebSocket are notoriously difficult to inspect. Atlantis captures the complete WebSocket message flow — from connection_init to subscribe operations to streaming next payloads — letting you verify your Apollo Kotlin configuration, authentication token refresh timing, and reconnection logic.

4. File Upload Progress Verification

Multipart file uploads with progress callbacks are a common source of bugs. Atlantis reveals the actual bytes transmitted, chunk boundaries, and server responses — essential when Content-Length mismatches or premature connection closures cause mysterious failures.

5. Third-Party SDK Network Inspection

When integrating opaque SDKs (analytics, attribution, payment processors), you need to verify their network behavior. Atlantis captures all OkHttp traffic including SDK-generated requests, exposing hidden API calls, unexpected data collection, or misconfigured endpoints.


Step-by-Step Installation & Setup Guide

Prerequisites

  • Android Studio Hedgehog (2023.1.1) or newer
  • Android API 26+ target device or emulator
  • OkHttp 4.x or 5.x in your project
  • Proxyman installed on your Mac (download from proxyman.com)

Step 1: Add Repository Configuration

For JitPack (Recommended):

In your project's settings.gradle.kts:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://jitpack.io") }  // Add JitPack repository
    }
}

For Maven Central (skip repository configuration — mavenCentral() is typically already present).

Step 2: Add Atlantis Dependency

Kotlin DSL with JitPack:

dependencies {
    // Only included in debug builds — zero release impact
    debugImplementation("com.github.ProxymanApp:atlantis-android:v1.0.0")
}

Groovy DSL with JitPack:

dependencies {
    debugImplementation 'com.github.ProxymanApp:atlantis-android:v1.0.0'
}

Maven Central alternative (Kotlin DSL):

dependencies {
    debugImplementation("com.proxyman:atlantis-android:1.0.0")
}

Step 3: Initialize in Your Application Class

Create or modify your Application subclass:

import android.app.Application
import com.proxyman.atlantis.Atlantis

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        
        // Only start Atlantis in debug builds — production stays clean
        if (BuildConfig.DEBUG) {
            Atlantis.start(this)
        }
    }
}

Critical: Ensure your AndroidManifest.xml declares this application class:

<application
    android:name=".MyApplication"
    ... >

Step 4: Configure OkHttpClient

Add the Atlantis interceptor to your networking stack:

import okhttp3.OkHttpClient
import com.proxyman.atlantis.Atlantis

val okHttpClient = OkHttpClient.Builder()
    .addInterceptor(Atlantis.getInterceptor())  // Captures all HTTP/HTTPS traffic
    .build()

Pro tip: If you use Dependency Injection (Hilt, Koin, or manual), provide this configured OkHttpClient as a singleton to ensure all network traffic flows through Atlantis.

Step 5: Launch and Verify

  1. Open Proxyman on your Mac
  2. Run your Android app on device or emulator
  3. Trigger any network request
  4. Watch traffic appear instantly in Proxyman's traffic list

REAL Code Examples from Atlantis Android

Let's examine production-ready code patterns using actual examples from the repository.

Example 1: Basic Application Initialization

The foundation of Atlantis integration — initializing in your Application class with proper build-type gating:

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        
        // Critical: Only initialize in debug builds
        // This ensures zero Atlantis code in release APKs
        if (BuildConfig.DEBUG) {
            // Starts NSD discovery and prepares the interceptor
            // Context parameter enables emulator direct-connection fallback
            Atlantis.start(this)
        }
    }
}

Why this pattern matters: The BuildConfig.DEBUG guard is non-negotiable. Atlantis's start() method initializes background threads for network discovery and establishes the TCP transport layer to Proxyman. You never want this running in production — not for performance, not for security, not for APK size.

Example 2: Retrofit Integration with Atlantis

Real-world Retrofit 2.9+ configuration capturing all API traffic:

import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import okhttp3.OkHttpClient
import com.proxyman.atlantis.Atlantis

object NetworkModule {
    
    private val okHttpClient: OkHttpClient by lazy {
        OkHttpClient.Builder()
            // Atlantis interceptor captures BEFORE other interceptors
            // Position matters: place first to see raw requests
            .addInterceptor(Atlantis.getInterceptor())
            // Your existing interceptors (auth, logging, retry)
            .addInterceptor(AuthInterceptor())
            .build()
    }
    
    val retrofit: Retrofit by lazy {
        Retrofit.Builder()
            .baseUrl("https://api.yourservice.com/")
            .client(okHttpClient)  // Atlantis-enabled client
            .addConverterFactory(GsonConverterFactory.create())
            .build()
    }
}

Key insight: Atlantis.getInterceptor() returns a standard OkHttp Interceptor. This means it composes perfectly with existing interceptor chains. The order matters — placing Atlantis first captures the rawest form of your requests before authentication tokens or retry logic modifies them.

Example 3: WebSocket Traffic Capture

The crown jewel feature — WebSocket debugging that traditional proxies simply cannot match:

import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.WebSocket
import okhttp3.WebSocketListener
import com.proxyman.atlantis.Atlantis

class ChatRepository @Inject constructor(
    private val okHttpClient: OkHttpClient
) {
    fun connectWebSocket(url: String): WebSocket {
        val request = Request.Builder()
            .url(url)
            .build()
        
        // Wrap YOUR WebSocketListener with Atlantis's capturing wrapper
        // This preserves all your business logic while adding invisible inspection
        val capturingListener = Atlantis.wrapWebSocketListener(
            object : WebSocketListener() {
                override fun onOpen(webSocket: WebSocket, response: Response) {
                    // Your connection established logic
                    println("WebSocket connected: ${response.code}")
                }
                
                override fun onMessage(webSocket: WebSocket, text: String) {
                    // Your message handling — completely unchanged
                    handleIncomingMessage(text)
                }
                
                override fun onClosing(webSocket: WebSocket, code: Int, reason: String) {
                    // Your cleanup logic
                    println("WebSocket closing: $code / $reason")
                }
                
                override fun onFailure(webSocket: WebSocket, t: Throwable, response: Response?) {
                    // Your error handling
                    logError(t)
                }
            }
        )
        
        // Pass the WRAPPED listener to OkHttp — Atlantis handles the rest
        return okHttpClient.newWebSocket(request, capturingListener)
    }
}

What's happening under the hood? Atlantis.wrapWebSocketListener() returns a delegating listener that:

  1. Forwards all callbacks to your original listener (zero behavior change)
  2. Intercepts every onMessage to capture payload content
  3. Records onOpen/onClosing/onFailure for connection lifecycle visibility
  4. Serializes WebSocket frames through the same GZIP-compressed transport as HTTP traffic

This is transparent instrumentation — your code doesn't know Atlantis exists, yet every WebSocket frame becomes inspectable in Proxyman's dedicated WebSocket view.

Example 4: Apollo Kotlin GraphQL Configuration

For GraphQL enthusiasts using Apollo Kotlin 3.x/4.x:

import com.apollographql.apollo3.ApolloClient
import com.apollographql.apollo3.network.okHttpClient
import okhttp3.OkHttpClient
import com.proxyman.atlantis.Atlantis

val apolloClient = ApolloClient.Builder()
    .serverUrl("https://graphql.yourservice.com")
    .okHttpClient(
        OkHttpClient.Builder()
            .addInterceptor(Atlantis.getInterceptor())
            .build()
    )
    .build()

Apollo Kotlin's okHttpClient builder method lets you inject your pre-configured, Atlantis-enabled client. Both HTTP queries and WebSocket subscriptions are captured automatically — no separate configuration needed.


Advanced Usage & Best Practices

Optimize for High-Traffic Scenarios

If your app generates hundreds of requests per minute (analytics-heavy apps, real-time data streams), consider:

  • Filtering captured domains in Proxyman to reduce noise
  • Using releaseImplementation with a no-op variant to maintain build consistency
  • Monitoring memory usage during extended debugging sessions

Team Onboarding Strategy

Add Atlantis setup to your project onboarding documentation. The one-time Application class modification and OkHttpClient configuration should be committed to version control, making network debugging available to every team member from day one.

CI/CD Integration

Never include Atlantis in automated test builds that execute in CI environments without Proxyman running. The library gracefully handles missing Proxyman instances, but unnecessary discovery attempts add startup latency.

Security Audit Compliance

For teams in regulated industries (finance, healthcare), document that Atlantis:

  • Is compile-time excluded from release builds
  • Operates only on local networks via NSD
  • Uses no external servers or cloud services

Comparison with Alternatives

Feature Atlantis Android Charles Proxy mitmproxy OkHttp Logging Interceptor
Proxy Configuration Required ❌ None ✅ Complex ✅ Complex ❌ None
Certificate Installation ❌ None ✅ Required ✅ Required ❌ None
HTTPS Decryption ✅ Automatic ✅ With cert ✅ With cert ❌ Plaintext only
WebSocket Support ✅ Native ⚠️ Limited ⚠️ Complex ❌ None
Request/Response Body ✅ Full capture ✅ Full capture ✅ Full capture ✅ Full (logged)
Beautiful UI ✅ Proxyman macOS ✅ Charles UI ❌ Terminal/Web ❌ Logcat only
Android 14+ Compatibility ✅ Perfect ⚠️ Problematic ⚠️ Problematic ✅ Perfect
Team Collaboration ✅ Share Proxyman sessions ✅ HAR export ✅ HAR export ❌ Manual log sharing
Performance Overhead Minimal (debug only) Network latency Network latency Minimal
Setup Time 2 minutes 15-30 minutes 15-30 minutes 5 minutes

The verdict? Atlantis Android + Proxyman offers the fastest time-to-debugging with the richest inspection capabilities. Charles and mitmproxy remain powerful for cross-platform scenarios, but their proxy-based architecture is increasingly fragile on modern Android. OkHttp's logging interceptor is simpler but lacks HTTPS body inspection and any UI — raw logcat scrolling is no way to debug complex APIs.


Frequently Asked Questions

Does Atlantis Android work with Flutter or React Native?

Atlantis Android captures OkHttp traffic only. Flutter's default HTTP client (dart:io HttpClient) and React Native's networking layer don't use OkHttp directly in standard configurations. For Flutter, consider using the dio package with an OkHttp-backed adapter. For React Native, investigate custom native module approaches.

Can I use Atlantis in production builds?

Absolutely not recommended. The library is explicitly designed for debugImplementation scope. Production inclusion would expose network traffic externally and violate security best practices. The BuildConfig.DEBUG guard in your Application class prevents accidental production activation.

Does Atlantis support Android API 24 or 25?

No — API 26+ (Android 8.0) is required. This limitation stems from NSD (Network Service Discovery) API requirements and modern Kotlin coroutine dependencies. The vast majority of active devices now run API 26+, making this a reasonable tradeoff.

What if Proxyman isn't detected automatically?

For physical devices, ensure both devices are on the same WiFi network with multicast/NSD enabled. For emulators, Atlantis automatically falls back to direct localhost connection (emulator's host IP). You can also configure manual connection in advanced scenarios.

Is captured data encrypted between device and Proxyman?

Traffic flows over local network only — never the internet. The TCP transport between Atlantis and Proxyman operates on your secure local network. For extremely sensitive debugging, use emulator direct connection which stays entirely within your machine.

Can I capture traffic from third-party SDKs using OkHttp?

Yes! If the SDK exposes its OkHttpClient for configuration (common pattern), add Atlantis's interceptor. For opaque SDKs without client access, Atlantis cannot intercept — this is an intentional Android security boundary.

How does Atlantis compare to Flipper's network plugin?

Facebook's Flipper requires desktop app installation and manual plugin configuration. Atlantis offers zero desktop configuration with automatic discovery, plus superior WebSocket inspection through Proxyman's dedicated UI. Flipper's advantage: broader plugin ecosystem beyond networking.


Conclusion: Your Debugging Workflow Just Evolved

Let's be direct: you're wasting time with proxy-based Android network debugging. Every certificate installation, every network_security_config.xml tweak, every mysterious SSL handshake failure — they're all symptoms of an architectural approach that modern Android has outgrown.

Atlantis Android represents the future: client-side instrumentation that captures everything, configures nothing, and just works. In the time it took you to read this article, you could have installed Atlantis, launched Proxyman, and inspected your first HTTPS request.

The library's elegance lies in its radical simplicity — one dependency, two lines of code, infinite debugging clarity. Whether you're wrestling with Retrofit APIs, debugging Apollo Kotlin subscriptions, or demystifying third-party SDK behavior, Atlantis transforms network debugging from a chore into a superpower.

My recommendation? Add Atlantis to your project this week. Make it part of your standard debug build configuration. Your future self — debugging that 2 AM production issue — will thank you.

Ready to never configure a proxy again?

👉 Star Atlantis Android on GitHub and install it in your next build. The five minutes you spend now will save you hours of proxy pain tomorrow.

Happy debugging — the effortless way.

Comments (0)

Comments are moderated before appearing.

No comments yet. Be the first to share your thoughts!

Support us! ☕