addProxy - libtd-ktx

Kotlin Coroutines extensions for Telegram API TDLib (Telegram Database library)


libtd-ktx / kotlinx.telegram.coroutines / addProxy

addProxy

suspend fun TelegramFlow.addProxy(server: String?, port: Int, enable: Boolean, type: ProxyType?): Proxy

Suspend function, which adds a proxy server for network requests. Can be called before authorization.

Parameters

server - Proxy server IP address.

port - Proxy server port.

enable - True, if the proxy should be enabled.

type - Proxy type.

Return Proxy Contains information about a proxy server.