MD5 校验值:61e58c10a11e4adec8760ee3854e996a
C2391d.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package w5; import F5.q; import com.google.android.gms.internal.ads.C1690za; import com.google.android.gms.internal.ads.K5; import f0.AbstractC1761a; import java.io.IOException; import java.io.InterruptedIOException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.ProtocolException; import java.net.Proxy; import java.net.Socket; import java.net.SocketAddress; import java.net.SocketException; import java.net.SocketTimeoutException; import java.net.UnknownHostException; import java.net.UnknownServiceException; import java.security.cert.CertificateException; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.NoSuchElementException; import javax.net.ssl.SSLException; import javax.net.ssl.SSLHandshakeException; import javax.net.ssl.SSLPeerUnverifiedException; import q3.C2206c; import s5.C2262a; import s5.C2263b; import s5.C2268g; import s5.C2274m; import s5.C2280s; import s5.C2284w; import s5.EnumC2279r; import t5.AbstractC2342a; import u4.o; import v5.C2374b; import z5.p; public final class C2391d { public A2.g f19290a; public final K5 f19291b; public g f19292c; public boolean d; public C2284w e; public final m f19293f; public final i f19294g; public final C2262a f19295h; public final C2280s f19296i; public final C2263b f19297j; public C2391d(m mVar, i iVar, C2262a c2262a, C2280s c2280s, C2263b c2263b) { F4.f.g(iVar, "connectionPool"); F4.f.g(c2280s, "call"); F4.f.g(c2263b, "eventListener"); this.f19293f = mVar; this.f19294g = iVar; this.f19295h = c2262a; this.f19296i = c2280s; this.f19297j = c2263b; this.f19291b = new K5(c2262a, (C2206c) iVar.f19319f, c2280s, c2263b); } public final g a(int i5, int i6, int i7, boolean z6) { boolean z7; g gVar; Socket socket; g gVar2; boolean z8; C2284w c2284w; boolean z9; boolean z10; List list; C2284w c2284w2; Socket socket2; A2.g gVar3; boolean z11; String str; int i8; List list2; boolean contains; String str2; synchronized (this.f19294g) { try { m mVar = this.f19293f; synchronized (mVar.f19324a) { z7 = mVar.f19332k; } if (!z7) { this.d = false; m mVar2 = this.f19293f; gVar = mVar2.f19328g; if (gVar != null && gVar.f19306i) { socket = mVar2.e(); } else { socket = null; } m mVar3 = this.f19293f; gVar2 = mVar3.f19328g; if (gVar2 != null) { gVar = null; } else { gVar2 = null; } if (gVar2 == null) { if (this.f19294g.n(this.f19295h, mVar3, null, false)) { gVar2 = this.f19293f.f19328g; z8 = true; c2284w = null; } else { c2284w = this.e; if (c2284w != null) { this.e = null; } else if (d()) { g gVar4 = this.f19293f.f19328g; if (gVar4 != null) { c2284w = gVar4.f19314q; } else { F4.f.j(); throw null; } } z8 = false; } } z8 = false; c2284w = null; } else { throw new IOException("Canceled"); } } catch (Throwable th) { throw th; } } if (socket != null) { AbstractC2342a.d(socket); } if (gVar != null) { C2263b c2263b = this.f19297j; C2280s c2280s = this.f19296i; c2263b.getClass(); F4.f.g(c2280s, "call"); } if (z8) { C2263b c2263b2 = this.f19297j; C2280s c2280s2 = this.f19296i; if (gVar2 != null) { c2263b2.getClass(); F4.f.g(c2280s2, "call"); } else { F4.f.j(); throw null; } } if (gVar2 != null) { return gVar2; } if (c2284w == null && ((gVar3 = this.f19290a) == null || gVar3.f80a >= gVar3.f81b.size())) { K5 k52 = this.f19291b; if (k52.f7490c < ((List) k52.d).size() || (!((ArrayList) k52.f7489b).isEmpty())) { ArrayList arrayList = new ArrayList(); while (k52.f7490c < ((List) k52.d).size()) { if (k52.f7490c < ((List) k52.d).size()) { z11 = true; } else { z11 = false; } C2262a c2262a = (C2262a) k52.f7491f; if (z11) { List list3 = (List) k52.d; int i9 = k52.f7490c; k52.f7490c = i9 + 1; Proxy proxy = (Proxy) list3.get(i9); ArrayList arrayList2 = new ArrayList(); k52.e = arrayList2; if (proxy.type() != Proxy.Type.DIRECT && proxy.type() != Proxy.Type.SOCKS) { SocketAddress address = proxy.address(); if (address instanceof InetSocketAddress) { InetSocketAddress inetSocketAddress = (InetSocketAddress) address; F4.f.g(inetSocketAddress, "$this$socketHost"); InetAddress address2 = inetSocketAddress.getAddress(); if (address2 != null) { str = address2.getHostAddress(); str2 = "address.hostAddress"; } else { str = inetSocketAddress.getHostName(); str2 = "hostName"; } F4.f.b(str, str2); i8 = inetSocketAddress.getPort(); } else { throw new IllegalArgumentException(("Proxy.address() is not an InetSocketAddress: " + address.getClass()).toString()); } } else { C2274m c2274m = c2262a.f18309a; str = c2274m.e; i8 = c2274m.f18379f; } if (1 <= i8 && 65535 >= i8) { if (proxy.type() == Proxy.Type.SOCKS) { arrayList2.add(InetSocketAddress.createUnresolved(str, i8)); } else { ((C2263b) k52.f7494i).getClass(); F4.f.g((C2280s) k52.f7493h, "call"); F4.f.g(str, "domainName"); c2262a.d.getClass(); try { InetAddress[] allByName = InetAddress.getAllByName(str); F4.f.b(allByName, "InetAddress.getAllByName(hostname)"); int length = allByName.length; if (length != 0) { if (length != 1) { list2 = new ArrayList(new u4.d(allByName, false)); } else { list2 = com.bumptech.glide.e.i(allByName[0]); } } else { list2 = o.f18840b; } if (!list2.isEmpty()) { Iterator it = list2.iterator(); while (it.hasNext()) { arrayList2.add(new InetSocketAddress((InetAddress) it.next(), i8)); } } else { throw new UnknownHostException(c2262a.d + " returned no addresses for " + str); } } catch (NullPointerException e) { UnknownHostException unknownHostException = new UnknownHostException("Broken system behaviour for dns lookup of ".concat(str)); unknownHostException.initCause(e); throw unknownHostException; } } Iterator it2 = ((List) k52.e).iterator(); while (it2.hasNext()) { C2284w c2284w3 = new C2284w((C2262a) k52.f7491f, proxy, (InetSocketAddress) it2.next()); C2206c c2206c = (C2206c) k52.f7492g; synchronized (c2206c) { contains = ((LinkedHashSet) c2206c.e).contains(c2284w3); } if (contains) { ((ArrayList) k52.f7489b).add(c2284w3); } else { arrayList.add(c2284w3); } } if (!arrayList.isEmpty()) { break; } } else { throw new SocketException("No route to " + str + ':' + i8 + "; port is out of range"); } } else { throw new SocketException("No route to " + c2262a.f18309a.e + "; exhausted proxy configurations: " + ((List) k52.d)); } } if (arrayList.isEmpty()) { u4.m.y(arrayList, (ArrayList) k52.f7489b); ((ArrayList) k52.f7489b).clear(); } this.f19290a = new A2.g(arrayList); z9 = true; } else { throw new NoSuchElementException(); } } else { z9 = false; } synchronized (this.f19294g) { try { m mVar4 = this.f19293f; synchronized (mVar4.f19324a) { z10 = mVar4.f19332k; } if (!z10) { if (z9) { A2.g gVar5 = this.f19290a; if (gVar5 != null) { list = gVar5.f81b; if (this.f19294g.n(this.f19295h, this.f19293f, list, false)) { gVar2 = this.f19293f.f19328g; z8 = true; } } else { F4.f.j(); throw null; } } else { list = null; } if (!z8) { if (c2284w == null) { A2.g gVar6 = this.f19290a; if (gVar6 != null) { if (gVar6.f80a < gVar6.f81b.size()) { int i10 = gVar6.f80a; gVar6.f80a = i10 + 1; c2284w = (C2284w) gVar6.f81b.get(i10); } else { throw new NoSuchElementException(); } } else { F4.f.j(); throw null; } } i iVar = this.f19294g; if (c2284w != null) { gVar2 = new g(iVar, c2284w); this.f19292c = gVar2; } else { F4.f.j(); throw null; } } } else { throw new IOException("Canceled"); } } catch (Throwable th2) { throw th2; } } if (z8) { C2263b c2263b3 = this.f19297j; C2280s c2280s3 = this.f19296i; if (gVar2 != null) { c2263b3.getClass(); F4.f.g(c2280s3, "call"); return gVar2; } F4.f.j(); throw null; } if (gVar2 != null) { C2280s c2280s4 = this.f19296i; C2263b c2263b4 = this.f19297j; F4.f.g(c2280s4, "call"); F4.f.g(c2263b4, "eventListener"); if (gVar2.e == null) { List list4 = gVar2.f19314q.f18465a.f18311c; C1690za c1690za = new C1690za(list4); C2262a c2262a2 = gVar2.f19314q.f18465a; if (c2262a2.f18312f == null) { if (list4.contains(C2268g.f18353f)) { String str3 = gVar2.f19314q.f18465a.f18309a.e; A5.k kVar = A5.k.f193a; if (!A5.k.f193a.j(str3)) { throw new j(new UnknownServiceException(AbstractC1761a.h("CLEARTEXT communication to ", str3, " not permitted by network security policy"))); } } else { throw new j(new UnknownServiceException("CLEARTEXT communication not enabled for client")); } } else if (c2262a2.f18310b.contains(EnumC2279r.H2_PRIOR_KNOWLEDGE)) { throw new j(new UnknownServiceException("H2_PRIOR_KNOWLEDGE cannot be used with HTTPS")); } j jVar = null; do { try { C2284w c2284w4 = gVar2.f19314q; if (c2284w4.f18465a.f18312f != null && c2284w4.f18466b.type() == Proxy.Type.HTTP) { gVar2.d(i5, i6, i7, c2280s4, c2263b4); if (gVar2.f19301b == null) { c2284w2 = gVar2.f19314q; if (c2284w2.f18465a.f18312f == null && c2284w2.f18466b.type() == Proxy.Type.HTTP && gVar2.f19301b == null) { throw new j(new ProtocolException("Too many tunnel connections attempted: 21")); } ((C2206c) this.f19294g.f19319f).c(gVar2.f19314q); synchronized (this.f19294g) { try { this.f19292c = null; if (this.f19294g.n(this.f19295h, this.f19293f, list, true)) { gVar2.f19306i = true; socket2 = gVar2.f19302c; if (socket2 != null) { gVar2 = this.f19293f.f19328g; this.e = c2284w; } else { F4.f.j(); throw null; } } else { i iVar2 = this.f19294g; iVar2.getClass(); byte[] bArr = AbstractC2342a.f18677a; ((ArrayDeque) iVar2.e).add(gVar2); ((C2374b) iVar2.f19318c).c((h) iVar2.d, 0L); this.f19293f.a(gVar2); socket2 = null; } } catch (Throwable th3) { throw th3; } } if (socket2 != null) { AbstractC2342a.d(socket2); } C2263b c2263b5 = this.f19297j; C2280s c2280s5 = this.f19296i; if (gVar2 != null) { c2263b5.getClass(); F4.f.g(c2280s5, "call"); return gVar2; } F4.f.j(); throw null; } } else { try { gVar2.c(i5, i6, c2280s4, c2263b4); } catch (IOException e7) { e = e7; Socket socket3 = gVar2.f19302c; if (socket3 != null) { AbstractC2342a.d(socket3); } Socket socket4 = gVar2.f19301b; if (socket4 != null) { AbstractC2342a.d(socket4); } gVar2.f19302c = null; gVar2.f19301b = null; gVar2.f19304g = null; gVar2.f19305h = null; gVar2.d = null; gVar2.e = null; gVar2.f19303f = null; gVar2.f19310m = 1; C2284w c2284w5 = gVar2.f19314q; InetSocketAddress inetSocketAddress2 = c2284w5.f18467c; Proxy proxy2 = c2284w5.f18466b; F4.f.g(inetSocketAddress2, "inetSocketAddress"); F4.f.g(proxy2, "proxy"); if (jVar == null) { jVar = new j(e); } else { jVar.e.addSuppressed(e); jVar.f19320b = e; } if (z6) { c1690za.f14236c = true; if (c1690za.f14235b) { if (!(e instanceof ProtocolException)) { if (!(e instanceof InterruptedIOException)) { if (!(e instanceof SSLHandshakeException) || !(e.getCause() instanceof CertificateException)) { if (e instanceof SSLPeerUnverifiedException) { throw jVar; } } else { throw jVar; } } else { throw jVar; } } else { throw jVar; } } else { throw jVar; } } else { throw jVar; } } } gVar2.e(c1690za, c2280s4, c2263b4); C2284w c2284w6 = gVar2.f19314q; InetSocketAddress inetSocketAddress3 = c2284w6.f18467c; Proxy proxy3 = c2284w6.f18466b; F4.f.g(inetSocketAddress3, "inetSocketAddress"); F4.f.g(proxy3, "proxy"); c2284w2 = gVar2.f19314q; if (c2284w2.f18465a.f18312f == null) { } ((C2206c) this.f19294g.f19319f).c(gVar2.f19314q); synchronized (this.f19294g) { } } catch (IOException e8) { e = e8; } } while (e instanceof SSLException); throw jVar; } throw new IllegalStateException("already connected".toString()); } F4.f.j(); throw null; } public final g b(int i5, int i6, int i7, boolean z6, boolean z7) { int i8; while (true) { g a6 = a(i5, i6, i7, z6); synchronized (this.f19294g) { i8 = a6.f19308k; } if (i8 == 0) { return a6; } Socket socket = a6.f19302c; if (socket != null) { q qVar = a6.f19304g; if (qVar != null) { boolean z8 = false; if (!socket.isClosed() && !socket.isInputShutdown() && !socket.isOutputShutdown()) { p pVar = a6.f19303f; if (pVar != null) { long nanoTime = System.nanoTime(); synchronized (pVar) { if (!pVar.f19770m && (pVar.f19779v >= pVar.f19778u || nanoTime < pVar.f19780w)) { z8 = true; } } } else { if (z7) { try { int soTimeout = socket.getSoTimeout(); try { socket.setSoTimeout(1); boolean z9 = !qVar.j(); socket.setSoTimeout(soTimeout); z8 = z9; } catch (Throwable th) { socket.setSoTimeout(soTimeout); throw th; break; } } catch (SocketTimeoutException unused) { } catch (IOException unused2) { } } z8 = true; } } if (!z8) { a6.g(); } else { return a6; } } else { F4.f.j(); throw null; } } else { F4.f.j(); throw null; } } } public final boolean c() { synchronized (this.f19294g) { boolean z6 = true; if (this.e != null) { return true; } if (d()) { g gVar = this.f19293f.f19328g; if (gVar != null) { this.e = gVar.f19314q; return true; } F4.f.j(); throw null; } A2.g gVar2 = this.f19290a; if (gVar2 == null || gVar2.f80a >= gVar2.f81b.size()) { K5 k52 = this.f19291b; if (k52.f7490c >= ((List) k52.d).size() && !(!((ArrayList) k52.f7489b).isEmpty())) { z6 = false; } } return z6; } } public final boolean d() { g gVar = this.f19293f.f19328g; if (gVar != null) { if (gVar != null) { if (gVar.f19307j == 0) { if (gVar != null) { if (AbstractC2342a.a(gVar.f19314q.f18465a.f18309a, this.f19295h.f18309a)) { return true; } } else { F4.f.j(); throw null; } } } else { F4.f.j(); throw null; } } return false; } public final void e() { i iVar = this.f19294g; byte[] bArr = AbstractC2342a.f18677a; synchronized (iVar) { this.d = true; } } }