> For the complete documentation index, see [llms.txt](https://docs.9proxy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.9proxy.com/developers/sdk/sdk-nodejs/functions/createwithconfigure-...args.md).

# createWithConfigure(...args)

Forwards proxies to a set of ports based on filter criteria.

* If a port is listed, the SDK attempts to forward a proxy that matches the given filter.
* If specific filter fields are not provided, values will be randomized.

```javascript
async createWithConfigure(requestId, ports, n, filterJson)
```

***

## Parameters

* **requestId** (<mark style="color:green;">string</mark>) – Correlation ID used to receive success/failure status via events.
* **ports** (<mark style="color:green;">Uint32Array</mark>) – List of ports to forward.
* **n** (<mark style="color:green;">number</mark>) – Number of elements in the ports array.
* **filterJson** (<mark style="color:green;">string</mark>) – JSON string containing filter criteria:

```json
// filterJson criteria

 {
  "plan": "1",
  "city": "Hanoi",
  "country": "VN",
  "state": "HN",
  "isp": "VNPT",
  "zip": "100000",
  "list_type": -1,
  "action": "manual"
}

- plan: plan ID (default "1")
- list_type: always -1 (indicates proxy list)
- action: user action type (default "manual")
- country, city, state, isp, zip: optional; randomized if omitted.

```

## Retun Value

number or array (binding dependent).

## Example

```javascript
// example

const ports = new Uint32Array([11000, 11001]);
const filter = JSON.stringify({
  plan: "1",
  city: "Hanoi",
  country: "VN",
  state: "HN",
  isp: "VNPT",
  zip: "100000",
  list_type: -1,
  action: "manual"
});
const rc = sdk.createWithConfigure("mgr-1", ports, ports.length, filter);


```
