api.addProxy()
Adds a proxy server for network requests. Can be called before authorization
Parameters
AddProxyParams
:chevron_leftchevron_right
Parameters
Interface
Name | Type | Description |
---|---|---|
server | string | Proxy server IP address |
port | number | Proxy server port |
enable | boolean | True, if the proxy needs to be enabled |
type | Proxy type |
Returns
ApiResponse
interface:interface ApiResponse {
_: 'addProxy' | 'error'
airgram: Airgram
request: {
method: 'addProxy'
params: AddProxyParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}