正在查看: Crafto v9.3.3 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Crafto v9.3.3 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package Ll;
import Ol.e;
import Ol.o;
import Ol.q;
import Ol.r;
import Ol.u;
import Ql.m;
import Wl.A;
import Wl.G;
import Wl.H;
import Wl.O;
import java.io.IOException;
import java.net.ConnectException;
import java.net.Proxy;
import java.net.Socket;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.IntCompanionObject;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.LongCompanionObject;
import kotlin.jvm.internal.SourceDebugExtension;
import okhttp3.Address;
import okhttp3.CertificatePinner;
import okhttp3.Connection;
import okhttp3.ConnectionSpec;
import okhttp3.EventListener;
import okhttp3.Handshake;
import okhttp3.OkHttpClient;
import okhttp3.Protocol;
import okhttp3.Route;
import org.jetbrains.annotations.NotNull;
@SourceDebugExtension({"SMAP\nRealConnection.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RealConnection.kt\nokhttp3/internal/connection/RealConnection\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 Util.kt\nokhttp3/internal/Util\n+ 4 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,765:1\n1#2:766\n608#3,4:767\n608#3,4:774\n615#3,4:778\n1747#4,3:771\n*S KotlinDebug\n*F\n+ 1 RealConnection.kt\nokhttp3/internal/connection/RealConnection\n*L\n529#1:767,4\n582#1:774,4\n648#1:778,4\n574#1:771,3\n*E\n"})
public final class f extends e.b implements Connection {
@NotNull
public final Route b;
public Socket c;
public Socket f201d;
public Handshake e;
public Protocol f;
public Ol.e g;
public H h;
public G i;
public boolean j;
public boolean k;
public int l;
public int m;
public int n;
public int o;
@NotNull
public final ArrayList p;
public long q;
public class a {
public static final int[] a;
static {
int[] iArr = new int[Proxy.Type.values().length];
try {
iArr[Proxy.Type.DIRECT.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[Proxy.Type.HTTP.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
a = iArr;
}
}
public f(@NotNull j connectionPool, @NotNull Route route) {
Intrinsics.checkNotNullParameter(connectionPool, "connectionPool");
Intrinsics.checkNotNullParameter(route, "route");
this.b = route;
this.o = 1;
this.p = new ArrayList();
this.q = LongCompanionObject.MAX_VALUE;
}
public static void d(@NotNull OkHttpClient client, @NotNull Route failedRoute, @NotNull IOException failure) {
Intrinsics.checkNotNullParameter(client, "client");
Intrinsics.checkNotNullParameter(failedRoute, "failedRoute");
Intrinsics.checkNotNullParameter(failure, "failure");
if (failedRoute.proxy().type() != Proxy.Type.DIRECT) {
Address address = failedRoute.address();
address.proxySelector().connectFailed(address.url().uri(), failedRoute.proxy().address(), failure);
}
k routeDatabase = client.getRouteDatabase();
synchronized (routeDatabase) {
Intrinsics.checkNotNullParameter(failedRoute, "failedRoute");
routeDatabase.a.add(failedRoute);
}
}
@Override
public final synchronized void a(@NotNull Ol.e connection, @NotNull u settings) {
Intrinsics.checkNotNullParameter(connection, "connection");
Intrinsics.checkNotNullParameter(settings, "settings");
this.o = (settings.a & 16) != 0 ? settings.b[4] : IntCompanionObject.MAX_VALUE;
}
@Override
public final void b(@NotNull q stream) throws IOException {
Intrinsics.checkNotNullParameter(stream, "stream");
stream.c(Ol.a.REFUSED_STREAM, null);
}
public final void c(int r17, int r18, int r19, int r20, boolean r21, @org.jetbrains.annotations.NotNull Ll.e r22, @org.jetbrains.annotations.NotNull okhttp3.EventListener r23) {
throw new UnsupportedOperationException("Method not decompiled: Ll.f.c(int, int, int, int, boolean, Ll.e, okhttp3.EventListener):void");
}
public final void e(int i, int i2, e eVar, EventListener eventListener) throws IOException {
Socket createSocket;
Proxy proxy = this.b.proxy();
Address address = this.b.address();
Proxy.Type type = proxy.type();
int i3 = type == null ? -1 : a.a[type.ordinal()];
if (i3 == 1 || i3 == 2) {
createSocket = address.socketFactory().createSocket();
Intrinsics.checkNotNull(createSocket);
} else {
createSocket = new Socket(proxy);
}
this.c = createSocket;
eventListener.connectStart(eVar, this.b.socketAddress(), proxy);
createSocket.setSoTimeout(i2);
try {
m mVar = m.a;
m.a.e(createSocket, this.b.socketAddress(), i);
try {
this.h = A.b(A.g(createSocket));
this.i = A.a(A.d(createSocket));
} catch (NullPointerException e) {
if (Intrinsics.areEqual(e.getMessage(), "throw with null exception")) {
throw new IOException(e);
}
}
} catch (ConnectException e2) {
ConnectException connectException = new ConnectException("Failed to connect to " + this.b.socketAddress());
connectException.initCause(e2);
throw connectException;
}
}
public final void f(int r21, int r22, int r23, Ll.e r24, okhttp3.EventListener r25) throws java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: Ll.f.f(int, int, int, Ll.e, okhttp3.EventListener):void");
}
public final void g(b bVar, int i, e eVar, EventListener eventListener) throws IOException {
if (this.b.address().sslSocketFactory() == null) {
List<Protocol> protocols = this.b.address().protocols();
Protocol protocol = Protocol.H2_PRIOR_KNOWLEDGE;
if (!protocols.contains(protocol)) {
this.f201d = this.c;
this.f = Protocol.HTTP_1_1;
return;
} else {
this.f201d = this.c;
this.f = protocol;
m(i);
return;
}
}
eventListener.secureConnectStart(eVar);
Address address = this.b.address();
SSLSocketFactory sslSocketFactory = address.sslSocketFactory();
SSLSocket sSLSocket = null;
String str = null;
try {
Intrinsics.checkNotNull(sslSocketFactory);
Socket createSocket = sslSocketFactory.createSocket(this.c, address.url().host(), address.url().port(), true);
Intrinsics.checkNotNull(createSocket, "null cannot be cast to non-null type javax.net.ssl.SSLSocket");
SSLSocket sSLSocket2 = (SSLSocket) createSocket;
try {
ConnectionSpec a2 = bVar.a(sSLSocket2);
if (a2.supportsTlsExtensions()) {
m mVar = m.a;
m.a.d(sSLSocket2, address.url().host(), address.protocols());
}
sSLSocket2.startHandshake();
SSLSession sslSocketSession = sSLSocket2.getSession();
Handshake.Companion companion = Handshake.Companion;
Intrinsics.checkNotNullExpressionValue(sslSocketSession, "sslSocketSession");
Handshake handshake = companion.get(sslSocketSession);
HostnameVerifier hostnameVerifier = address.hostnameVerifier();
Intrinsics.checkNotNull(hostnameVerifier);
if (hostnameVerifier.verify(address.url().host(), sslSocketSession)) {
CertificatePinner certificatePinner = address.certificatePinner();
Intrinsics.checkNotNull(certificatePinner);
this.e = new Handshake(handshake.tlsVersion(), handshake.cipherSuite(), handshake.localCertificates(), new g(certificatePinner, handshake, address));
certificatePinner.check$okhttp(address.url().host(), new h(this));
if (a2.supportsTlsExtensions()) {
m mVar2 = m.a;
str = m.a.f(sSLSocket2);
}
this.f201d = sSLSocket2;
this.h = A.b(A.g(sSLSocket2));
this.i = A.a(A.d(sSLSocket2));
this.f = str != null ? Protocol.Companion.get(str) : Protocol.HTTP_1_1;
m mVar3 = m.a;
m.a.a(sSLSocket2);
eventListener.secureConnectEnd(eVar, this.e);
if (this.f == Protocol.HTTP_2) {
m(i);
return;
}
return;
}
List<Certificate> peerCertificates = handshake.peerCertificates();
if (!(!peerCertificates.isEmpty())) {
throw new SSLPeerUnverifiedException("Hostname " + address.url().host() + " not verified (no certificates)");
}
Certificate certificate = peerCertificates.get(0);
Intrinsics.checkNotNull(certificate, "null cannot be cast to non-null type java.security.cert.X509Certificate");
X509Certificate certificate2 = (X509Certificate) certificate;
StringBuilder sb = new StringBuilder("\n |Hostname ");
sb.append(address.url().host());
sb.append(" not verified:\n | certificate: ");
sb.append(CertificatePinner.Companion.pin(certificate2));
sb.append("\n | DN: ");
sb.append(certificate2.getSubjectDN().getName());
sb.append("\n | subjectAltNames: ");
Intrinsics.checkNotNullParameter(certificate2, "certificate");
sb.append(CollectionsKt.O(Tl.d.a(7, certificate2), Tl.d.a(2, certificate2)));
sb.append("\n ");
throw new SSLPeerUnverifiedException(kotlin.text.j.c(sb.toString()));
} catch (Throwable th) {
th = th;
sSLSocket = sSLSocket2;
if (sSLSocket != null) {
m mVar4 = m.a;
m.a.a(sSLSocket);
}
if (sSLSocket != null) {
Hl.d.d(sSLSocket);
}
throw th;
}
} catch (Throwable th2) {
th = th2;
}
}
public final synchronized void h() {
this.m++;
}
@Override
public final Handshake handshake() {
return this.e;
}
public final boolean i(@org.jetbrains.annotations.NotNull okhttp3.Address r7, java.util.List<okhttp3.Route> r8) {
throw new UnsupportedOperationException("Method not decompiled: Ll.f.i(okhttp3.Address, java.util.List):boolean");
}
public final boolean j(boolean z) {
long j;
byte[] bArr = Hl.d.a;
long nanoTime = System.nanoTime();
Socket socket = this.c;
Intrinsics.checkNotNull(socket);
Socket socket2 = this.f201d;
Intrinsics.checkNotNull(socket2);
H source = this.h;
Intrinsics.checkNotNull(source);
if (socket.isClosed() || socket2.isClosed() || socket2.isInputShutdown() || socket2.isOutputShutdown()) {
return false;
}
Ol.e eVar = this.g;
if (eVar != null) {
return eVar.t(nanoTime);
}
synchronized (this) {
j = nanoTime - this.q;
}
if (j < 10000000000L || !z) {
return true;
}
Intrinsics.checkNotNullParameter(socket2, "<this>");
Intrinsics.checkNotNullParameter(source, "source");
try {
int soTimeout = socket2.getSoTimeout();
try {
socket2.setSoTimeout(1);
boolean z2 = !source.J0();
socket2.setSoTimeout(soTimeout);
return z2;
} catch (Throwable th) {
socket2.setSoTimeout(soTimeout);
throw th;
}
} catch (SocketTimeoutException unused) {
return true;
} catch (IOException unused2) {
return false;
}
}
@NotNull
public final Ml.d k(@NotNull OkHttpClient client, @NotNull Ml.g chain) throws SocketException {
Intrinsics.checkNotNullParameter(client, "client");
Intrinsics.checkNotNullParameter(chain, "chain");
Socket socket = this.f201d;
Intrinsics.checkNotNull(socket);
H h = this.h;
Intrinsics.checkNotNull(h);
G g = this.i;
Intrinsics.checkNotNull(g);
Ol.e eVar = this.g;
if (eVar != null) {
return new o(client, this, chain, eVar);
}
socket.setSoTimeout(chain.g);
O timeout = h.a.timeout();
long j = chain.g;
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
timeout.g(j, timeUnit);
g.a.timeout().g(chain.h, timeUnit);
return new Nl.b(client, this, h, g);
}
public final synchronized void l() {
this.j = true;
}
public final void m(int i) throws IOException {
Socket socket = this.f201d;
Intrinsics.checkNotNull(socket);
H source = this.h;
Intrinsics.checkNotNull(source);
G sink = this.i;
Intrinsics.checkNotNull(sink);
socket.setSoTimeout(0);
Kl.e taskRunner = Kl.e.h;
e.a aVar = new e.a(taskRunner);
String peerName = this.b.address().url().host();
Intrinsics.checkNotNullParameter(socket, "socket");
Intrinsics.checkNotNullParameter(peerName, "peerName");
Intrinsics.checkNotNullParameter(source, "source");
Intrinsics.checkNotNullParameter(sink, "sink");
Intrinsics.checkNotNullParameter(socket, "<set-?>");
aVar.c = socket;
String str = Hl.d.h + ' ' + peerName;
Intrinsics.checkNotNullParameter(str, "<set-?>");
aVar.f234d = str;
Intrinsics.checkNotNullParameter(source, "<set-?>");
aVar.e = source;
Intrinsics.checkNotNullParameter(sink, "<set-?>");
aVar.f = sink;
Intrinsics.checkNotNullParameter(this, "listener");
aVar.g = this;
aVar.i = i;
Ol.e eVar = new Ol.e(aVar);
this.g = eVar;
u uVar = Ol.e.I;
this.o = (uVar.a & 16) != 0 ? uVar.b[4] : IntCompanionObject.MAX_VALUE;
Intrinsics.checkNotNullParameter(taskRunner, "taskRunner");
r rVar = eVar.y;
synchronized (rVar) {
try {
if (rVar.e) {
throw new IOException("closed");
}
if (rVar.b) {
Logger logger = r.g;
if (logger.isLoggable(Level.FINE)) {
logger.fine(Hl.d.i(">> CONNECTION " + Ol.d.b.f(), new Object[0]));
}
rVar.a.c1(Ol.d.b);
rVar.a.flush();
}
} catch (Throwable th) {
throw th;
}
}
eVar.y.M(eVar.r);
if (eVar.r.a() != 65535) {
eVar.y.i(0, r0 - 65535);
}
taskRunner.f().c(new Kl.c(eVar.f233d, eVar.B), 0L);
}
@Override
@NotNull
public final Protocol protocol() {
Protocol protocol = this.f;
Intrinsics.checkNotNull(protocol);
return protocol;
}
@Override
@NotNull
public final Route route() {
return this.b;
}
@Override
@NotNull
public final Socket socket() {
Socket socket = this.f201d;
Intrinsics.checkNotNull(socket);
return socket;
}
@NotNull
public final String toString() {
Object obj;
StringBuilder sb = new StringBuilder("Connection{");
Route route = this.b;
sb.append(route.address().url().host());
sb.append(':');
sb.append(route.address().url().port());
sb.append(", proxy=");
sb.append(route.proxy());
sb.append(" hostAddress=");
sb.append(route.socketAddress());
sb.append(" cipherSuite=");
Handshake handshake = this.e;
if (handshake == null || (obj = handshake.cipherSuite()) == null) {
obj = "none";
}
sb.append(obj);
sb.append(" protocol=");
sb.append(this.f);
sb.append('}');
return sb.toString();
}
}