> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nodemaven.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure proxies with the SDKs

> Select Residential or Mobile, target locations, set filters, and understand parameter validation.

Set the proxy pool, location, filter, and connection details in code.

Start with the [Python](https://docs.nodemaven.com/developer-sdks/python.md), [Rust](https://docs.nodemaven.com/developer-sdks/rust.md), or [Go](https://docs.nodemaven.com/developer-sdks/go.md) quickstart. The examples below assume your proxy credentials are available as `NODEMAVEN_LOGIN` and `NODEMAVEN_PASSWORD`. Rust and Go examples are fragments for use inside a function that handles the returned result or error.

## Build a configuration

These examples request a US Residential proxy in California, targeting Los Angeles, with the Quality filter.

**Python**

```python theme={null}
from nodemaven import Proxy

proxy = Proxy(
    country="us",
    region="california",
    city="los angeles",
    filter="medium",
)
```

**Rust**

```rust theme={null}
let proxy = nodemaven::Proxy::builder()
    .param("country", "us")
    .param("region", "california")
    .param("city", "los angeles")
    .param("filter", "medium")
    .build()?;
```

**Go**

```go theme={null}
proxy, err := nodemaven.New(
    nodemaven.WithParam("country", "us"),
    nodemaven.WithParam("region", "california"),
    nodemaven.WithParam("city", "los angeles"),
    nodemaven.WithParam("filter", "medium"),
)
if err != nil {
    return err
}
```

Use location codes from the [available locations](https://docs.nodemaven.com/residential-mobile/locations.md) catalogue. Inventory changes, so a location shown in an example is not a promise of availability when your request runs.

## Supported parameters

This table describes the default NodeMaven gateway definition shipped with the SDK versions used in these guides.

| Parameter | What it controls | Example or accepted form |
| - | - | - |
| `country` | Exit country | `us`, `de`, `gb`, or `any` |
| `region` | Region within the selected country | `california` |
| `city` | City within the selected region | `los_angeles`; include its `region` |
| `isp` | Carrier that owns the exit IP | Use a code from the ISP catalogue for your country |
| `type` | Proxy pool | `residential` or `mobile` |
| `filter` | IP quality filter parameter | `medium` is the dashboard's Quality mode; the repository also records `low` and `high` as gateway values |
| `sid` | Sticky session ID | A nonempty value without `-` or whitespace |
| `ttl` | Requested sticky session lifetime | Documented examples include `1m`, `10m`, `10h`, and `24h` |
| `speed` | Speed filter parameter | The dashboard uses `fast`; the repository also records `slow` |
| `ipv4` | IP version parameter | The dashboard uses `true` |

The SDK repositories record that `speed` and `ipv4` are accepted by the gateway, but their effects have not been independently verified in the SDK's measurements. See the product documentation for [IP filters](https://docs.nodemaven.com/residential-mobile/ip-filter-modes.md) and [proxy parameters](https://docs.nodemaven.com/residential-mobile/proxy-string.md). Do not treat an accepted connection as a speed or IP-version guarantee.

`isp` means an exit carrier here. It does not select NodeMaven's separate ISP proxy product.

## Select Mobile proxies

Add `type="mobile"` while keeping your other settings:

**Python**

```python theme={null}
mobile = Proxy(country="us", type="mobile", filter="medium")
```

**Rust**

```rust theme={null}
let mobile = nodemaven::Proxy::builder()
    .param("country", "us")
    .param("type", "mobile")
    .param("filter", "medium")
    .build()?;
```

**Go**

```go theme={null}
mobile, err := nodemaven.New(
    nodemaven.WithParam("country", "us"),
    nodemaven.WithParam("type", "mobile"),
    nodemaven.WithParam("filter", "medium"),
)
if err != nil {
    return err
}
```

For Residential proxies, omit `type` or set it to `residential`. Residential and Mobile use the same gateway and proxy credentials.

## Set filters explicitly

The SDK builds the parameters you supply. It does not copy your current dashboard configuration or automatically add every dashboard default.

For example, `Proxy(country="us")` does not append `filter-medium`. Set `filter="medium"` when you want the Quality filter represented in the username. Keep the same settings when reusing a sticky session: changing a filter can create a different session identity.

## How values are normalized

For `country`, `region`, `city`, `isp`, and `type`, the SDK trims surrounding ASCII whitespace, converts ASCII uppercase letters to lowercase, and replaces remaining spaces with underscores. For example, `region="New York"` becomes `region-new_york`.

`sid`, `filter`, `ttl`, and `speed` are passed through without that normalization. Use lowercase filter and duration values, and no spaces. In particular, use `10m`, not `10M`.

All parameter values must be nonempty and must not contain `-`, which separates username parameters. Use `region="new york"` or `region="new_york"`, not `region="new-york"`.

## Understand validation limits

The proxy builder checks parameter names and formatting locally. It does not query the location catalogue or prove that a value is currently available. A misspelled parameter name such as `contry` is rejected; a correctly named parameter with an unavailable location can still reach the gateway.

The account client's `validate` method adds two checks: it looks up the country and detects a city supplied without a region. It does **not** fully validate region, city, or ISP values. See [Use the account API with the SDKs](https://docs.nodemaven.com/developer-sdks/account-api.md) for catalogue lookups and validation examples.

## Dashboard options outside the SDK builder

The dashboard supports options beyond the SDK's parameter list. In Python 0.1.7, Rust 0.2.2, and Go v0.1.1:

* `zip` is not an accepted proxy-builder parameter, although the account clients can read the ZIP catalogue.
* `norotate` is not an accepted proxy-builder parameter. Adding a `sid` creates a sticky-session configuration; it does not enable the dashboard's **No rotating** mode.

For those dashboard options, follow the existing [proxy string](https://docs.nodemaven.com/residential-mobile/proxy-string.md) and [session type](https://docs.nodemaven.com/residential-mobile/session-types.md) guides. Do not add unsupported names to SDK calls or assume the builder supports every product setting.

## Match protocol and port

The default SDK configuration uses HTTP at `gate.nodemaven.com:8080`. An HTTP proxy can carry HTTPS application requests through CONNECT, so an `https://` target does not require an HTTPS proxy URL.

If you use SOCKS5, configure both a SOCKS5-capable client and a SOCKS5 gateway port, such as `1080`. Changing only the URL scheme is not enough. The SDK's built-in connection check speaks HTTP CONNECT; it is not a SOCKS5 health check.

See [Protocols and ports](https://docs.nodemaven.com/residential-mobile/protocols-and-ports.md) for supported ranges.

## Next steps

* [Add sticky sessions](https://docs.nodemaven.com/developer-sdks/sessions.md)
* [Check the configuration and diagnose errors](https://docs.nodemaven.com/developer-sdks/connection-checks.md)
* [Read current location codes through the account API](https://docs.nodemaven.com/developer-sdks/account-api.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.