正在查看: Share Any v2.1.7 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Share Any v2.1.7 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package yd;
import ae.a;
import be.g;
import fe.o;
import fe.s;
import fe.t;
import fe.y;
import fe.z;
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.List;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import org.apache.commons.math3.analysis.integration.BaseAbstractUnivariateIntegrator;
import vd.c0;
import vd.h;
import vd.i;
import vd.n;
import vd.p;
import vd.q;
import vd.r;
import vd.s;
import vd.t;
import vd.u;
import vd.w;
import vd.z;
public final class c extends g.d {
public final h b;
public final c0 c;
public Socket d;
public Socket e;
public p f;
public u g;
public g h;
public fe.g i;
public fe.f j;
public boolean k;
public int l;
public int m = 1;
public final List<Reference<f>> n = new ArrayList();
public long o = Long.MAX_VALUE;
public c(h hVar, c0 c0Var) {
this.b = hVar;
this.c = c0Var;
}
@Override
public void a(g gVar) {
synchronized (this.b) {
this.m = gVar.f();
}
}
@Override
public void b(be.p pVar) {
pVar.c(be.b.REFUSED_STREAM);
}
public void c(int r16, int r17, int r18, int r19, boolean r20, vd.d r21, vd.n r22) {
throw new UnsupportedOperationException("Method not decompiled: yd.c.c(int, int, int, int, boolean, vd.d, vd.n):void");
}
public final void d(int i, int i2, vd.d dVar, n nVar) {
c0 c0Var = this.c;
Proxy proxy = c0Var.b;
this.d = (proxy.type() == Proxy.Type.DIRECT || proxy.type() == Proxy.Type.HTTP) ? c0Var.a.c.createSocket() : new Socket(proxy);
Objects.requireNonNull(this.c);
Objects.requireNonNull(nVar);
this.d.setSoTimeout(i2);
try {
ce.e.a.f(this.d, this.c.c, i);
try {
this.i = new t(o.e(this.d));
this.j = new s(o.b(this.d));
} catch (NullPointerException e) {
if ("throw with null exception".equals(e.getMessage())) {
throw new IOException(e);
}
}
} catch (ConnectException e2) {
StringBuilder a = a.f.a("Failed to connect to ");
a.append(this.c.c);
ConnectException connectException = new ConnectException(a.toString());
connectException.initCause(e2);
throw connectException;
}
}
public final void e(int i, int i2, int i3, vd.d dVar, n nVar) {
w.a aVar = new w.a();
aVar.d(this.c.a.a);
aVar.b("Host", wd.b.m(this.c.a.a, true));
q.a aVar2 = aVar.c;
aVar2.b("Proxy-Connection", "Keep-Alive");
aVar2.c("Proxy-Connection");
aVar2.a.add("Proxy-Connection");
aVar2.a.add("Keep-Alive");
q.a aVar3 = aVar.c;
aVar3.b("User-Agent", "okhttp/3.10.0");
aVar3.c("User-Agent");
aVar3.a.add("User-Agent");
aVar3.a.add("okhttp/3.10.0");
w a = aVar.a();
r rVar = a.a;
d(i, i2, dVar, nVar);
String str = "CONNECT " + wd.b.m(rVar, true) + " HTTP/1.1";
fe.g gVar = this.i;
fe.f fVar = this.j;
ae.a aVar4 = new ae.a(null, null, gVar, fVar);
z b = gVar.b();
long j = i2;
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
b.g(j, timeUnit);
this.j.b().g(i3, timeUnit);
aVar4.k(a.c, str);
fVar.flush();
z.a c = aVar4.c(false);
c.a = a;
vd.z a2 = c.a();
long a3 = zd.e.a(a2);
if (a3 == -1) {
a3 = 0;
}
y h = aVar4.h(a3);
wd.b.t(h, BaseAbstractUnivariateIntegrator.DEFAULT_MAX_ITERATIONS_COUNT, timeUnit);
((a.f) h).close();
int i4 = a2.c;
if (i4 == 200) {
if (!this.i.a().m() || !this.j.a().m()) {
throw new IOException("TLS tunnel buffered too many bytes!");
}
} else {
if (i4 == 407) {
Objects.requireNonNull(this.c.a.d);
throw new IOException("Failed to authenticate with proxy");
}
StringBuilder a4 = a.f.a("Unexpected response code for CONNECT: ");
a4.append(a2.c);
throw new IOException(a4.toString());
}
}
public final void f(b bVar, int i, vd.d dVar, n nVar) {
SSLSocket sSLSocket;
u uVar = u.HTTP_1_1;
if (this.c.a.i == null) {
this.g = uVar;
this.e = this.d;
return;
}
Objects.requireNonNull(nVar);
vd.a aVar = this.c.a;
SSLSocketFactory sSLSocketFactory = aVar.i;
try {
try {
Socket socket = this.d;
r rVar = aVar.a;
sSLSocket = (SSLSocket) sSLSocketFactory.createSocket(socket, rVar.d, rVar.e, true);
} catch (Throwable th) {
th = th;
sSLSocket = null;
}
} catch (AssertionError e) {
e = e;
}
try {
i a = bVar.a(sSLSocket);
if (a.b) {
ce.e.a.e(sSLSocket, aVar.a.d, aVar.e);
}
sSLSocket.startHandshake();
SSLSession session = sSLSocket.getSession();
if (!(("NONE".equals(session.getProtocol()) || "SSL_NULL_WITH_NULL_NULL".equals(session.getCipherSuite())) ? false : true)) {
throw new IOException("a valid ssl session was not established");
}
p a2 = p.a(session);
if (!aVar.j.verify(aVar.a.d, session)) {
X509Certificate x509Certificate = (X509Certificate) a2.c.get(0);
throw new SSLPeerUnverifiedException("Hostname " + aVar.a.d + " not verified:\n certificate: " + vd.f.b(x509Certificate) + "\n DN: " + x509Certificate.getSubjectDN().getName() + "\n subjectAltNames: " + ee.c.a(x509Certificate));
}
aVar.k.a(aVar.a.d, a2.c);
String h = a.b ? ce.e.a.h(sSLSocket) : null;
this.e = sSLSocket;
this.i = new t(o.e(sSLSocket));
this.j = new s(o.b(this.e));
this.f = a2;
if (h != null) {
uVar = u.a(h);
}
this.g = uVar;
ce.e.a.a(sSLSocket);
if (this.g == u.HTTP_2) {
this.e.setSoTimeout(0);
g.c cVar = new g.c(true);
Socket socket2 = this.e;
String str = this.c.a.a.d;
fe.g gVar = this.i;
fe.f fVar = this.j;
cVar.a = socket2;
cVar.b = str;
cVar.c = gVar;
cVar.d = fVar;
cVar.e = this;
cVar.f = i;
g gVar2 = new g(cVar);
this.h = gVar2;
be.q qVar = gVar2.f0v;
synchronized (qVar) {
if (qVar.e) {
throw new IOException("closed");
}
if (qVar.b) {
Logger logger = be.q.k;
if (logger.isLoggable(Level.FINE)) {
logger.fine(wd.b.l(">> CONNECTION %s", be.e.a.g()));
}
qVar.a.H((byte[]) be.e.a.a.clone());
qVar.a.flush();
}
}
be.q qVar2 = gVar2.f0v;
com.facebook.appevents.p pVar = gVar2.r;
synchronized (qVar2) {
if (qVar2.e) {
throw new IOException("closed");
}
qVar2.e(0, Integer.bitCount(pVar.a) * 6, (byte) 4, (byte) 0);
int i2 = 0;
while (i2 < 10) {
if (((1 << i2) & pVar.a) != 0) {
qVar2.a.i(i2 == 4 ? 3 : i2 == 7 ? 4 : i2);
qVar2.a.k(((int[]) pVar.b)[i2]);
}
i2++;
}
qVar2.a.flush();
}
if (gVar2.r.a() != 65535) {
gVar2.f0v.p(0, r9 - 65535);
}
new Thread((Runnable) gVar2.f1w).start();
}
} catch (AssertionError e2) {
e = e2;
if (!wd.b.r(e)) {
throw e;
}
throw new IOException(e);
} catch (Throwable th2) {
th = th2;
if (sSLSocket != null) {
ce.e.a.a(sSLSocket);
}
wd.b.e(sSLSocket);
throw th;
}
}
public boolean g(vd.a aVar, c0 c0Var) {
if (this.n.size() < this.m && !this.k) {
wd.a aVar2 = wd.a.a;
vd.a aVar3 = this.c.a;
Objects.requireNonNull((t.a) aVar2);
if (!aVar3.a(aVar)) {
return false;
}
if (aVar.a.d.equals(this.c.a.a.d)) {
return true;
}
if (this.h == null || c0Var == null || c0Var.b.type() != Proxy.Type.DIRECT || this.c.b.type() != Proxy.Type.DIRECT || !this.c.c.equals(c0Var.c) || c0Var.a.j != ee.c.a || !j(aVar.a)) {
return false;
}
try {
aVar.k.a(aVar.a.d, this.f.c);
return true;
} catch (SSLPeerUnverifiedException unused) {
}
}
return false;
}
public boolean h() {
return this.h != null;
}
public zd.c i(vd.t tVar, s.a aVar, f fVar) {
if (this.h != null) {
return new be.f(tVar, aVar, fVar, this.h);
}
zd.f fVar2 = (zd.f) aVar;
this.e.setSoTimeout(fVar2.j);
fe.z b = this.i.b();
long j = fVar2.j;
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
b.g(j, timeUnit);
this.j.b().g(fVar2.k, timeUnit);
return new ae.a(tVar, fVar, this.i, this.j);
}
public boolean j(r rVar) {
int i = rVar.e;
r rVar2 = this.c.a.a;
if (i != rVar2.e) {
return false;
}
if (rVar.d.equals(rVar2.d)) {
return true;
}
p pVar = this.f;
return pVar != null && ee.c.a.c(rVar.d, (X509Certificate) pVar.c.get(0));
}
public String toString() {
StringBuilder a = a.f.a("Connection{");
a.append(this.c.a.a.d);
a.append(":");
a.append(this.c.a.a.e);
a.append(", proxy=");
a.append(this.c.b);
a.append(" hostAddress=");
a.append(this.c.c);
a.append(" cipherSuite=");
p pVar = this.f;
a.append(pVar != null ? pVar.b : "none");
a.append(" protocol=");
a.append(this.g);
a.append('}');
return a.toString();
}
}