MD5 校验值:a9a821418db4ad35214aeeb08c2f5902
a.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package h7; import androidx.activity.b; import d7.m; import d7.o; import d7.s; import d7.t; import d7.u; import d7.w; import e7.g; import f7.d; import g7.d; import g7.j; import g7.q; import i7.c; import java.io.IOException; import java.lang.ref.Reference; import java.net.ConnectException; import java.net.Proxy; import java.net.Socket; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.concurrent.TimeUnit; import javax.net.ssl.SSLPeerUnverifiedException; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import o8.e; import o8.f; import o8.p; import o8.r; public final class a { public static SSLSocketFactory f5469m; public static c f5470n; public final w f5471a; public Socket f5472b; public Socket f5473c; public m f5474d; public s f5475e; public volatile d f5476f; public int f5477g; public f f5478h; public e f5479i; public boolean f5481k; public final List<Reference<q>> f5480j = new ArrayList(); public long f5482l = Long.MAX_VALUE; public a(w wVar) { this.f5471a = wVar; } public static synchronized c b(SSLSocketFactory sSLSocketFactory) { c cVar; synchronized (a.class) { if (sSLSocketFactory != f5469m) { e7.e eVar = e7.e.f4277a; f5470n = eVar.g(eVar.f(sSLSocketFactory)); f5469m = sSLSocketFactory; } cVar = f5470n; } return cVar; } public final void a(int i9, int i10, int i11, e7.a aVar) { SSLSocket sSLSocket; s sVar = s.HTTP_1_1; this.f5472b.setSoTimeout(i10); try { e7.e.f4277a.c(this.f5472b, this.f5471a.f4131c, i9); this.f5478h = new r(p.c(this.f5472b)); this.f5479i = new o8.q(p.b(this.f5472b)); w wVar = this.f5471a; if (wVar.f4129a.f3985i != null) { if (wVar.f4130b.type() == Proxy.Type.HTTP) { t.b bVar = new t.b(); bVar.d(this.f5471a.f4129a.f3977a); bVar.b("Host", g.g(this.f5471a.f4129a.f3977a)); bVar.b("Proxy-Connection", "Keep-Alive"); bVar.b("User-Agent", "okhttp/2.7.5"); t a9 = bVar.a(); o oVar = a9.f4098a; StringBuilder t8 = b.t("CONNECT "); t8.append(oVar.f4060d); t8.append(":"); String p8 = b.p(t8, oVar.f4061e, " HTTP/1.1"); do { f fVar = this.f5478h; e eVar = this.f5479i; g7.d dVar = new g7.d(null, fVar, eVar); TimeUnit timeUnit = TimeUnit.MILLISECONDS; fVar.k().g(i10, timeUnit); this.f5479i.k().g(i11, timeUnit); dVar.l(a9.f4100c, p8); eVar.flush(); u.b k9 = dVar.k(); k9.f4119a = a9; u a10 = k9.a(); Comparator<String> comparator = j.f5337a; long a11 = j.a(a10.f4113f); if (a11 == -1) { a11 = 0; } o8.w i12 = dVar.i(a11); g.k(i12, Integer.MAX_VALUE, timeUnit); ((d.f) i12).close(); int i13 = a10.f4110c; if (i13 != 200) { if (i13 == 407) { w wVar2 = this.f5471a; a9 = j.c(wVar2.f4129a.f3980d, a10, wVar2.f4130b); } else { StringBuilder t9 = b.t("Unexpected response code for CONNECT: "); t9.append(a10.f4110c); throw new IOException(t9.toString()); } } else if (!this.f5478h.b().h0() || !this.f5479i.b().h0()) { throw new IOException("TLS tunnel buffered too many bytes!"); } } while (a9 != null); throw new IOException("Failed to authenticate with proxy"); } d7.a aVar2 = this.f5471a.f4129a; SSLSocketFactory sSLSocketFactory = aVar2.f3985i; try { try { Socket socket = this.f5472b; o oVar2 = aVar2.f3977a; sSLSocket = (SSLSocket) sSLSocketFactory.createSocket(socket, oVar2.f4060d, oVar2.f4061e, true); } catch (Throwable th) { th = th; sSLSocket = null; } } catch (AssertionError e9) { e = e9; } try { d7.j a12 = aVar.a(sSLSocket); if (a12.f4040b) { e7.e.f4277a.b(sSLSocket, aVar2.f3977a.f4060d, aVar2.f3981e); } sSLSocket.startHandshake(); m a13 = m.a(sSLSocket.getSession()); if (aVar2.f3986j.verify(aVar2.f3977a.f4060d, sSLSocket.getSession())) { if (aVar2.f3987k != d7.f.f4010b) { aVar2.f3987k.a(aVar2.f3977a.f4060d, new n6.c(b(aVar2.f3985i)).g(a13.f4052b)); } String d9 = a12.f4040b ? e7.e.f4277a.d(sSLSocket) : null; this.f5473c = sSLSocket; this.f5478h = new r(p.c(sSLSocket)); this.f5479i = new o8.q(p.b(this.f5473c)); this.f5474d = a13; if (d9 != null) { sVar = s.e(d9); } this.f5475e = sVar; e7.e.f4277a.a(sSLSocket); } else { X509Certificate x509Certificate = (X509Certificate) a13.f4052b.get(0); throw new SSLPeerUnverifiedException("Hostname " + aVar2.f3977a.f4060d + " not verified:\n certificate: " + d7.f.b(x509Certificate) + "\n DN: " + x509Certificate.getSubjectDN().getName() + "\n subjectAltNames: " + i7.b.a(x509Certificate)); } } catch (AssertionError e10) { e = e10; if (!g.j(e)) { throw e; } throw new IOException(e); } catch (Throwable th2) { th = th2; if (sSLSocket != null) { e7.e.f4277a.a(sSLSocket); } g.d(sSLSocket); throw th; } } else { this.f5475e = sVar; this.f5473c = this.f5472b; } s sVar2 = this.f5475e; if (sVar2 == s.SPDY_3 || sVar2 == s.HTTP_2) { this.f5473c.setSoTimeout(0); d.c cVar = new d.c(true); Socket socket2 = this.f5473c; String str = this.f5471a.f4129a.f3977a.f4060d; f fVar2 = this.f5478h; e eVar2 = this.f5479i; cVar.f4855a = socket2; cVar.f4856b = str; cVar.f4857c = fVar2; cVar.f4858d = eVar2; cVar.f4859e = this.f5475e; f7.d dVar2 = new f7.d(cVar, null); dVar2.B.j(); dVar2.B.B(dVar2.f4845w); if (dVar2.f4845w.b(65536) != 65536) { dVar2.B.e(0, r12 - 65536); } this.f5476f = dVar2; } } catch (ConnectException unused) { StringBuilder t10 = b.t("Failed to connect to "); t10.append(this.f5471a.f4131c); throw new ConnectException(t10.toString()); } } public String toString() { StringBuilder t8 = b.t("Connection{"); t8.append(this.f5471a.f4129a.f3977a.f4060d); t8.append(":"); t8.append(this.f5471a.f4129a.f3977a.f4061e); t8.append(", proxy="); t8.append(this.f5471a.f4130b); t8.append(" hostAddress="); t8.append(this.f5471a.f4131c); t8.append(" cipherSuite="); m mVar = this.f5474d; t8.append(mVar != null ? mVar.f4051a : "none"); t8.append(" protocol="); t8.append(this.f5475e); t8.append('}'); return t8.toString(); } }