导航菜单

页面标题

页面副标题

95爱播免登录版 v3.1.9 - c.java 源代码

正在查看: 95爱播免登录版 v3.1.9 应用的 c.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package i.g0.f;

import com.xiaomi.mipush.sdk.Constants;
import i.a0;
import i.c0;
import i.e0;
import i.g0.i.g;
import i.i;
import i.j;
import i.k;
import i.p;
import i.r;
import i.t;
import i.u;
import i.x;
import i.y;
import j.l;
import java.io.IOException;
import java.lang.ref.Reference;
import java.net.ConnectException;
import java.net.Proxy;
import java.net.Socket;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import org.apache.log4j.Priority;
import org.jivesoftware.smack.packet.PrivacyItem;

public final class c extends g.h implements i {
    private final j b;
    private final e0 c;
    private Socket d;

    private Socket f4932e;

    private r f4933f;

    private y f4934g;

    private i.g0.i.g f4935h;

    private j.e f4936i;

    private j.d f4937j;

    public boolean f4938k;
    public int l;
    public int m = 1;
    public final List<Reference<g>> n = new ArrayList();
    public long o = Long.MAX_VALUE;

    public c(j jVar, e0 e0Var) {
        this.b = jVar;
        this.c = e0Var;
    }

    private void f(int i2, int i3, i.e eVar, p pVar) throws IOException {
        Proxy b = this.c.b();
        this.d = (b.type() == Proxy.Type.DIRECT || b.type() == Proxy.Type.HTTP) ? this.c.a().j().createSocket() : new Socket(b);
        pVar.f(eVar, this.c.d(), b);
        this.d.setSoTimeout(i3);
        try {
            i.g0.j.f.k().i(this.d, this.c.d(), i2);
            try {
                this.f4936i = l.b(l.j(this.d));
                this.f4937j = l.a(l.f(this.d));
            } catch (NullPointerException e2) {
                if ("throw with null exception".equals(e2.getMessage())) {
                    throw new IOException(e2);
                }
            }
        } catch (ConnectException e3) {
            ConnectException connectException = new ConnectException("Failed to connect to " + this.c.d());
            connectException.initCause(e3);
            throw connectException;
        }
    }

    private void g(b bVar) throws IOException {
        SSLSocket sSLSocket;
        i.a a = this.c.a();
        SSLSocket sSLSocket2 = null;
        try {
            try {
                sSLSocket = (SSLSocket) a.k().createSocket(this.d, a.l().m(), a.l().z(), true);
            } catch (AssertionError e2) {
                e = e2;
            }
        } catch (Throwable th) {
            th = th;
        }
        try {
            k a2 = bVar.a(sSLSocket);
            if (a2.f()) {
                i.g0.j.f.k().h(sSLSocket, a.l().m(), a.f());
            }
            sSLSocket.startHandshake();
            SSLSession session = sSLSocket.getSession();
            r b = r.b(session);
            if (a.e().verify(a.l().m(), session)) {
                a.a().a(a.l().m(), b.c());
                String m = a2.f() ? i.g0.j.f.k().m(sSLSocket) : null;
                this.f4932e = sSLSocket;
                this.f4936i = l.b(l.j(sSLSocket));
                this.f4937j = l.a(l.f(this.f4932e));
                this.f4933f = b;
                this.f4934g = m != null ? y.a(m) : y.HTTP_1_1;
                if (sSLSocket != null) {
                    i.g0.j.f.k().a(sSLSocket);
                    return;
                }
                return;
            }
            X509Certificate x509Certificate = (X509Certificate) b.c().get(0);
            throw new SSLPeerUnverifiedException("Hostname " + a.l().m() + " not verified:\n    certificate: " + i.g.c(x509Certificate) + "\n    DN: " + x509Certificate.getSubjectDN().getName() + "\n    subjectAltNames: " + i.g0.k.d.a(x509Certificate));
        } catch (AssertionError e3) {
            e = e3;
            if (!i.g0.c.A(e)) {
                throw e;
            }
            throw new IOException(e);
        } catch (Throwable th2) {
            th = th2;
            sSLSocket2 = sSLSocket;
            if (sSLSocket2 != null) {
                i.g0.j.f.k().a(sSLSocket2);
            }
            i.g0.c.h(sSLSocket2);
            throw th;
        }
    }

    private void h(int i2, int i3, int i4, i.e eVar, p pVar) throws IOException {
        a0 j2 = j();
        t h2 = j2.h();
        for (int i5 = 0; i5 < 21; i5++) {
            f(i2, i3, eVar, pVar);
            j2 = i(i3, i4, j2, h2);
            if (j2 == null) {
                return;
            }
            i.g0.c.h(this.d);
            this.d = null;
            this.f4937j = null;
            this.f4936i = null;
            pVar.d(eVar, this.c.d(), this.c.b(), null);
        }
    }

    private a0 i(int i2, int i3, a0 a0Var, t tVar) throws IOException {
        String str = "CONNECT " + i.g0.c.s(tVar, true) + " HTTP/1.1";
        while (true) {
            j.e eVar = this.f4936i;
            i.g0.h.a aVar = new i.g0.h.a(null, null, eVar, this.f4937j);
            TimeUnit timeUnit = TimeUnit.MILLISECONDS;
            eVar.m().g(i2, timeUnit);
            this.f4937j.m().g(i3, timeUnit);
            aVar.o(a0Var.d(), str);
            aVar.a();
            c0.a d = aVar.d(false);
            d.o(a0Var);
            c0 c = d.c();
            long b = i.g0.g.e.b(c);
            if (b == -1) {
                b = 0;
            }
            j.t k2 = aVar.k(b);
            i.g0.c.D(k2, Priority.OFF_INT, timeUnit);
            k2.close();
            int j2 = c.j();
            if (j2 == 200) {
                if (this.f4936i.l().t() && this.f4937j.l().t()) {
                    return null;
                }
                throw new IOException("TLS tunnel buffered too many bytes!");
            }
            if (j2 != 407) {
                throw new IOException("Unexpected response code for CONNECT: " + c.j());
            }
            a0 a = this.c.a().h().a(this.c, c);
            if (a == null) {
                throw new IOException("Failed to authenticate with proxy");
            }
            if ("close".equalsIgnoreCase(c.D("Connection"))) {
                return a;
            }
            a0Var = a;
        }
    }

    private a0 j() {
        a0.a aVar = new a0.a();
        aVar.j(this.c.a().l());
        aVar.d("Host", i.g0.c.s(this.c.a().l(), true));
        aVar.d("Proxy-Connection", "Keep-Alive");
        aVar.d("User-Agent", i.g0.d.a());
        return aVar.b();
    }

    private void k(b bVar, int i2, i.e eVar, p pVar) throws IOException {
        if (this.c.a().k() != null) {
            pVar.u(eVar);
            g(bVar);
            pVar.t(eVar, this.f4933f);
            if (this.f4934g == y.HTTP_2) {
                s(i2);
                return;
            }
            return;
        }
        List<y> f2 = this.c.a().f();
        y yVar = y.H2_PRIOR_KNOWLEDGE;
        if (!f2.contains(yVar)) {
            this.f4932e = this.d;
            this.f4934g = y.HTTP_1_1;
        } else {
            this.f4932e = this.d;
            this.f4934g = yVar;
            s(i2);
        }
    }

    private void s(int i2) throws IOException {
        this.f4932e.setSoTimeout(0);
        g.C0162g c0162g = new g.C0162g(true);
        c0162g.d(this.f4932e, this.c.a().l().m(), this.f4936i, this.f4937j);
        c0162g.b(this);
        c0162g.c(i2);
        i.g0.i.g a = c0162g.a();
        this.f4935h = a;
        a.l0();
    }

    @Override
    public y a() {
        return this.f4934g;
    }

    @Override
    public void b(i.g0.i.g gVar) {
        synchronized (this.b) {
            this.m = gVar.F();
        }
    }

    @Override
    public void c(i.g0.i.i iVar) throws IOException {
        iVar.d(i.g0.i.b.REFUSED_STREAM);
    }

    public void d() {
        i.g0.c.h(this.d);
    }

    public void e(int r17, int r18, int r19, int r20, boolean r21, i.e r22, i.p r23) {
        throw new UnsupportedOperationException("Method not decompiled: i.g0.f.c.e(int, int, int, int, boolean, i.e, i.p):void");
    }

    public r l() {
        return this.f4933f;
    }

    public boolean m(i.a aVar, @Nullable e0 e0Var) {
        if (this.n.size() >= this.m || this.f4938k || !i.g0.a.a.g(this.c.a(), aVar)) {
            return false;
        }
        if (aVar.l().m().equals(q().a().l().m())) {
            return true;
        }
        if (this.f4935h == null || e0Var == null || e0Var.b().type() != Proxy.Type.DIRECT || this.c.b().type() != Proxy.Type.DIRECT || !this.c.d().equals(e0Var.d()) || e0Var.a().e() != i.g0.k.d.a || !t(aVar.l())) {
            return false;
        }
        try {
            aVar.a().a(aVar.l().m(), l().c());
            return true;
        } catch (SSLPeerUnverifiedException unused) {
            return false;
        }
    }

    public boolean n(boolean z) {
        if (this.f4932e.isClosed() || this.f4932e.isInputShutdown() || this.f4932e.isOutputShutdown()) {
            return false;
        }
        if (this.f4935h != null) {
            return !r0.E();
        }
        if (z) {
            try {
                int soTimeout = this.f4932e.getSoTimeout();
                try {
                    this.f4932e.setSoTimeout(1);
                    return !this.f4936i.t();
                } finally {
                    this.f4932e.setSoTimeout(soTimeout);
                }
            } catch (SocketTimeoutException unused) {
            } catch (IOException unused2) {
                return false;
            }
        }
        return true;
    }

    public boolean o() {
        return this.f4935h != null;
    }

    public i.g0.g.c p(x xVar, u.a aVar, g gVar) throws SocketException {
        if (this.f4935h != null) {
            return new i.g0.i.f(xVar, aVar, gVar, this.f4935h);
        }
        this.f4932e.setSoTimeout(aVar.a());
        j.u m = this.f4936i.m();
        long a = aVar.a();
        TimeUnit timeUnit = TimeUnit.MILLISECONDS;
        m.g(a, timeUnit);
        this.f4937j.m().g(aVar.b(), timeUnit);
        return new i.g0.h.a(xVar, gVar, this.f4936i, this.f4937j);
    }

    public e0 q() {
        return this.c;
    }

    public Socket r() {
        return this.f4932e;
    }

    public boolean t(t tVar) {
        if (tVar.z() != this.c.a().l().z()) {
            return false;
        }
        if (tVar.m().equals(this.c.a().l().m())) {
            return true;
        }
        return this.f4933f != null && i.g0.k.d.a.c(tVar.m(), (X509Certificate) this.f4933f.c().get(0));
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("Connection{");
        sb.append(this.c.a().l().m());
        sb.append(Constants.COLON_SEPARATOR);
        sb.append(this.c.a().l().z());
        sb.append(", proxy=");
        sb.append(this.c.b());
        sb.append(" hostAddress=");
        sb.append(this.c.d());
        sb.append(" cipherSuite=");
        r rVar = this.f4933f;
        sb.append(rVar != null ? rVar.a() : PrivacyItem.PrivacyRule.SUBSCRIPTION_NONE);
        sb.append(" protocol=");
        sb.append(this.f4934g);
        sb.append('}');
        return sb.toString();
    }
}