> For the complete documentation index, see [llms.txt](https://docs.ipdunar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipdunar.com/products/overview-1/protocols.md).

# Protocols

Mobile speaks the same protocols as residential — HTTP, HTTPS, SOCKS5 on port `7777`, with the protocol auto-detected from the client handshake. See [Residential protocols](https://docs.ipdunar.com/products/overview/protocols.md) for full curl/Python/Node samples and the SOCKS5 DNS-leak warning.

## Mobile-specific notes

* **Connection reuse is more important.** Mobile first-hop latency is high — re-using TCP/TLS connections (HTTP keep-alive, HTTP/2 multiplexing) significantly improves throughput.
* **HTTP/2 to the target works through the SOCKS5 / `CONNECT` tunnel.** ipdunar does not strip or downgrade.
* **WebSockets work** via standard `CONNECT` / SOCKS5 upgrade. Useful for chat apps and real-time APIs that gate behind mobile networks.
* **Mobile carrier transparent proxies** sometimes mutate HTTP headers (e.g. add `Via`, `X-Forwarded-For`). ipdunar does not strip these — the target sees them as the carrier would. Use HTTPS to avoid mutation.

## Quick reference

```bash
# HTTP/HTTPS
curl -x http://ipdunar_s1a2b3c4d5e-type-mob-region-us-asn-6167:PASSWORD@gate.ipdunar.com:7777 \
     https://example.com

# SOCKS5 (note socks5h:// for remote DNS)
curl --socks5-hostname ipdunar_s1a2b3c4d5e-type-mob-region-us-asn-6167:PASSWORD@gate.ipdunar.com:7777 \
     https://example.com
```

## When to prefer which on mobile

| Use case                         | Pick                             |
| -------------------------------- | -------------------------------- |
| Native HTTP scraping             | HTTP/HTTPS                       |
| Mobile app emulation with HTTP/2 | HTTP/HTTPS                       |
| Long-lived WebSocket             | HTTP/HTTPS (`CONNECT`) or SOCKS5 |
| Lower per-request overhead       | SOCKS5                           |
| Debugging with mitmproxy         | HTTP/HTTPS                       |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ipdunar.com/products/overview-1/protocols.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
