Fast Orange v3.5.3版本的 MD5 值为:33b91aba50c566533dfd683a85f79158

以下内容为反编译后的 HttpsTest$testConnection$1.java 源代码,内容仅作参考


package com.github.shadowsocks.utils;

import android.os.SystemClock;
import com.free.vpn.proxy.hotspot.m70;
import com.free.vpn.proxy.hotspot.mc4;
import com.free.vpn.proxy.hotspot.pd0;
import com.free.vpn.proxy.hotspot.x74;
import com.free.vpn.proxy.hotspot.zs4;
import com.github.shadowsocks.database.DataStore;
import com.github.shadowsocks.ktx.AsyncsKt;
import com.github.shadowsocks.ktx.NetsKt;
import com.github.shadowsocks.ktx.UtilsKt;
import fr.bmartel.protocol.http.constants.HttpHeader;
import java.io.IOException;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.DelayKt;
import okhttp3.Call;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.internal.Util;

@pd0(c = "com.github.shadowsocks.utils.HttpsTest$testConnection$1", f = "HttpsTest.kt", l = {96, 97, 103}, m = "invokeSuspend")
@Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\u008a@"}, d2 = {"Lkotlinx/coroutines/CoroutineScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
public final class HttpsTest$testConnection$1 extends mc4 implements Function2 {
    Object L$0;
    int label;
    final HttpsTest this$0;

    public HttpsTest$testConnection$1(HttpsTest httpsTest, Continuation<? super HttpsTest$testConnection$1> continuation) {
        super(2, continuation);
        this.this$0 = httpsTest;
    }

    @Override
    public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
        return new HttpsTest$testConnection$1(this.this$0, continuation);
    }

    @Override
    public final Object invokeSuspend(Object obj) {
        HttpsTest httpsTest;
        m70 m70Var = m70.a;
        int i = this.label;
        if (i != 0) {
            if (i != 1) {
                if (i != 2) {
                    if (i == 3) {
                        ResultKt.throwOnFailure(obj);
                        return Unit.INSTANCE;
                    }
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                ResultKt.throwOnFailure(obj);
                return Unit.INSTANCE;
            }
            httpsTest = (HttpsTest) this.L$0;
            ResultKt.throwOnFailure(obj);
            HttpsTest$testConnection$1$1$response$1 httpsTest$testConnection$1$1$response$1 = new HttpsTest$testConnection$1$1$response$1(httpsTest, null);
            this.L$0 = null;
            this.label = 2;
            if (AsyncsKt.onMainDispatcher(httpsTest$testConnection$1$1$response$1, this) == m70Var) {
                return m70Var;
            }
            return Unit.INSTANCE;
        }
        ResultKt.throwOnFailure(obj);
        long elapsedRealtime = SystemClock.elapsedRealtime();
        HttpsTest httpsTest2 = this.this$0;
        Call newCall = httpsTest2.getOkHttpClient().newCall(new Request.Builder().url(DataStore.INSTANCE.getConnectionTestURL()).addHeader(HttpHeader.CONNECTION, "close").addHeader("User-Agent", NetsKt.USER_AGENT).build());
        HttpsTest httpsTest3 = this.this$0;
        try {
            Response execute = newCall.execute();
            if (newCall.getCanceled()) {
                return Unit.INSTANCE;
            }
            int code = execute.code();
            long elapsedRealtime2 = SystemClock.elapsedRealtime() - elapsedRealtime;
            Util.closeQuietly(execute);
            AsyncsKt.runOnMainDispatcher(new HttpsTest$testConnection$1$1$1(httpsTest3, code, elapsedRealtime2, null));
            httpsTest2.running = newCall;
            return Unit.INSTANCE;
        } catch (IOException e) {
            String readableMessage = UtilsKt.getReadableMessage(e);
            zs4.n(readableMessage, "e.readableMessage");
            if (x74.L0(readableMessage, "failed to connect to /127.0.0.1", false)) {
                String readableMessage2 = UtilsKt.getReadableMessage(e);
                zs4.n(readableMessage2, "e.readableMessage");
                if (x74.L0(readableMessage2, "ECONNREFUSED", false)) {
                    this.L$0 = httpsTest3;
                    this.label = 1;
                    if (DelayKt.delay(1000L, this) == m70Var) {
                        return m70Var;
                    }
                    httpsTest = httpsTest3;
                }
            }
            if (!newCall.getCanceled()) {
                HttpsTest$testConnection$1$1$response$2 httpsTest$testConnection$1$1$response$2 = new HttpsTest$testConnection$1$1$response$2(httpsTest3, e, null);
                this.label = 3;
                if (AsyncsKt.onMainDispatcher(httpsTest$testConnection$1$1$response$2, this) == m70Var) {
                    return m70Var;
                }
            }
        }
    }

    @Override
    public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
        return ((HttpsTest$testConnection$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
    }
}