An Akka HTTP client transport that connects to target server via a SOCKS5 proxy.
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.HttpRequest
import akka.http.scaladsl.settings.{ClientConnectionSettings, ConnectionPoolSettings}
import io.github.rorp.akka.http.scaladsl.socks5.Socks5ClientTransport
import java.net.InetSocketAddress
implicit val system = ActorSystem()
val socks5ProxyTransport = Socks5ClientTransport.socks5Proxy(InetSocketAddress.createUnresolved("localhost", 1080))
val settings = ConnectionPoolSettings(system).withTransport(socks5ProxyTransport)
Http().singleRequest(HttpRequest(uri = "https://github.com"), settings = settings)
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.headers.BasicHttpCredentials
import akka.http.scaladsl.model.HttpRequest
import akka.http.scaladsl.settings.{ClientConnectionSettings, ConnectionPoolSettings}
import io.github.rorp.akka.http.scaladsl.socks5.Socks5ClientTransport
import java.net.InetSocketAddress
implicit val system = ActorSystem()
val proxyAddress = InetSocketAddress.createUnresolved("localhost", 1080)
val proxyAuth = BasicHttpCredentials("proxy-user", "secret-proxy-pass")
val socks5ProxyTransport = Socks5ClientTransport.socks5Proxy(proxyAddress, proxyAuth)
val settings = ConnectionPoolSettings(system).withTransport(socks5ProxyTransport)
Http().singleRequest(HttpRequest(uri = "https://github.com"), settings = settings)