> 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/getports.md).

# getPorts()

Retrieves all ports according to the current SDK settings.

```javascript
getPorts()
```

***

## Return Value

number\[] or Buffer (binding dependent) : All ports according to the current SDK settings.

## Example

```javascript
// example

const arr = sdk.getPorts();
console.log(arr);

```
