Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SocksProxy (0.22 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/SocksProxy.kt

    /**
     * A limited implementation of SOCKS Protocol Version 5, intended to be similar to MockWebServer.
     * See [RFC 1928](https://www.ietf.org/rfc/rfc1928.txt).
     */
    class SocksProxy {
      private val executor = Executors.newCachedThreadPool(threadFactory("SocksProxy"))
      private var serverSocket: ServerSocket? = null
      private val connectionCount = AtomicInteger()
      private val openSockets: MutableSet<Socket> = ConcurrentHashMap.newKeySet()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/SocksProxyTest.kt

      @RegisterExtension
      val clientTestRule = OkHttpClientTestRule()
    
      @StartStop
      private val server = MockWebServer()
    
      private val socksProxy = SocksProxy()
    
      @BeforeEach
      fun setUp() {
        socksProxy.play()
      }
    
      @AfterEach
      fun tearDown() {
        socksProxy.shutdown()
      }
    
      @Test
      fun proxy() {
        server.enqueue(MockResponse.Builder().body("abc").build())
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt

        server.enqueue(MockResponse())
        socksProxy = SocksProxy()
        socksProxy!!.play()
        val proxy = socksProxy!!.proxy()
        client =
          client
            .newBuilder()
            .proxy(proxy)
            .build()
        val call =
          client.newCall(
            Request
              .Builder()
              .url("http://" + SocksProxy.HOSTNAME_THAT_ONLY_THE_PROXY_KNOWS + ":" + server.port)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 60.4K bytes
    - Viewed (0)
Back to top