正在查看: 泰剧兔 v1.5.7.0 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 泰剧兔 v1.5.7.0 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package M1;
import P1.g;
import P1.i;
import U1.a;
import java.io.IOException;
import java.net.ConnectException;
import java.net.Proxy;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import okhttp3.Address;
import okhttp3.Call;
import okhttp3.CertificatePinner;
import okhttp3.Connection;
import okhttp3.ConnectionPool;
import okhttp3.ConnectionSpec;
import okhttp3.EventListener;
import okhttp3.Handshake;
import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Protocol;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.Route;
import okio.BufferedSink;
import okio.BufferedSource;
import okio.Okio;
import okio.Source;
import okio.Timeout;
public final class c extends g.h implements Connection {
public final ConnectionPool b;
public final Route c;
public Socket d;
public Socket e;
public Handshake f;
public Protocol g;
public P1.g h;
public BufferedSource i;
public BufferedSink j;
public boolean k;
public int l;
public int m = 1;
public final List n = new ArrayList();
public long o = Long.MAX_VALUE;
public class a extends a.g {
public final g d;
public a(boolean z, BufferedSource bufferedSource, BufferedSink bufferedSink, g gVar) {
super(z, bufferedSource, bufferedSink);
this.d = gVar;
}
@Override
public void close() {
g gVar = this.d;
gVar.r(true, gVar.c(), -1L, null);
}
}
public c(ConnectionPool connectionPool, Route route) {
this.b = connectionPool;
this.c = route;
}
@Override
public void a(P1.g gVar) {
synchronized (this.b) {
this.m = gVar.i();
}
}
@Override
public void b(i iVar) {
iVar.f(P1.b.REFUSED_STREAM);
}
public void c() {
okhttp3.internal.c.h(this.d);
}
public void d(int r17, int r18, int r19, int r20, boolean r21, okhttp3.Call r22, okhttp3.EventListener r23) {
throw new UnsupportedOperationException("Method not decompiled: M1.c.d(int, int, int, int, boolean, okhttp3.Call, okhttp3.EventListener):void");
}
public final void e(int i, int i2, Call call, EventListener eventListener) {
Proxy proxy = this.c.proxy();
this.d = (proxy.type() == Proxy.Type.DIRECT || proxy.type() == Proxy.Type.HTTP) ? this.c.address().socketFactory().createSocket() : new Socket(proxy);
eventListener.connectStart(call, this.c.socketAddress(), proxy);
this.d.setSoTimeout(i2);
try {
R1.f.k().i(this.d, this.c.socketAddress(), i);
try {
this.i = Okio.buffer(Okio.source(this.d));
this.j = Okio.buffer(Okio.sink(this.d));
} catch (NullPointerException e) {
if ("throw with null exception".equals(e.getMessage())) {
throw new IOException(e);
}
}
} catch (ConnectException e2) {
ConnectException connectException = new ConnectException("Failed to connect to " + this.c.socketAddress());
connectException.initCause(e2);
throw connectException;
}
}
public final void f(b bVar) {
SSLSocket sSLSocket;
Address address = this.c.address();
SSLSocket sSLSocket2 = null;
try {
try {
sSLSocket = (SSLSocket) address.sslSocketFactory().createSocket(this.d, address.url().host(), address.url().port(), true);
} catch (AssertionError e) {
e = e;
}
} catch (Throwable th) {
th = th;
}
try {
ConnectionSpec a2 = bVar.a(sSLSocket);
if (a2.supportsTlsExtensions()) {
R1.f.k().h(sSLSocket, address.url().host(), address.protocols());
}
sSLSocket.startHandshake();
SSLSession session = sSLSocket.getSession();
Handshake handshake = Handshake.get(session);
if (address.hostnameVerifier().verify(address.url().host(), session)) {
address.certificatePinner().check(address.url().host(), handshake.peerCertificates());
String n = a2.supportsTlsExtensions() ? R1.f.k().n(sSLSocket) : null;
this.e = sSLSocket;
this.i = Okio.buffer(Okio.source(sSLSocket));
this.j = Okio.buffer(Okio.sink(this.e));
this.f = handshake;
this.g = n != null ? Protocol.get(n) : Protocol.HTTP_1_1;
R1.f.k().a(sSLSocket);
return;
}
X509Certificate x509Certificate = (X509Certificate) handshake.peerCertificates().get(0);
throw new SSLPeerUnverifiedException("Hostname " + address.url().host() + " not verified:\n certificate: " + CertificatePinner.pin(x509Certificate) + "\n DN: " + x509Certificate.getSubjectDN().getName() + "\n subjectAltNames: " + T1.d.a(x509Certificate));
} catch (AssertionError e2) {
e = e2;
if (!okhttp3.internal.c.A(e)) {
throw e;
}
throw new IOException(e);
} catch (Throwable th2) {
th = th2;
sSLSocket2 = sSLSocket;
if (sSLSocket2 != null) {
R1.f.k().a(sSLSocket2);
}
okhttp3.internal.c.h(sSLSocket2);
throw th;
}
}
public final void g(int i, int i2, int i3, Call call, EventListener eventListener) {
Request i4 = i();
HttpUrl url = i4.url();
for (int i5 = 0; i5 < 21; i5++) {
e(i, i2, call, eventListener);
i4 = h(i2, i3, i4, url);
if (i4 == null) {
return;
}
okhttp3.internal.c.h(this.d);
this.d = null;
this.j = null;
this.i = null;
eventListener.connectEnd(call, this.c.socketAddress(), this.c.proxy(), null);
}
}
public final Request h(int i, int i2, Request request, HttpUrl httpUrl) {
String str = "CONNECT " + okhttp3.internal.c.s(httpUrl, true) + " HTTP/1.1";
while (true) {
O1.a aVar = new O1.a(null, null, this.i, this.j);
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
this.i.timeout().timeout(i, timeUnit);
this.j.timeout().timeout(i2, timeUnit);
aVar.o(request.headers(), str);
aVar.a();
Response build = aVar.e(false).request(request).build();
long b = N1.e.b(build);
if (b == -1) {
b = 0;
}
Source k = aVar.k(b);
okhttp3.internal.c.D(k, Integer.MAX_VALUE, timeUnit);
k.close();
int code = build.code();
if (code == 200) {
if (this.i.buffer().exhausted() && this.j.buffer().exhausted()) {
return null;
}
throw new IOException("TLS tunnel buffered too many bytes!");
}
if (code != 407) {
throw new IOException("Unexpected response code for CONNECT: " + build.code());
}
Request authenticate = this.c.address().proxyAuthenticator().authenticate(this.c, build);
if (authenticate == null) {
throw new IOException("Failed to authenticate with proxy");
}
if ("close".equalsIgnoreCase(build.header("Connection"))) {
return authenticate;
}
request = authenticate;
}
}
@Override
public Handshake handshake() {
return this.f;
}
public final Request i() {
Request build = new Request.Builder().url(this.c.address().url()).method("CONNECT", null).header("Host", okhttp3.internal.c.s(this.c.address().url(), true)).header("Proxy-Connection", "Keep-Alive").header("User-Agent", okhttp3.internal.d.a()).build();
Request authenticate = this.c.address().proxyAuthenticator().authenticate(this.c, new Response.Builder().request(build).protocol(Protocol.HTTP_1_1).code(407).message("Preemptive Authenticate").body(okhttp3.internal.c.c).sentRequestAtMillis(-1L).receivedResponseAtMillis(-1L).header("Proxy-Authenticate", "OkHttp-Preemptive").build());
return authenticate != null ? authenticate : build;
}
public final void j(b bVar, int i, Call call, EventListener eventListener) {
if (this.c.address().sslSocketFactory() != null) {
eventListener.secureConnectStart(call);
f(bVar);
eventListener.secureConnectEnd(call, this.f);
if (this.g == Protocol.HTTP_2) {
p(i);
return;
}
return;
}
List<Protocol> protocols = this.c.address().protocols();
Protocol protocol = Protocol.H2_PRIOR_KNOWLEDGE;
if (!protocols.contains(protocol)) {
this.e = this.d;
this.g = Protocol.HTTP_1_1;
} else {
this.e = this.d;
this.g = protocol;
p(i);
}
}
public boolean k(Address address, Route route) {
if (this.n.size() >= this.m || this.k || !okhttp3.internal.a.instance.equalsNonHost(this.c.address(), address)) {
return false;
}
if (address.url().host().equals(route().address().url().host())) {
return true;
}
if (this.h == null || route == null) {
return false;
}
Proxy.Type type = route.proxy().type();
Proxy.Type type2 = Proxy.Type.DIRECT;
if (type != type2 || this.c.proxy().type() != type2 || !this.c.socketAddress().equals(route.socketAddress()) || route.address().hostnameVerifier() != T1.d.a || !q(address.url())) {
return false;
}
try {
address.certificatePinner().check(address.url().host(), handshake().peerCertificates());
return true;
} catch (SSLPeerUnverifiedException unused) {
return false;
}
}
public boolean l(boolean z) {
if (this.e.isClosed() || this.e.isInputShutdown() || this.e.isOutputShutdown()) {
return false;
}
if (this.h != null) {
return !r0.h();
}
if (z) {
try {
int soTimeout = this.e.getSoTimeout();
try {
this.e.setSoTimeout(1);
return !this.i.exhausted();
} finally {
this.e.setSoTimeout(soTimeout);
}
} catch (SocketTimeoutException unused) {
} catch (IOException unused2) {
return false;
}
}
return true;
}
public boolean m() {
return this.h != null;
}
public N1.c n(OkHttpClient okHttpClient, Interceptor.Chain chain, g gVar) {
if (this.h != null) {
return new P1.f(okHttpClient, chain, gVar, this.h);
}
this.e.setSoTimeout(chain.readTimeoutMillis());
Timeout timeout = this.i.timeout();
long readTimeoutMillis = chain.readTimeoutMillis();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
timeout.timeout(readTimeoutMillis, timeUnit);
this.j.timeout().timeout(chain.writeTimeoutMillis(), timeUnit);
return new O1.a(okHttpClient, gVar, this.i, this.j);
}
public a.g o(g gVar) {
return new a(true, this.i, this.j, gVar);
}
public final void p(int i) {
this.e.setSoTimeout(0);
P1.g a2 = new g.C0013g(true).d(this.e, this.c.address().url().host(), this.i, this.j).b(this).c(i).a();
this.h = a2;
a2.start();
}
@Override
public Protocol protocol() {
return this.g;
}
public boolean q(HttpUrl httpUrl) {
if (httpUrl.port() != this.c.address().url().port()) {
return false;
}
if (httpUrl.host().equals(this.c.address().url().host())) {
return true;
}
return this.f != null && T1.d.a.c(httpUrl.host(), (X509Certificate) this.f.peerCertificates().get(0));
}
@Override
public Route route() {
return this.c;
}
@Override
public Socket socket() {
return this.e;
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Connection{");
sb.append(this.c.address().url().host());
sb.append(":");
sb.append(this.c.address().url().port());
sb.append(", proxy=");
sb.append(this.c.proxy());
sb.append(" hostAddress=");
sb.append(this.c.socketAddress());
sb.append(" cipherSuite=");
Handshake handshake = this.f;
sb.append(handshake != null ? handshake.cipherSuite() : "none");
sb.append(" protocol=");
sb.append(this.g);
sb.append('}');
return sb.toString();
}
}