An iOS app’s ordinary HTTPS requests can appear in a debugging proxy while its WebSocket traffic is missing. Identify the WebSocket transport first: URLSessionWebSocketTask can use a session-level proxy configuration, while a library opening its own sockets needs its own supported integration. For a raw Network.framework connection on iOS 17+, configure NWConnection’s own proxy context.

For iOS 17 or later, create the session with an explicit SOCKSv5 proxy:

import Foundation
import Network

@available(iOS 17.0, *)
func makeDebugSession() -> URLSession {
    let configuration = URLSessionConfiguration.default
    let endpoint = NWEndpoint.hostPort(
        host: "192.0.2.10", port: 8889)
    configuration.proxyConfigurations = [
        ProxyConfiguration(socksv5Proxy: endpoint)
    ]
    return URLSession(configuration: configuration)
}

Replace the documentation address and port with the reachable SOCKS listener of the existing debugging proxy. Enable that listener in the proxy application. Its HTTP listener can be on another port.

Create the webSocketTask from the returned session. A task created through another URLSession does not inherit this session’s override. An empty proxyConfigurations array uses the system defaults; it is not an explicit direct-route selection.

Reachability and readable messages are separate milestones

A physical phone needs an address that reaches the debugging computer. On that phone, 127.0.0.1 names the phone itself. Check the listener interface and the proxy’s permitted client access when the connection never reaches it.

A SOCKS route carries the connection. Reading wss content additionally requires the debugging tool’s TLS inspection setup and appropriate trust on the device. Certificate pinning or a separate TLS implementation can prevent that inspection even when traffic reaches the listener.

Look for the WebSocket exchange and messages after the connection is established. Seeing only a polling request from a Socket.IO application is not proof that its later WebSocket transport used the same route. Keep this explicit debugging configuration within the app’s intended development setup.

Related articles