APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Նվագարկիչ
版本号:9.9.9
包名称:com.iptv.player

MD5 校验值:d7f913ab91d7343430e85d5ce2e5aff0

反编译源代码说明

b.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package yh;

import ai.a;
import bi.g;
import d9.ju;
import di.f;
import gi.c0;
import gi.h;
import gi.t;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.lang.ref.Reference;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.ConnectException;
import java.net.ProtocolException;
import java.net.Proxy;
import java.net.Socket;
import java.net.UnknownServiceException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Arrays;
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.SSLException;
import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLProtocolException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import p9.e3;
import vh.b0;
import vh.e0;
import vh.i;
import vh.j;
import vh.o;
import vh.q;
import vh.r;
import vh.s;
import vh.t;
import vh.v;
import vh.w;
import vh.y;

public final class b extends g.e {

    public final i f45206b;

    public final e0 f45207c;

    public Socket f45208d;

    public Socket f45209e;

    public q f45210f;

    public w f45211g;

    public g f45212h;

    public gi.i f45213i;

    public h f45214j;

    public boolean f45215k;

    public int f45216l;

    public int f45217m = 1;

    public final List<Reference<e>> f45218n = new ArrayList();

    public long f45219o = Long.MAX_VALUE;

    public b(i iVar, e0 e0Var) {
        this.f45206b = iVar;
        this.f45207c = e0Var;
    }

    @Override
    public void a(g gVar) {
        synchronized (this.f45206b) {
            this.f45217m = gVar.d();
        }
    }

    @Override
    public void b(bi.q qVar) {
        qVar.c(bi.b.REFUSED_STREAM);
    }

    public void c(int i10, int i11, int i12, int i13, boolean z10, vh.e eVar, o oVar) {
        boolean z11;
        boolean z12;
        if (this.f45211g != null) {
            throw new IllegalStateException("already connected");
        }
        vh.a aVar = this.f45207c.f43294a;
        List<j> list = aVar.f43208f;
        e3 e3Var = new e3(list);
        if (aVar.f43211i == null) {
            if (!list.contains(j.f43337f)) {
                throw new c(new UnknownServiceException("CLEARTEXT communication not enabled for client"));
            }
            String str = this.f45207c.f43294a.f43203a.f43377d;
            if (!f.f29657a.l(str)) {
                throw new c(new UnknownServiceException(android.support.v4.media.c.a("CLEARTEXT communication to ", str, " not permitted by network security policy")));
            }
        } else if (aVar.f43207e.contains(w.H2_PRIOR_KNOWLEDGE)) {
            throw new c(new UnknownServiceException("H2_PRIOR_KNOWLEDGE cannot be used with HTTPS"));
        }
        c cVar = null;
        do {
            try {
                try {
                    if (this.f45207c.a()) {
                        e(i10, i11, i12, eVar, oVar);
                        if (this.f45208d == null) {
                            if (!this.f45207c.a() && this.f45208d == null) {
                                throw new c(new ProtocolException("Too many tunnel connections attempted: 21"));
                            }
                            if (this.f45212h == null) {
                                synchronized (this.f45206b) {
                                    this.f45217m = this.f45212h.d();
                                }
                                return;
                            }
                            return;
                        }
                    } else {
                        try {
                            d(i10, i11, eVar, oVar);
                        } catch (IOException e10) {
                            e = e10;
                            wh.c.e(this.f45209e);
                            wh.c.e(this.f45208d);
                            this.f45209e = null;
                            this.f45208d = null;
                            this.f45213i = null;
                            this.f45214j = null;
                            this.f45210f = null;
                            this.f45211g = null;
                            this.f45212h = null;
                            Objects.requireNonNull(this.f45207c);
                            Objects.requireNonNull(this.f45207c);
                            Objects.requireNonNull(oVar);
                            boolean z13 = true;
                            z11 = false;
                            if (cVar != null) {
                                cVar = new c(e);
                            } else {
                                IOException iOException = cVar.f45220a;
                                Method method = wh.c.f44067g;
                                if (method != null) {
                                    try {
                                        method.invoke(iOException, e);
                                    } catch (IllegalAccessException | InvocationTargetException unused) {
                                    }
                                }
                                cVar.f45221b = e;
                            }
                            if (z10) {
                                throw cVar;
                            }
                            e3Var.f38370c = true;
                            if (e3Var.f38369b && !(e instanceof ProtocolException) && !(e instanceof InterruptedIOException) && ((!((z12 = e instanceof SSLHandshakeException)) || !(e.getCause() instanceof CertificateException)) && !(e instanceof SSLPeerUnverifiedException))) {
                                if (!z12 && !(e instanceof SSLProtocolException) && !(e instanceof SSLException)) {
                                    z13 = false;
                                }
                                z11 = z13;
                            }
                        }
                    }
                    f(e3Var, i13, eVar, oVar);
                    Objects.requireNonNull(this.f45207c);
                    Objects.requireNonNull(this.f45207c);
                    Objects.requireNonNull(oVar);
                    if (!this.f45207c.a()) {
                    }
                    if (this.f45212h == null) {
                    }
                } catch (IOException e11) {
                    e = e11;
                    wh.c.e(this.f45209e);
                    wh.c.e(this.f45208d);
                    this.f45209e = null;
                    this.f45208d = null;
                    this.f45213i = null;
                    this.f45214j = null;
                    this.f45210f = null;
                    this.f45211g = null;
                    this.f45212h = null;
                    Objects.requireNonNull(this.f45207c);
                    Objects.requireNonNull(this.f45207c);
                    Objects.requireNonNull(oVar);
                    boolean z132 = true;
                    z11 = false;
                    if (cVar != null) {
                    }
                    if (z10) {
                    }
                }
            } catch (IOException e12) {
                e = e12;
            }
        } while (z11);
        throw cVar;
    }

    public final void d(int i10, int i11, vh.e eVar, o oVar) {
        e0 e0Var = this.f45207c;
        Proxy proxy = e0Var.f43295b;
        this.f45208d = (proxy.type() == Proxy.Type.DIRECT || proxy.type() == Proxy.Type.HTTP) ? e0Var.f43294a.f43205c.createSocket() : new Socket(proxy);
        Objects.requireNonNull(this.f45207c);
        Objects.requireNonNull(oVar);
        this.f45208d.setSoTimeout(i11);
        try {
            f.f29657a.g(this.f45208d, this.f45207c.f43296c, i10);
            try {
                this.f45213i = y.h.c(y.h.l(this.f45208d));
                this.f45214j = y.h.b(y.h.i(this.f45208d));
            } catch (NullPointerException e10) {
                if ("throw with null exception".equals(e10.getMessage())) {
                    throw new IOException(e10);
                }
            }
        } catch (ConnectException e11) {
            StringBuilder a10 = android.support.v4.media.b.a("Failed to connect to ");
            a10.append(this.f45207c.f43296c);
            ConnectException connectException = new ConnectException(a10.toString());
            connectException.initCause(e11);
            throw connectException;
        }
    }

    public final void e(int i10, int i11, int i12, vh.e eVar, o oVar) {
        y.a aVar = new y.a();
        aVar.f(this.f45207c.f43294a.f43203a);
        aVar.e("CONNECT", null);
        aVar.c("Host", wh.c.m(this.f45207c.f43294a.f43203a, true));
        aVar.c("Proxy-Connection", "Keep-Alive");
        aVar.c("User-Agent", "okhttp/3.12.13");
        y a10 = aVar.a();
        b0.a aVar2 = new b0.a();
        aVar2.f43228a = a10;
        aVar2.f43229b = w.HTTP_1_1;
        aVar2.f43230c = 407;
        aVar2.f43231d = "Preemptive Authenticate";
        aVar2.f43234g = wh.c.f44063c;
        aVar2.f43238k = -1L;
        aVar2.f43239l = -1L;
        r.a aVar3 = aVar2.f43233f;
        Objects.requireNonNull(aVar3);
        r.a("Proxy-Authenticate");
        r.b("OkHttp-Preemptive", "Proxy-Authenticate");
        aVar3.e("Proxy-Authenticate");
        aVar3.f43372a.add("Proxy-Authenticate");
        aVar3.f43372a.add("OkHttp-Preemptive");
        aVar2.a();
        Objects.requireNonNull(this.f45207c.f43294a.f43206d);
        s sVar = a10.f43461a;
        d(i10, i11, eVar, oVar);
        String str = "CONNECT " + wh.c.m(sVar, true) + " HTTP/1.1";
        gi.i iVar = this.f45213i;
        h hVar = this.f45214j;
        ai.a aVar4 = new ai.a(null, null, iVar, hVar);
        TimeUnit timeUnit = TimeUnit.MILLISECONDS;
        iVar.f().g(i11, timeUnit);
        this.f45214j.f().g(i12, timeUnit);
        aVar4.k(a10.f43463c, str);
        hVar.flush();
        b0.a c10 = aVar4.c(false);
        c10.f43228a = a10;
        b0 a11 = c10.a();
        long a12 = zh.e.a(a11);
        if (a12 == -1) {
            a12 = 0;
        }
        gi.b0 h10 = aVar4.h(a12);
        wh.c.t(h10, Integer.MAX_VALUE, timeUnit);
        ((a.f) h10).close();
        int i13 = a11.f43217c;
        if (i13 == 200) {
            if (!this.f45213i.e().J() || !this.f45214j.e().J()) {
                throw new IOException("TLS tunnel buffered too many bytes!");
            }
        } else {
            if (i13 == 407) {
                Objects.requireNonNull(this.f45207c.f43294a.f43206d);
                throw new IOException("Failed to authenticate with proxy");
            }
            StringBuilder a13 = android.support.v4.media.b.a("Unexpected response code for CONNECT: ");
            a13.append(a11.f43217c);
            throw new IOException(a13.toString());
        }
    }

    public final void f(e3 e3Var, int i10, vh.e eVar, o oVar) {
        SSLSocket sSLSocket;
        w wVar = w.HTTP_1_1;
        vh.a aVar = this.f45207c.f43294a;
        if (aVar.f43211i == null) {
            List<w> list = aVar.f43207e;
            w wVar2 = w.H2_PRIOR_KNOWLEDGE;
            if (!list.contains(wVar2)) {
                this.f45209e = this.f45208d;
                this.f45211g = wVar;
                return;
            } else {
                this.f45209e = this.f45208d;
                this.f45211g = wVar2;
                j(i10);
                return;
            }
        }
        Objects.requireNonNull(oVar);
        vh.a aVar2 = this.f45207c.f43294a;
        SSLSocketFactory sSLSocketFactory = aVar2.f43211i;
        try {
            try {
                Socket socket = this.f45208d;
                s sVar = aVar2.f43203a;
                sSLSocket = (SSLSocket) sSLSocketFactory.createSocket(socket, sVar.f43377d, sVar.f43378e, true);
            } catch (Throwable th2) {
                th = th2;
                sSLSocket = null;
            }
        } catch (AssertionError e10) {
            e = e10;
        }
        try {
            j a10 = e3Var.a(sSLSocket);
            if (a10.f43339b) {
                f.f29657a.f(sSLSocket, aVar2.f43203a.f43377d, aVar2.f43207e);
            }
            sSLSocket.startHandshake();
            SSLSession session = sSLSocket.getSession();
            q a11 = q.a(session);
            if (aVar2.f43212j.verify(aVar2.f43203a.f43377d, session)) {
                aVar2.f43213k.a(aVar2.f43203a.f43377d, a11.f43369c);
                String i11 = a10.f43339b ? f.f29657a.i(sSLSocket) : null;
                this.f45209e = sSLSocket;
                this.f45213i = y.h.c(y.h.l(sSLSocket));
                this.f45214j = new t(y.h.i(this.f45209e));
                this.f45210f = a11;
                if (i11 != null) {
                    wVar = w.a(i11);
                }
                this.f45211g = wVar;
                f.f29657a.a(sSLSocket);
                if (this.f45211g == w.HTTP_2) {
                    j(i10);
                    return;
                }
                return;
            }
            List<Certificate> list2 = a11.f43369c;
            if (list2.isEmpty()) {
                throw new SSLPeerUnverifiedException("Hostname " + aVar2.f43203a.f43377d + " not verified (no certificates)");
            }
            X509Certificate x509Certificate = (X509Certificate) list2.get(0);
            throw new SSLPeerUnverifiedException("Hostname " + aVar2.f43203a.f43377d + " not verified:\n    certificate: " + vh.g.b(x509Certificate) + "\n    DN: " + x509Certificate.getSubjectDN().getName() + "\n    subjectAltNames: " + fi.c.a(x509Certificate));
        } catch (AssertionError e11) {
            e = e11;
            if (!wh.c.r(e)) {
                throw e;
            }
            throw new IOException(e);
        } catch (Throwable th3) {
            th = th3;
            if (sSLSocket != null) {
                f.f29657a.a(sSLSocket);
            }
            wh.c.e(sSLSocket);
            throw th;
        }
    }

    public boolean g(vh.a aVar, e0 e0Var) {
        if (this.f45218n.size() < this.f45217m && !this.f45215k) {
            wh.a aVar2 = wh.a.f44059a;
            vh.a aVar3 = this.f45207c.f43294a;
            Objects.requireNonNull((v.a) aVar2);
            if (!aVar3.a(aVar)) {
                return false;
            }
            if (aVar.f43203a.f43377d.equals(this.f45207c.f43294a.f43203a.f43377d)) {
                return true;
            }
            if (this.f45212h == null || e0Var == null || e0Var.f43295b.type() != Proxy.Type.DIRECT || this.f45207c.f43295b.type() != Proxy.Type.DIRECT || !this.f45207c.f43296c.equals(e0Var.f43296c) || e0Var.f43294a.f43212j != fi.c.f31120a || !k(aVar.f43203a)) {
                return false;
            }
            try {
                aVar.f43213k.a(aVar.f43203a.f43377d, this.f45210f.f43369c);
                return true;
            } catch (SSLPeerUnverifiedException unused) {
            }
        }
        return false;
    }

    public boolean h() {
        return this.f45212h != null;
    }

    public zh.c i(v vVar, t.a aVar, e eVar) {
        if (this.f45212h != null) {
            return new bi.f(vVar, aVar, eVar, this.f45212h);
        }
        zh.f fVar = (zh.f) aVar;
        this.f45209e.setSoTimeout(fVar.f45624j);
        c0 f10 = this.f45213i.f();
        long j10 = fVar.f45624j;
        TimeUnit timeUnit = TimeUnit.MILLISECONDS;
        f10.g(j10, timeUnit);
        this.f45214j.f().g(fVar.f45625k, timeUnit);
        return new ai.a(vVar, eVar, this.f45213i, this.f45214j);
    }

    public final void j(int i10) {
        this.f45209e.setSoTimeout(0);
        g.c cVar = new g.c(true);
        Socket socket = this.f45209e;
        String str = this.f45207c.f43294a.f43203a.f43377d;
        gi.i iVar = this.f45213i;
        h hVar = this.f45214j;
        cVar.f13740a = socket;
        cVar.f13741b = str;
        cVar.f13742c = iVar;
        cVar.f13743d = hVar;
        cVar.f13744e = this;
        cVar.f13745f = i10;
        g gVar = new g(cVar);
        this.f45212h = gVar;
        bi.r rVar = gVar.f13731v;
        synchronized (rVar) {
            if (rVar.f13811e) {
                throw new IOException("closed");
            }
            if (rVar.f13808b) {
                Logger logger = bi.r.f13806g;
                if (logger.isLoggable(Level.FINE)) {
                    logger.fine(wh.c.l(">> CONNECTION %s", bi.e.f13695a.i()));
                }
                h hVar2 = rVar.f13807a;
                byte[] bArr = bi.e.f13695a.f31492c;
                byte[] copyOf = Arrays.copyOf(bArr, bArr.length);
                ju.f(copyOf, "java.util.Arrays.copyOf(this, size)");
                hVar2.y0(copyOf);
                rVar.f13807a.flush();
            }
        }
        bi.r rVar2 = gVar.f13731v;
        r1.g gVar2 = gVar.f13728s;
        synchronized (rVar2) {
            if (rVar2.f13811e) {
                throw new IOException("closed");
            }
            rVar2.c(0, Integer.bitCount(gVar2.f39640c) * 6, (byte) 4, (byte) 0);
            int i11 = 0;
            while (i11 < 10) {
                if (((1 << i11) & gVar2.f39640c) != 0) {
                    rVar2.f13807a.w(i11 == 4 ? 3 : i11 == 7 ? 4 : i11);
                    rVar2.f13807a.A(((int[]) gVar2.f39639b)[i11]);
                }
                i11++;
            }
            rVar2.f13807a.flush();
        }
        if (gVar.f13728s.d() != 65535) {
            gVar.f13731v.j(0, r0 - 65535);
        }
        new Thread(gVar.f13732w).start();
    }

    public boolean k(s sVar) {
        int i10 = sVar.f43378e;
        s sVar2 = this.f45207c.f43294a.f43203a;
        if (i10 != sVar2.f43378e) {
            return false;
        }
        if (sVar.f43377d.equals(sVar2.f43377d)) {
            return true;
        }
        q qVar = this.f45210f;
        return qVar != null && fi.c.f31120a.c(sVar.f43377d, (X509Certificate) qVar.f43369c.get(0));
    }

    public String toString() {
        StringBuilder a10 = android.support.v4.media.b.a("Connection{");
        a10.append(this.f45207c.f43294a.f43203a.f43377d);
        a10.append(":");
        a10.append(this.f45207c.f43294a.f43203a.f43378e);
        a10.append(", proxy=");
        a10.append(this.f45207c.f43295b);
        a10.append(" hostAddress=");
        a10.append(this.f45207c.f43296c);
        a10.append(" cipherSuite=");
        q qVar = this.f45210f;
        a10.append(qVar != null ? qVar.f43368b : "none");
        a10.append(" protocol=");
        a10.append(this.f45211g);
        a10.append('}');
        return a10.toString();
    }
}