Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 81 for Proxy (0.13 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java

        }
    
        @Override public void connectEnd(
            Call call, InetSocketAddress inetSocketAddress, Proxy proxy, Protocol protocol) {
          printEvent("connectEnd");
        }
    
        @Override public void connectFailed(Call call, InetSocketAddress inetSocketAddress, Proxy proxy,
            Protocol protocol, IOException ioe) {
          printEvent("connectFailed");
        }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 16 23:20:49 GMT 2020
    - 5.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

          }
    
        /**
         * Sets the HTTP proxy that will be used by connections created by this client. This takes
         * precedence over [proxySelector], which is only honored when this proxy is null (which it is
         * by default). To disable proxy use completely, call `proxy(Proxy.NO_PROXY)`.
         */
        fun proxy(proxy: Proxy?) =
          apply {
            if (proxy != this.proxy) {
              this.routeDatabase = null
            }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/SocksProxy.kt

          } finally {
            for (socket in openSockets) {
              socket.closeQuietly()
            }
            Thread.currentThread().name = "SocksProxy"
          }
        }
      }
    
      fun proxy(): Proxy {
        return Proxy(
          Proxy.Type.SOCKS,
          InetSocketAddress.createUnresolved("localhost", serverSocket!!.localPort),
        )
      }
    
      fun connectionCount(): Int = connectionCount.get()
    
      fun shutdown() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

        val method = userResponse.request.method
        when (responseCode) {
          HTTP_PROXY_AUTH -> {
            val selectedProxy = route!!.proxy
            if (selectedProxy.type() != Proxy.Type.HTTP) {
              throw ProtocolException("Received HTTP_PROXY_AUTH (407) code while not using proxy")
            }
            return client.proxyAuthenticator.authenticate(route, userResponse)
          }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12.1K bytes
    - Viewed (4)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

          isTlsFallback = false,
        )
      }
    
      /**
       * Returns a request that creates a TLS tunnel via an HTTP proxy. Everything in the tunnel request
       * is sent unencrypted to the proxy server, so tunnels include only the minimum set of headers.
       * This avoids sending potentially sensitive data like HTTP cookies to the proxy unencrypted.
       *
       * In order to support preemptive authentication we pass a fake "Auth Failed" response to the
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
  6. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

            webSocketListener = listener
          }
    
        /**
         * Configures this response to be served as a response to an HTTP CONNECT request, either for
         * doing HTTPS through an HTTP proxy, or HTTP/2 prior knowledge through an HTTP proxy.
         *
         * When a new connection is received, all in-tunnel responses are served before the connection is
         * upgraded to HTTPS or HTTP/2.
         */
        fun inTunnel() =
          apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  7. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

      @Test fun connectExceptionsAreReturnedAsSuppressed() {
        val proxySelector = RecordingProxySelector()
        proxySelector.proxies.add(Proxy(Proxy.Type.HTTP, TestUtil.UNREACHABLE_ADDRESS_IPV4))
        proxySelector.proxies.add(Proxy.NO_PROXY)
        server.shutdown()
    
        client =
          client.newBuilder()
            .proxySelector(proxySelector)
            .readTimeout(Duration.ofMillis(100))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/ConnectionListenerTest.kt

        )
      }
    
      @Test
      @Throws(IOException::class)
      fun successfulHttpProxyConnect() {
        server!!.enqueue(MockResponse())
        val proxy = server!!.toProxyAddress()
        client =
          client.newBuilder()
            .proxy(proxy)
            .build()
        val call =
          client.newCall(
            Request.Builder()
              .url("http://www.fakeurl")
              .build(),
          )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  9. okhttp/src/test/java/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)
              .build(),
          )
        val response = call.execute()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 56.9K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Address.kt

      /** Returns the client's proxy authenticator. */
      @get:JvmName("proxyAuthenticator") val proxyAuthenticator: Authenticator,
      /**
       * Returns this address's explicitly-specified HTTP proxy, or null to delegate to the
       * [proxy selector][proxySelector].
       */
      @get:JvmName("proxy") val proxy: Proxy?,
      protocols: List<Protocol>,
      connectionSpecs: List<ConnectionSpec>,
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.4K bytes
    - Viewed (0)
Back to top