Proxy

data class Proxy(val host: String, val port: Int, val credentials: Proxy.Credentials?, val type: Proxy.Type?, var forwardAuthentication: Boolean = false, var proxyResourcePacks: Boolean = false, var proxyDns: Boolean = false, var ipInfo: IpInfoApi.IpData? = null, var favorite: Boolean = false)

Contains serializable proxy data

Constructors

Link copied to clipboard
constructor(host: String, port: Int, credentials: Proxy.Credentials?, type: Proxy.Type?, forwardAuthentication: Boolean = false, proxyResourcePacks: Boolean = false, proxyDns: Boolean = false, ipInfo: IpInfoApi.IpData? = null, favorite: Boolean = false)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class Credentials(val username: String, val password: String)
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val port: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun Proxy.check(success: (Proxy) -> Unit, failure: (Throwable) -> Unit): Result<Unit>

Checks if a proxy is valid and can be used for Minecraft. This will use network resources to check the proxy, as well as update the ip information of the proxy.

Link copied to clipboard
fun handler(): ProxyHandler
Link copied to clipboard
fun httpClient(): OkHttpClient

An HTTP client that connects through this proxy and leaves hostnames for it to resolve