Skip to content

A lightweight SOCKS5 proxy server written in pure Kotlin. It allows you to create local SOCKS5 proxy endpoints that forward traffic through a remote HTTPS proxy with optional authentication.

License

Notifications You must be signed in to change notification settings

cdpdriver/kdriver-proxy

Repository files navigation

kdriver-proxy

License Maven Central Version Issues Pull Requests codecov CodeFactor Open Source Helpers

A lightweight SOCKS5 proxy server written in pure Kotlin. It allows you to create local SOCKS5 proxy endpoints that forward traffic through a remote HTTPS proxy with optional authentication.

Ideal for Kotlin applications needing dynamic local proxies without relying on external binaries like Gost, especially on platforms like Windows.

It's perfect for use with KDriver.

📦 Installation

Add the dependency to your build.gradle.kts:

dependencies {
    implementation("dev.kdriver:proxy:0.1.0")
}

🚀 Features

  • Start a local SOCKS5 proxy on any port
  • Forward all traffic through a remote HTTPS proxy (with optional auth)
  • Run multiple proxies in parallel
  • Fully coroutine-based (non-blocking)
  • Pure Kotlin (JVM)

🧪 Usage

Start a Proxy

val startUseCase = StartLocalProxyUseCase()
startUseCase(1080, Proxy(URI("https://your-remote-proxy.com:443"), "yourUsername", "yourPassword"))

Now you can connect to: socks5://localhost:1080 Your traffic will go through the remote proxy with authentication.

Stop a Proxy

val stopUseCase = StopLocalProxyUseCase()
stopUseCase(1080)

About

A lightweight SOCKS5 proxy server written in pure Kotlin. It allows you to create local SOCKS5 proxy endpoints that forward traffic through a remote HTTPS proxy with optional authentication.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  
  •  

Packages

No packages published

Languages