Proxy
Proxy management API enables you to manage currently connected proxy on your device.
All methods
Method | Description | Supported since |
---|---|---|
isEnabled() | Get proxy setting state | 5.4 |
setManual() | Set proxy using provides parameters | 5.4 |
disable() | Disable proxy | 5.4 |
getConnectedTo() | Get connected proxy uri | 5.4 |
isEnabled()
Method isEnabled()
returns the current state of a proxy on your device.
Javascript example
sos.management.proxy.isEnabled().then((isEnabled) => {
console.log(isEnabled);
});
setManual()
Method setManual()
lets you set proxy settings on your device.
Param | Type | Required | Value | Description |
---|---|---|---|---|
uri | String | Yes | 178.62.193.192 | URI of the proxy server |
port | Number | No | 0 - 65353 | Port number |
username | String | No | johndoe | Username |
password | String | No | superpass | Password |
Javascript example
sos.management.proxy.setManual(
'178.62.193.192',
1080,
'username',
'password'
).then(() => {
console.log('Proxy successfully set.');
});
disable()
Method disable()
lets you disable current active proxy setting on your device.
Javascript example
sos.management.proxy.disable().then(() => {
console.log('Proxy successfully disabled.');
});
getConnectedTo()
Method getConnectedTo()
returns the current connected proxy server uri on your device.
Javascript example
sos.management.proxy.getConnectedTo().then((uri) => {
console.log(uri); //178.62.193.192
});