Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 111 for Dns (0.36 seconds)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dns.kt

      companion object {
        /**
         * A DNS that uses [InetAddress.getAllByName] to ask the underlying operating system to
         * lookup IP addresses. Most custom [Dns] implementations should delegate to this instance.
         */
        @JvmField
        val SYSTEM: Dns = DnsSystem()
    
        private class DnsSystem : Dns {
          override fun lookup(hostname: String): List<InetAddress> {
            try {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 2.2K bytes
    - Click Count (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/connection/RouteSelectorTest.kt

        var routeSelector = newRouteSelector(address)
        dns[PROXY_A_HOST] = dns.allocate(1)
        dns[PROXY_B_HOST] = dns.allocate(1)
    
        // Mark the ProxyA route as failed.
        val selection = routeSelector.next()
        dns.assertRequests(PROXY_A_HOST)
        val route = selection.next()
        assertRoute(route, address, proxyA, dns.lookup(PROXY_A_HOST, 0), PROXY_A_PORT)
        routeDatabase.failed(route)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Oct 08 03:50:05 GMT 2025
    - 20.3K bytes
    - Click Count (0)
  3. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

    /**
     * [DNS over HTTPS implementation][doh_spec].
     *
     * > A DNS API client encodes a single DNS query into an HTTP request
     * > using either the HTTP GET or POST method and the other requirements
     * > of this section.  The DNS API server defines the URI used by the
     * > request through the use of a URI Template.
     *
     * [doh_spec]: https://tools.ietf.org/html/draft-ietf-doh-dns-over-https-13
     */
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sat May 10 11:15:14 GMT 2025
    - 8.6K bytes
    - Click Count (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticator.kt

            continue
          }
    
          val dns = route?.address?.dns ?: defaultDns
          val auth =
            if (proxyAuthorization) {
              val proxyAddress = proxy.address() as InetSocketAddress
              Authenticator.requestPasswordAuthentication(
                proxyAddress.hostName,
                proxy.connectToInetAddress(url, dns),
                proxyAddress.port,
                url.scheme,
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  5. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

    @Tag("Slowish")
    class DnsOverHttpsTest {
      @RegisterExtension
      val platform = PlatformRule()
    
      @StartStop
      private val server = MockWebServer()
    
      private lateinit var dns: Dns
      private val cacheFs = FakeFileSystem()
      private val eventRecorder = EventRecorder()
      private val bootstrapClient =
        OkHttpClient
          .Builder()
          .protocols(listOf(Protocol.HTTP_2, Protocol.HTTP_1_1))
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Nov 04 19:13:52 GMT 2025
    - 11.9K bytes
    - Click Count (0)
  6. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DohProviders.kt

    import okhttp3.OkHttpClient
    
    /**
     * Temporary registry of known DNS over HTTPS providers.
     *
     * https://github.com/curl/curl/wiki/DNS-over-HTTPS
     */
    object DohProviders {
      private fun buildGoogle(bootstrapClient: OkHttpClient): DnsOverHttps =
        DnsOverHttps
          .Builder()
          .client(bootstrapClient)
          .url("https://dns.google/dns-query".toHttpUrl())
          .bootstrapDnsHosts(getByIp("8.8.4.4"), getByIp("8.8.8.8"))
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 3.8K bytes
    - Click Count (0)
  7. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

        server.useHttps(handshakeCertificates.sslSocketFactory())
    
        val dns =
          Dns {
            Dns.SYSTEM.lookup(server.hostName)
          }
    
        val client =
          clientTestRule
            .newClientBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            ).dns(dns)
            .build()
    
        server.enqueue(MockResponse())
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 6.3K bytes
    - Click Count (0)
  8. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/BootstrapDns.kt

    import java.net.InetAddress
    import java.net.UnknownHostException
    import okhttp3.Dns
    
    /**
     * Internal Bootstrap DNS implementation for handling initial connection to DNS over HTTPS server.
     *
     * Returns hardcoded results for the known host.
     */
    internal class BootstrapDns(
      private val dnsHostname: String,
      private val dnsServers: List<InetAddress>,
    ) : Dns {
      @Throws(UnknownHostException::class)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.3K bytes
    - Click Count (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RealInterceptorChain.kt

        return copy(writeTimeoutMillis = checkDuration("writeTimeout", timeout.toLong(), unit))
      }
    
      override fun withDns(dns: Dns): Interceptor.Chain {
        check(exchange == null) { "dns can't be adjusted in a network interceptor" }
    
        return copy(dns = dns)
      }
    
      override fun withSocketFactory(socketFactory: SocketFactory): Interceptor.Chain {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 12.8K bytes
    - Click Count (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/RouteFailureTest.kt

      @BeforeEach
      fun setUp() {
        socketFactory = SpecificHostSocketFactory(InetSocketAddress(server1.hostName, server1.port))
    
        client =
          clientTestRule
            .newClientBuilder()
            .dns(dns)
            .socketFactory(socketFactory)
            .eventListenerFactory(clientTestRule.wrap(eventRecorder))
            .build()
      }
    
      @RepeatedTest(100)
      fun http2OneBadHostOneGoodNoRetryOnConnectionFailure() {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sat Jan 10 15:25:06 GMT 2026
    - 11.8K bytes
    - Click Count (0)
Back to Top