1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-10-31 21:43:48 +00:00
tgbotapi/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/ProxySettings.kt

19 lines
536 B
Kotlin
Raw Normal View History

2018-12-26 08:07:24 +00:00
package com.github.insanusmokrassar.TelegramBotAPI.bot
import com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.useWith
2018-12-26 08:07:24 +00:00
import okhttp3.OkHttpClient
data class ProxySettings(
val host: String = "localhost",
val port: Int = 1080,
val username: String? = null,
val password: String? = null
)
@Deprecated(
"Replaced in Ktor package",
ReplaceWith("useWith", "com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.useWith")
)
fun OkHttpClient.Builder.useWith(proxySettings: ProxySettings) = useWith(proxySettings)