This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Shows how to use okhttp and sttp in Scala asynchronously to talk to a Tor onion address via a Tor socks proxy, | |
| // without trying to resolve DNS outside of proxy (few http clients do this properly and instead return UnknownHostException) | |
| // libraryDependencies ++= Seq("com.squareup.okhttp3" % "okhttp" % "4.7.2", | |
| // "com.softwaremill.sttp.client" %% "okhttp-backend" % "2.1.2")) | |
| import java.io.IOException | |
| import java.net.{InetSocketAddress, Proxy} | |
| import okhttp3.{Call, Callback, OkHttpClient, Request, Response} |
OlderNewer