Airgram

Guides
/
/
Methods

api.testProxy()

Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization

Parameters TestProxyParams:

NameTypeDescription
serverstring Proxy server IP address
portnumber Proxy server port
type Proxy type
dcIdnumber Identifier of a datacenter, with which to test connection
timeoutnumber The maximum overall timeout for the request
Returns ApiResponse interface:
interface ApiResponse {
  _: 'testProxy' | 'error'
  airgram: Airgram
  request: {
    method: 'testProxy'
    params: TestProxyParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}