---
sidebar_position: 0
---

# proxy

The `sos.management.proxy` API groups together methods for managing the proxy settings on the device.

<details>
    <summary>Proxy Management Capabilities</summary>
		| Capability | Description |
		|:------------|:-------------|
		| `PROXY` | If device supports Proxy setup connection |

		If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).
</details>

## Methods

### disable()

The `disable()` method disables the proxy on the device.

```ts expandable
disable(): Promise<void>;
```

#### Return value

A promise that resolves when the proxy is disabled.

#### Possible errors

If the device does not support proxy management.

#### Example

```ts
await sos.management.proxy.disable();
```

<Separator />

### getConnectedTo()

The `getConnectedTo()` method returns the current connected proxy server URI on the device.

```ts expandable
getConnectedTo(): Promise<string>;
```

#### Return value

A promise that resolves to the URI of the connected proxy server.

#### Possible errors

If the device does not support proxy management.

#### Example

```ts
const uri = await sos.management.proxy.getConnectedTo();
console.log(uri); // 178.62.193.192
```

<Separator />

### isEnabled()

The `isEnabled()` method returns whether the proxy is enabled on the device.

```ts expandable
isEnabled(): Promise<boolean>;
```

#### Return value

A promise that resolves to a boolean indicating if the proxy is enabled.

#### Example

```ts
const enabled = await sos.management.proxy.isEnabled();
console.log(`Proxy is enabled: ${enabled}`);
```

<Separator />

### setManual()

The `setManual()` allows you to manually configure the proxy settings on the device.

```ts expandable
setManual(uri: string, port: number, username?: string, password?: string): Promise<void>;
```

#### Params

| Name       | Type     | Required         | Description                       |
|------------|----------|------------------|-----------------------------------|
| `uri`      | `string` |  <div>Yes</div>  | The URI of the proxy server       |
| `port`     | `number` |  <div>Yes</div>  | The port of the proxy server      |
| `username` | `string` |  <div>No</div>   | The username for the proxy server |
| `password` | `string` |  <div>No</div>   | The password for the proxy server |

#### Return value

A promise that resolves when the proxy is set.

#### Possible errors


- If the proxy settings are invalid.
- If the device does not support proxy management.

#### Example

```ts
await sos.management.proxy.setManual('178.62.193.192', 1080, 'username', 'password');
```