import IPostMessage from '../../IPostMessage'; import IProxy from './IProxy'; /** * The `sos.management.proxy` API groups together methods for managing the proxy settings on the device. * *
* Proxy Management Capabilities * | 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). *
*/ export default class Proxy implements IProxy { private messagePrefix; private postMessage; /** @internal */ constructor(messagePrefix: string, postMessage: IPostMessage); /** * The `isEnabled()` method returns whether the proxy is enabled on the device. * * @returns {Promise} A promise that resolves to a boolean indicating if the proxy is enabled. * @since 5.4.0 * * @example * const enabled = await sos.management.proxy.isEnabled(); * console.log(`Proxy is enabled: ${enabled}`); */ isEnabled(): Promise; /** * The `setManual()` allows you to manually configure the proxy settings on the device. * * @param uri The URI of the proxy server * @param port The port of the proxy server * @param username The username for the proxy server * @param password The password for the proxy server * @param bypassList The list of IP's or addresses to bypass proxy settings * @return {Promise} A promise that resolves when the proxy is set. * @throws {Error} If the proxy settings are invalid. * @throws {Error} If the device does not support proxy management. * @throws {Error} If the device does not support setting the proxy bypass list. * @since 5.4.0 * * @example * await sos.management.proxy.setManual('178.62.193.192', 1080, 'username', 'password'); * * // With bypass list example * await sos.management.proxy.setManual('178.62.193.192', 1080, 'username', 'password', [ * '127.0.0.1', '*.example.com', 'example.com' * ]); */ setManual(uri: string, port: number, username?: string, password?: string, bypassList?: string[]): Promise; /** * The `disable()` method disables the proxy on the device. * * @returns {Promise} A promise that resolves when the proxy is disabled. * @throws {Error} If the device does not support proxy management. * @since 5.4.0 * * @example * await sos.management.proxy.disable(); */ disable(): Promise; /** * The `getConnectedTo()` method returns the current connected proxy server URI on the device. * * @returns {Promise} A promise that resolves to the URI of the connected proxy server. * @throws {Error} If the device does not support proxy management. * @since 5.4.0 * * @example * const uri = await sos.management.proxy.getConnectedTo(); * console.log(uri); // 178.62.193.192 */ getConnectedTo(): Promise; /** * The `getBypassList()` method returns set IPs or addresses which are bypassed for current * proxy settings. Those addresses are not fetched via set proxy. * * @returns {Promise} A promise that resolves to a list of IPs / addresses * @throws {Error} If device does not support setting proxy bypass list * @since 8.9.0 */ getBypassList(): Promise; private getMessage; }