> For the complete documentation index, see [llms.txt](https://dinproxy.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dinproxy.gitbook.io/docs/guides/mobile-proxies/endpoints-and-testing.md).

# Endpoints & testing

What each part of an endpoint means, the output formats, and how to test the connection.

An endpoint is one ready-to-use proxy: address, port, username with its options, and password. Mobile endpoints use port `7779`.

## Generate endpoints in the dashboard

**Mobile Proxies → Connection setup** builds endpoints for you. It looks the same as on the Rotating Proxies page shown here, except that **Select location** asks for the country only.

![Connection setup: 1 proxy user, 2 location, 3 session type, 4 generate, 5 the test request, 6 the endpoints](https://425895435-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7E6QHTS6ybO8hjC6Muku%2Fuploads%2FwepB15MjZxNFe5vzadwK%2Fdinproxy-connection-setup.png?alt=media)

1. **Authentication method**: choose **Username & password** and pick the [proxy user](https://dinproxy.gitbook.io/docs/getting-started/proxy-users.md); its password is filled in. Or choose **IP whitelist** and pick one of your [whitelisted IPs](https://dinproxy.gitbook.io/docs/getting-started/ip-whitelist.md).
2. **Select location**: a country. **Global Mix** uses any country.
3. **Session type**: **Rotating session** for a new IP per request, or **Sticky session** to keep one IP for the minutes you set (up to 120).
4. Set the quantity (up to 500) and format under **Output options**, then click **Generate preview**.
5. **Test request**: code that sends one request through the first endpoint (see [Test the connection](#test-the-connection)).
6. **Endpoint list**: copy the endpoints, or download them as a text file.

## Reading an endpoint

The **Endpoint list** on the dashboard gives one line per endpoint, coloured part by part. This is what each part means:

![A mobile endpoint, part by part: host, port, proxy user, country, session ID, minutes and password](https://425895435-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7E6QHTS6ybO8hjC6Muku%2Fuploads%2FoC0nmoVehvC7U2OvNbp1%2Fdinproxy-mobile-endpoint-anatomy.png?alt=media)

| Part       | Example                                        | Meaning                                                                                                                                                                |
| ---------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Host       | `proxy.dinproxy.com`                           | The proxy address                                                                                                                                                      |
| Port       | `7779`                                         | The mobile port (residential proxies use `7777`)                                                                                                                       |
| Proxy user | `1024~myuser`                                  | Your account number, `~`, the proxy user name                                                                                                                          |
| Options    | `@country=us@session=1a755ae79d414011@time=10` | Optional: country, session ID and minutes. Each is explained in [Location & sessions](https://dinproxy.gitbook.io/docs/guides/mobile-proxies/location-and-sessions.md) |
| Password   | `YOUR_PASSWORD`                                | The proxy user's password                                                                                                                                              |

The proxy user and its options together are the **username**. In the **IP:Port:User:Pass** format, the parts are joined with `:` in this order: host, port, username, password.

## Output formats

Choose the format under **Output options → Format** before you generate:

| Format                 | Looks like                                                         | Use it for                                                                                    |
| ---------------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
| IP:Port:User:Pass      | `proxy.dinproxy.com:7779:1024~myuser@country=us:YOUR_PASSWORD`     | Tools that import proxy lists                                                                 |
| User:Pass\@IP:Port     | `1024~myuser%40country%3Dus:YOUR_PASSWORD@proxy.dinproxy.com:7779` | Tools that take a proxy URL (already percent-encoded; add `http://` or `socks5h://` in front) |
| QR code (Shadowrocket) | A QR code for each endpoint                                        | Phone apps such as Shadowrocket: scan it to add the proxy                                     |

With **IP whitelist**, the format is set for you and has no password:

| Format        | Looks like                                           | When                                    |
| ------------- | ---------------------------------------------------- | --------------------------------------- |
| User\@IP:Port | `1024~myuser%40country%3Dus@proxy.dinproxy.com:7779` | You chose a country or a sticky session |
| IP:Port only  | `proxy.dinproxy.com:7779`                            | **Global Mix** with rotating sessions   |

For the QR code, open Shadowrocket on your iPhone, tap the scan icon at the top of the home screen and point the camera at the code. Each code holds one proxy as an HTTP server with a name such as `DINPROXY Mobile US 1`. With several endpoints, use the arrows under the code to go from one to the next. **Copy all** and **Download TXT** give the same proxies as links.

## Test the connection

The **Test request** box gives code that sends one request through the proxy with the first generated endpoint. Pick the language in the box: Node.js, Python, cURL, Java, C#, PHP, Go or Ruby. For cURL, choose **macOS / Linux** (run it in a terminal) or **Windows** (run it in PowerShell; it uses `curl.exe`). Longer examples are on [Code examples](https://dinproxy.gitbook.io/docs/guides/mobile-proxies/code-examples.md).

The cURL command, part by part:

![The cURL test command, part by part: the proxy address, the proxy user with its options and password, and the test page](https://425895435-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7E6QHTS6ybO8hjC6Muku%2Fuploads%2F4I1QBlhuf8ldwslQAGyW%2Fdinproxy-mobile-curl-anatomy.png?alt=media)

| Part                                                  | Meaning                                                              |
| ----------------------------------------------------- | -------------------------------------------------------------------- |
| `--proxy 'http://proxy.dinproxy.com:7779'`            | The proxy to use. Write `socks5h://` instead of `http://` for SOCKS5 |
| `--proxy-user '1024~myuser@country=us:YOUR_PASSWORD'` | The username (with any options), `:`, the password                   |
| `'https://httpbin.org/ip'`                            | A test page that answers with the IP address it sees                 |

If the proxy works, the reply shows an IP address that is not your own, for example `{"origin": "203.0.113.45"}`. Run it again: with a rotating session the IP changes, with a session ID it stays the same. If you get an error instead, see [errors](https://dinproxy.gitbook.io/docs/guides/errors-and-troubleshooting.md).
