Experimental SOCKS v4 & v5 client for Kotlin Multiplatform
- 🚀 uses ktor
Current Version: coming soon
repositories {
maven("https://maven.dimensional.fun/public")
}
dependencies {
implementation("fun.dimensional:ksocks-core:{VERSION}")
}
fun main() {
val selector = ActorSelectorManager(Dispatchers.Default + Job())
val socksServer = InetSocketAddress("127.0.0.1", 1080)
// SOCKS5
val connection = socks(selector, socksServer)
.v5()
.userPass("test", "test") // this can be omitted.
.connect(SocksAddress("ip", "port"))
// SOCKS4
val connection = socks(selector, socksServer)
.v4()
.connect(SocksAddress("ip", "port"))
}
- SOCKS on wikipedia
- https://github.com/JoshGlazebook/socks
Dimensional Fun © 2020 - 2022