Setting Proxy Information
Function
This API is used to set proxy information.
Function Prototype
setProxy(proxyInfo: ProxyInfo, onSetProxyResult?: (ret: SDKERR, reason: string) => void): voidsetProxy(proxyInfo: ProxyInfo, onSetProxyResult?: (ret: SDKERR, reason: string) => void): void
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
proxyInfo | Yes | ProxyInfo | Proxy information. |
onSetProxyResult | Yes | (ret: SDKERR, reason: string) => void | Proxy information callback. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
proxyConfigPolicy | Yes | ProxyConfigPolicy | Proxy configuration policy. |
server | No | string | Proxy server address. |
port | No | number | Proxy server port. |
account | No | string | Proxy server account. |
password | No | string | Proxy server password. |
Enumeration Name | Enumerated Value | Description |
---|---|---|
HWM_PROXY_CONFIG_POLICY_CUSTOM | 0 | Use a proxy with custom configurations. |
HWM_PROXY_CONFIG_POLICY_OFF | 1 | Do not use a proxy. |
HWM_PROXY_CONFIG_POLICY_AUTO | 2 | Use the system proxy. |
Return Values
void
Callback Method Parameters
(ret: SDKERR, reason: string) => void
Parameter | Type | Description |
---|---|---|
ret | For details about SDKERR, see Error Code Reference. | Error code. |
reason | string | Error description. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot