libtd-ktx / kotlinx.telegram.extensions / ProxyKtx
ProxyKtx
interface ProxyKtx :
BaseKtx
Interface for access TdApi.Proxy extension functions. Can be used alongside with other extension interfaces of the package. Must contain TelegramFlow instance field to access its functionality
Properties
api | Instance of the TelegramFlow connecting extensions to the Telegram Clientabstract val api: TelegramFlow |
Functions
edit | Suspend function, which edits an existing proxy server for network requests. Can be called before authorization.open suspend fun Proxy .edit(server: String ?, port: Int , enable: Boolean , type: ProxyType ?): Proxy |
enable | Suspend function, which enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization.open suspend fun Proxy .enable(): Unit |
getLink | Suspend function, which returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization.open suspend fun Proxy .getLink(): Text |
ping | Suspend function, which computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization.open suspend fun Proxy .ping(): Seconds |
remove | Suspend function, which removes a proxy server. Can be called before authorization.open suspend fun Proxy .remove(): Unit |
Inheritors
TelegramKtx | Interface for access all Telegram objects extension functions. Contains 182 extensionsinterface TelegramKtx : BasicGroupKtx , CallKtx , ChatKtx , FileKtx , MessageKtx , NotificationGroupKtx , ProxyKtx , SecretChatKtx , SupergroupKtx , UserKtx , CommonKtx |