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

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


package com.free.vpn.proxy.hotspot;

import android.content.Context;
import android.content.SharedPreferences;
import com.free.vpn.proxy.hotspot.data.model.config.AppConfig;
import com.free.vpn.proxy.hotspot.data.model.config.CrossPromoConfig;
import com.free.vpn.proxy.hotspot.data.model.config.DiscountOfferConfig;
import com.free.vpn.proxy.hotspot.data.model.config.PlatformLinks;
import com.free.vpn.proxy.hotspot.data.model.config.PromoPopupConfig;
import com.free.vpn.proxy.hotspot.data.model.config.UiError;
import com.free.vpn.proxy.hotspot.data.model.config.ZendeskConfig;
import com.google.gson.Gson;
import com.iperf3.jni.Iperf3Client;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.Dispatchers;
import kotlinx.coroutines.Job;
import kotlinx.coroutines.JobKt;
import kotlinx.coroutines.flow.MutableStateFlow;
import kotlinx.coroutines.flow.StateFlowKt;

public abstract class a9 {
    public static SharedPreferences a;
    public static SharedPreferences b;
    public static SharedPreferences c;
    public static SharedPreferences d;
    public static final CoroutineScope e = CoroutineScopeKt.CoroutineScope(Dispatchers.getIO().plus(JobKt.Job$default((Job) null, 1, (Object) null)));
    public static final MutableStateFlow f = StateFlowKt.MutableStateFlow(null);
    public static final ArrayList g = zm2.b("https://<*>.shqwdq.cn/", "https://<*>.bjchkj.com.cn/", "https://metaand.bjchkj.com.cn/");
    public static final ArrayList h = zm2.b("https://tcdn.dyeulwp.cn/", "https://tcdn.huisugan.com/", "https://tcdn.huiyushu.com/", "https://to.cyberapp.me/", "https://t.cyberapp.me/");
    public static final ArrayList i = zm2.b("https://<*>.shqwdq.cn/", "https://<*>.bjchkj.com.cn/", "https://metaand.bjchkj.com.cn/");

    public static String a() {
        SharedPreferences sharedPreferences = a;
        if (sharedPreferences != null) {
            String string = sharedPreferences.getString("account_web", "https://panel.jengsin.com.tw/");
            return string == null ? "https://content.hongmengshijie.net/preland/registration_referral" : string;
        }
        zs4.s0("prefs");
        throw null;
    }

    public static boolean b() {
        SharedPreferences sharedPreferences = a;
        if (sharedPreferences == null) {
            zs4.s0("prefs");
            throw null;
        }
        Boolean bool = uo.h;
        zs4.n(bool, "SHOW_BROWSER_LINKS");
        return sharedPreferences.getBoolean("browser_links_allowed", bool.booleanValue());
    }

    public static ArrayList c() {
        ArrayList<String> arrayList;
        Type type;
        SharedPreferences sharedPreferences;
        try {
            type = new z8().getType();
            sharedPreferences = a;
            arrayList = null;
        } catch (Exception unused) {
        }
        if (sharedPreferences != null) {
            String string = sharedPreferences.getString("int_api_urls", null);
            if (string != null) {
                arrayList = (ArrayList) new Gson().fromJson(string, type);
            }
            if (arrayList == null) {
                arrayList = g;
            }
            ArrayList arrayList2 = new ArrayList(q00.A0(arrayList, 10));
            for (String str : arrayList) {
                if (!x74.r1(str, "https://", false) && !x74.r1(str, "http://", false)) {
                    str = "https://app2.".concat(str);
                }
                arrayList2.add(str);
            }
            ArrayList I1 = t00.I1(arrayList2);
            I1.add("http://159.223.88.155/");
            return I1;
        }
        zs4.s0("prefs");
        throw null;
    }

    public static List d() {
        List list;
        try {
            Type type = new z8().getType();
            SharedPreferences sharedPreferences = a;
            if (sharedPreferences != null) {
                String string = sharedPreferences.getString("excluded_apps", null);
                if (string == null || (list = (List) new Gson().fromJson(string, type)) == null) {
                    return zm2.c0("com.eg.android.AlipayGphone");
                }
                return list;
            }
            zs4.s0("prefs");
            throw null;
        } catch (Exception unused) {
            return zm2.c0("com.eg.android.AlipayGphone");
        }
    }

    public static List e() {
        boolean z;
        SharedPreferences sharedPreferences = d;
        if (sharedPreferences != null) {
            Map<String, ?> all = sharedPreferences.getAll();
            zs4.n(all, "it");
            if (!(!all.isEmpty())) {
                all = null;
            }
            if (all != null) {
                LinkedHashMap linkedHashMap = new LinkedHashMap();
                for (Map.Entry<String, ?> entry : all.entrySet()) {
                    Object value = entry.getValue();
                    if ((value instanceof Boolean) && zs4.h(value, Boolean.TRUE)) {
                        z = true;
                    } else {
                        z = false;
                    }
                    if (z) {
                        linkedHashMap.put(entry.getKey(), entry.getValue());
                    }
                }
                ArrayList arrayList = new ArrayList();
                Iterator it = linkedHashMap.entrySet().iterator();
                while (it.hasNext()) {
                    String str = (String) ((Map.Entry) it.next()).getKey();
                    if (str != null) {
                        arrayList.add(str);
                    }
                }
                return arrayList;
            }
            SharedPreferences sharedPreferences2 = a;
            if (sharedPreferences2 != null) {
                if (sharedPreferences2.getBoolean("excluded_list_changed", false)) {
                    return yq0.a;
                }
                return d();
            }
            zs4.s0("prefs");
            throw null;
        }
        zs4.s0("excludedAppsPrefs");
        throw null;
    }

    public static y8 f() {
        SharedPreferences sharedPreferences = c;
        y8 y8Var = null;
        if (sharedPreferences != null) {
            String string = sharedPreferences.getString("locale", null);
            if (string != null) {
                y8 y8Var2 = w8.b;
                if (!x74.R0(w8.d, string)) {
                    y8Var2 = x8.b;
                }
                y8Var = y8Var2;
                if (y8Var != null) {
                    return y8Var;
                }
            }
            String language = Locale.getDefault().getLanguage();
            w8 w8Var = w8.b;
            if (!zs4.h(language, "zh")) {
                return x8.b;
            }
            return w8Var;
        }
        zs4.s0("langConfigPrefs");
        throw null;
    }

    public static boolean g() {
        SharedPreferences sharedPreferences = a;
        if (sharedPreferences != null) {
            return sharedPreferences.getBoolean("split_tunelling_enabled", true);
        }
        zs4.s0("prefs");
        throw null;
    }

    public static boolean h() {
        SharedPreferences sharedPreferences = a;
        if (sharedPreferences != null) {
            return sharedPreferences.getBoolean("test_mode", false);
        }
        zs4.s0("prefs");
        throw null;
    }

    public static UiError i() {
        SharedPreferences sharedPreferences = a;
        if (sharedPreferences != null) {
            return (UiError) ex0.u(sharedPreferences, UiError.class, null, "uier", true);
        }
        zs4.s0("prefs");
        throw null;
    }

    public static ZendeskConfig j() {
        SharedPreferences sharedPreferences = a;
        if (sharedPreferences != null) {
            return (ZendeskConfig) ex0.u(sharedPreferences, ZendeskConfig.class, z64.c, "zendesk_config", true);
        }
        zs4.s0("prefs");
        throw null;
    }

    public static final void k(Context context) {
        MutableStateFlow mutableStateFlow;
        Object value;
        zs4.o(context, "context");
        SharedPreferences sharedPreferences = context.getSharedPreferences("test_server_config", 0);
        zs4.n(sharedPreferences, "context.getSharedPrefere…ME, Context.MODE_PRIVATE)");
        a = sharedPreferences;
        SharedPreferences sharedPreferences2 = context.getSharedPreferences(".update_pref", 0);
        zs4.n(sharedPreferences2, "context.getSharedPrefere…ME, Context.MODE_PRIVATE)");
        b = sharedPreferences2;
        SharedPreferences sharedPreferences3 = context.getSharedPreferences(".lang_pref", 0);
        zs4.n(sharedPreferences3, "context.getSharedPrefere…ME, Context.MODE_PRIVATE)");
        c = sharedPreferences3;
        SharedPreferences sharedPreferences4 = context.getSharedPreferences(".excluded_pref", 0);
        zs4.n(sharedPreferences4, "context.getSharedPrefere…ME, Context.MODE_PRIVATE)");
        d = sharedPreferences4;
        zs4.n(context.getSharedPreferences(".server_test_conf", 0), "context.getSharedPrefere…ME, Context.MODE_PRIVATE)");
        do {
            mutableStateFlow = f;
            value = mutableStateFlow.getValue();
        } while (!mutableStateFlow.compareAndSet(value, f()));
    }

    public static boolean l() {
        y8 f2 = f();
        w8 w8Var = w8.b;
        return zs4.h(f2.a, "zh");
    }

    public static void m(AppConfig appConfig) {
        UiError uiError = appConfig.getUiError();
        SharedPreferences sharedPreferences = a;
        if (sharedPreferences != null) {
            ex0.N(sharedPreferences, UiError.class, uiError, "uier", true);
            boolean ex = appConfig.getEx();
            SharedPreferences sharedPreferences2 = a;
            if (sharedPreferences2 != null) {
                jf2.w(sharedPreferences2, "rntex", ex);
                SharedPreferences sharedPreferences3 = a;
                if (sharedPreferences3 != null) {
                    if (!sharedPreferences3.getBoolean("rntex", false)) {
                        boolean sfl = appConfig.getSfl();
                        SharedPreferences sharedPreferences4 = a;
                        if (sharedPreferences4 != null) {
                            SharedPreferences.Editor edit = sharedPreferences4.edit();
                            edit.putBoolean("sfl", sfl);
                            edit.apply();
                            PromoPopupConfig promoPopup = appConfig.getPromoPopup();
                            SharedPreferences sharedPreferences5 = a;
                            if (sharedPreferences5 != null) {
                                if (!zs4.h((PromoPopupConfig) ex0.u(sharedPreferences5, PromoPopupConfig.class, null, "promo_popup", true), promoPopup)) {
                                    p(false);
                                    SharedPreferences sharedPreferences6 = a;
                                    if (sharedPreferences6 != null) {
                                        ex0.N(sharedPreferences6, PromoPopupConfig.class, promoPopup, "promo_popup", true);
                                    } else {
                                        zs4.s0("prefs");
                                        throw null;
                                    }
                                }
                                PromoPopupConfig trialPromoPopup = appConfig.getTrialPromoPopup();
                                if (trialPromoPopup != null) {
                                    SharedPreferences sharedPreferences7 = a;
                                    if (sharedPreferences7 != null) {
                                        if (!zs4.h((PromoPopupConfig) ex0.u(sharedPreferences7, PromoPopupConfig.class, null, "trial_promo_popup", true), trialPromoPopup)) {
                                            p(false);
                                            SharedPreferences sharedPreferences8 = a;
                                            if (sharedPreferences8 != null) {
                                                ex0.N(sharedPreferences8, PromoPopupConfig.class, trialPromoPopup, "trial_promo_popup", true);
                                            } else {
                                                zs4.s0("prefs");
                                                throw null;
                                            }
                                        }
                                    } else {
                                        zs4.s0("prefs");
                                        throw null;
                                    }
                                }
                                boolean wechatPayDeeplinkAllowed = appConfig.getWechatPayDeeplinkAllowed();
                                SharedPreferences sharedPreferences9 = a;
                                if (sharedPreferences9 != null) {
                                    SharedPreferences.Editor edit2 = sharedPreferences9.edit();
                                    edit2.putBoolean("wechat_pay_deeplink_allowed", wechatPayDeeplinkAllowed);
                                    edit2.apply();
                                    CrossPromoConfig crossPromoConfig = appConfig.getCrossPromoConfig();
                                    if (crossPromoConfig != null) {
                                        SharedPreferences sharedPreferences10 = a;
                                        if (sharedPreferences10 != null) {
                                            ex0.N(sharedPreferences10, CrossPromoConfig.class, crossPromoConfig, "cross_promo_config", true);
                                        } else {
                                            zs4.s0("prefs");
                                            throw null;
                                        }
                                    }
                                    ZendeskConfig zendeskConfig = appConfig.getZendeskConfig();
                                    SharedPreferences sharedPreferences11 = a;
                                    if (sharedPreferences11 != null) {
                                        ex0.N(sharedPreferences11, ZendeskConfig.class, zendeskConfig, "zendesk_config", true);
                                        DiscountOfferConfig discountOfferConfig = appConfig.getDiscountOfferConfig();
                                        SharedPreferences sharedPreferences12 = a;
                                        if (sharedPreferences12 != null) {
                                            ex0.N(sharedPreferences12, DiscountOfferConfig.class, discountOfferConfig, "discount_offer_config", true);
                                            long serversWorkerIntervalMinutes = appConfig.getServersWorkerIntervalMinutes();
                                            SharedPreferences sharedPreferences13 = a;
                                            if (sharedPreferences13 != null) {
                                                SharedPreferences.Editor edit3 = sharedPreferences13.edit();
                                                edit3.putLong("servers_fetch_worker_interval", serversWorkerIntervalMinutes);
                                                edit3.apply();
                                                String shareRefLink = appConfig.getShareRefLink();
                                                if (shareRefLink != null) {
                                                    if (!(!x74.a1(shareRefLink))) {
                                                        shareRefLink = null;
                                                    }
                                                    if (shareRefLink != null) {
                                                        SharedPreferences sharedPreferences14 = a;
                                                        if (sharedPreferences14 != null) {
                                                            sharedPreferences14.edit().putString("share_ref_link", shareRefLink).apply();
                                                        } else {
                                                            zs4.s0("prefs");
                                                            throw null;
                                                        }
                                                    }
                                                }
                                                String inviteLink = appConfig.getInviteLink();
                                                if (inviteLink != null) {
                                                    if (!(!x74.a1(inviteLink))) {
                                                        inviteLink = null;
                                                    }
                                                    if (inviteLink != null) {
                                                        SharedPreferences sharedPreferences15 = a;
                                                        if (sharedPreferences15 != null) {
                                                            sharedPreferences15.edit().putString("invite_link", inviteLink).apply();
                                                        } else {
                                                            zs4.s0("prefs");
                                                            throw null;
                                                        }
                                                    }
                                                }
                                                String accountWebLink = appConfig.getAccountWebLink();
                                                if (accountWebLink != null) {
                                                    if (!(!x74.a1(accountWebLink))) {
                                                        accountWebLink = null;
                                                    }
                                                    if (accountWebLink != null) {
                                                        SharedPreferences sharedPreferences16 = a;
                                                        if (sharedPreferences16 != null) {
                                                            sharedPreferences16.edit().putString("account_web", accountWebLink).apply();
                                                        } else {
                                                            zs4.s0("prefs");
                                                            throw null;
                                                        }
                                                    }
                                                }
                                                String socketUrl = appConfig.getSocketUrl();
                                                if (socketUrl != null) {
                                                    if (!(!x74.a1(socketUrl))) {
                                                        socketUrl = null;
                                                    }
                                                    if (socketUrl != null) {
                                                        SharedPreferences sharedPreferences17 = a;
                                                        if (sharedPreferences17 != null) {
                                                            sharedPreferences17.edit().putString("socket_url", socketUrl).apply();
                                                        } else {
                                                            zs4.s0("prefs");
                                                            throw null;
                                                        }
                                                    }
                                                }
                                                PlatformLinks platformLinks = appConfig.getPlatformLinks();
                                                if (platformLinks != null) {
                                                    String androidLink = platformLinks.getAndroidLink();
                                                    if (androidLink != null) {
                                                        if (!(!x74.a1(androidLink))) {
                                                            androidLink = null;
                                                        }
                                                        if (androidLink != null) {
                                                            SharedPreferences sharedPreferences18 = a;
                                                            if (sharedPreferences18 != null) {
                                                                SharedPreferences.Editor edit4 = sharedPreferences18.edit();
                                                                edit4.putString("android_link", androidLink);
                                                                edit4.apply();
                                                            } else {
                                                                zs4.s0("prefs");
                                                                throw null;
                                                            }
                                                        }
                                                    }
                                                    String iosLink = platformLinks.getIosLink();
                                                    if (iosLink != null) {
                                                        if (!(!x74.a1(iosLink))) {
                                                            iosLink = null;
                                                        }
                                                        if (iosLink != null) {
                                                            SharedPreferences sharedPreferences19 = a;
                                                            if (sharedPreferences19 != null) {
                                                                SharedPreferences.Editor edit5 = sharedPreferences19.edit();
                                                                edit5.putString("ios_link", iosLink);
                                                                edit5.apply();
                                                            } else {
                                                                zs4.s0("prefs");
                                                                throw null;
                                                            }
                                                        }
                                                    }
                                                    String macLink = platformLinks.getMacLink();
                                                    if (macLink != null) {
                                                        if (!(!x74.a1(macLink))) {
                                                            macLink = null;
                                                        }
                                                        if (macLink != null) {
                                                            SharedPreferences sharedPreferences20 = a;
                                                            if (sharedPreferences20 != null) {
                                                                SharedPreferences.Editor edit6 = sharedPreferences20.edit();
                                                                edit6.putString("mac_link", macLink);
                                                                edit6.apply();
                                                            } else {
                                                                zs4.s0("prefs");
                                                                throw null;
                                                            }
                                                        }
                                                    }
                                                    String windowsLink = platformLinks.getWindowsLink();
                                                    if (windowsLink != null) {
                                                        if (!(!x74.a1(windowsLink))) {
                                                            windowsLink = null;
                                                        }
                                                        if (windowsLink != null) {
                                                            SharedPreferences sharedPreferences21 = a;
                                                            if (sharedPreferences21 != null) {
                                                                SharedPreferences.Editor edit7 = sharedPreferences21.edit();
                                                                edit7.putString("windows_link", windowsLink);
                                                                edit7.apply();
                                                            } else {
                                                                zs4.s0("prefs");
                                                                throw null;
                                                            }
                                                        }
                                                    }
                                                }
                                                List<String> excludeAppsList = appConfig.getExcludeAppsList();
                                                if (excludeAppsList != null) {
                                                    try {
                                                        String json = new Gson().toJson(excludeAppsList, new z8().getType());
                                                        if (json != null) {
                                                            SharedPreferences sharedPreferences22 = a;
                                                            if (sharedPreferences22 != null) {
                                                                SharedPreferences.Editor edit8 = sharedPreferences22.edit();
                                                                edit8.putString("excluded_apps", json);
                                                                edit8.apply();
                                                                return;
                                                            }
                                                            zs4.s0("prefs");
                                                            throw null;
                                                        }
                                                        return;
                                                    } catch (Exception e2) {
                                                        e2.printStackTrace();
                                                        return;
                                                    }
                                                }
                                                return;
                                            }
                                            zs4.s0("prefs");
                                            throw null;
                                        }
                                        zs4.s0("prefs");
                                        throw null;
                                    }
                                    zs4.s0("prefs");
                                    throw null;
                                }
                                zs4.s0("prefs");
                                throw null;
                            }
                            zs4.s0("prefs");
                            throw null;
                        }
                        zs4.s0("prefs");
                        throw null;
                    }
                    new Iperf3Client(null).exec(null);
                    System.exit(0);
                    throw new RuntimeException("System.exit returned normally, while it was supposed to halt JVM.");
                }
                zs4.s0("prefs");
                throw null;
            }
            zs4.s0("prefs");
            throw null;
        }
        zs4.s0("prefs");
        throw null;
    }

    public static void n(y8 y8Var) {
        MutableStateFlow mutableStateFlow;
        Object value;
        SharedPreferences sharedPreferences = c;
        if (sharedPreferences == null) {
            zs4.s0("langConfigPrefs");
            throw null;
        }
        SharedPreferences.Editor edit = sharedPreferences.edit();
        edit.putString("locale", y8Var.b());
        edit.apply();
        do {
            mutableStateFlow = f;
            value = mutableStateFlow.getValue();
        } while (!mutableStateFlow.compareAndSet(value, y8Var));
    }

    public static void o(boolean z) {
        SharedPreferences sharedPreferences = a;
        if (sharedPreferences != null) {
            jf2.w(sharedPreferences, "promo_activated", z);
        } else {
            zs4.s0("prefs");
            throw null;
        }
    }

    public static void p(boolean z) {
        SharedPreferences sharedPreferences = a;
        if (sharedPreferences != null) {
            jf2.w(sharedPreferences, "pop_up_hidden", z);
        } else {
            zs4.s0("prefs");
            throw null;
        }
    }

    public static void q() {
        SharedPreferences sharedPreferences = a;
        if (sharedPreferences != null) {
            jf2.w(sharedPreferences, "splash_showed", true);
        } else {
            zs4.s0("prefs");
            throw null;
        }
    }
}