Skip to content

dimensional-fun/ksocks

Repository files navigation

Ksocks

Experimental SOCKS v4 & v5 client for Kotlin Multiplatform

  • 🚀 uses ktor

Discord Server

Installation

Current Version: coming soon

repositories {
    maven("https://maven.dimensional.fun/public")
}

dependencies {
    implementation("fun.dimensional:ksocks-core:{VERSION}")
}

Usage

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"))
}

Acknowledgements


Dimensional Fun © 2020 - 2022

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages