mirror of
https://github.com/ars3niy/tdlib-purple
synced 2025-08-31 05:55:08 +00:00
Use configured proxy servers
This commit is contained in:
@@ -57,6 +57,26 @@ std::string messageTypeToString(const td::td_api::MessageContent &content)
|
||||
return "id " + std::to_string(content.get_id());
|
||||
}
|
||||
|
||||
std::string proxyTypeToString(PurpleProxyType proxyType)
|
||||
{
|
||||
switch (proxyType) {
|
||||
case PURPLE_PROXY_NONE:
|
||||
case PURPLE_PROXY_USE_GLOBAL:
|
||||
case PURPLE_PROXY_USE_ENVVAR:
|
||||
return "unknown";
|
||||
case PURPLE_PROXY_HTTP:
|
||||
return "HTTP";
|
||||
case PURPLE_PROXY_SOCKS4:
|
||||
return "SOCKS4";
|
||||
case PURPLE_PROXY_SOCKS5:
|
||||
return "SOCKS5";
|
||||
case PURPLE_PROXY_TOR:
|
||||
return "TOR";
|
||||
}
|
||||
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char *getPurpleStatusId(const td::td_api::UserStatus &tdStatus)
|
||||
{
|
||||
if (tdStatus.get_id() == td::td_api::userStatusOnline::ID)
|
||||
|
Reference in New Issue
Block a user