Proxy Master v3.4.9版本的 MD5 值为:14d0aa2468d13530c8f6e96bcc114bf5
以下内容为反编译后的 e.java 源代码,内容仅作参考
package n7;
import android.annotation.SuppressLint;
import android.content.res.Resources;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import androidx.activity.z;
import com.alibaba.fastjson.JSON;
import com.google.firebase.ktx.Firebase;
import com.google.firebase.remoteconfig.ktx.RemoteConfigKt;
import com.hotspot.vpn.base.bean.IPApiBean;
import com.hotspot.vpn.base.bean.IPBean;
import com.hotspot.vpn.tls.TlsPlusManager;
import com.tencent.mmkv.MMKV;
import io.appmetrica.analytics.coreutils.internal.StringUtils;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Random;
import java.util.TimeZone;
import kotlin.jvm.internal.k;
import r7.m;
import we.q;
import ye.g0;
public final class e {
@SuppressLint({"SimpleDateFormat"})
public static final SimpleDateFormat f28649f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH);
public static e f28650g;
public boolean f28651a;
public String f28652b;
public int f28653c = 0;
public long f28654d;
public long f28655e;
public static boolean a() {
List z12;
String o10 = o();
try {
String string = RemoteConfigKt.getRemoteConfig(Firebase.INSTANCE).getString("feedback_available_country");
k.d(string, "getString(...)");
z12 = q.z1(string, new String[]{StringUtils.COMMA});
} catch (Exception e10) {
e10.printStackTrace();
z12 = q.z1("RU,UA,SG", new String[]{StringUtils.COMMA});
}
return w() || x() || z12.contains(o10);
}
public static boolean b() {
return o7.a.b("key_if_allowed_all_apps_2319", true);
}
public static ArrayList c() {
ArrayList arrayList = new ArrayList();
try {
String e10 = o7.a.e("key_allow_app_list_2319");
if (!TextUtils.isEmpty(e10)) {
String[] split = e10.split(StringUtils.COMMA);
if (split.length > 0) {
arrayList.addAll(Arrays.asList(split));
g0.A("allow app list = " + arrayList);
}
}
} catch (Exception e11) {
e11.printStackTrace();
}
return arrayList;
}
public static ArrayList d() {
ArrayList arrayList = new ArrayList();
try {
String e10 = o7.a.e("pref_dns_list_key_2319");
if (!TextUtils.isEmpty(e10)) {
arrayList.addAll(JSON.parseArray(e10, String.class));
}
} catch (Exception e11) {
e11.printStackTrace();
}
if (arrayList.isEmpty()) {
arrayList.add("1.1.1.1");
arrayList.add("8.8.8.8");
arrayList.add("8.8.4.4");
}
return arrayList;
}
public static ArrayList e() {
ArrayList arrayList = new ArrayList();
try {
String e10 = o7.a.e("pref_git_list_key_2319");
if (!TextUtils.isEmpty(e10)) {
arrayList.addAll(JSON.parseArray(e10, String.class));
}
} catch (Exception e11) {
e11.printStackTrace();
}
return arrayList;
}
public static e f() {
if (f28650g == null) {
synchronized (e.class) {
if (f28650g == null) {
f28650g = new e();
}
}
}
return f28650g;
}
public static String g() {
IPApiBean q10;
IPBean r10 = r();
String country = r10 != null ? r10.getCountry() : null;
return (!TextUtils.isEmpty(country) || (q10 = q()) == null) ? country : q10.getCountryCode();
}
public static String h() {
return Resources.getSystem().getConfiguration().getLocales().get(0).getLanguage();
}
public static int i() {
String c10 = TlsPlusManager.c(m.b());
k.d(c10, "getDataKey(...)");
return MMKV.n(c10).d(128, "key_mux_concurrency");
}
public static List<String> j() {
ArrayList arrayList = new ArrayList();
arrayList.add("https://www.google.com/generate_204");
arrayList.add("https://connectivitycheck.gstatic.com/generate_204");
arrayList.add("https://cp.cloudflare.com/generate_204");
arrayList.add("https://clients3.google.com/generate_204");
arrayList.add("https://www.apple.com/library/test/success.html");
arrayList.add("https://apple.com/library/test/success.html");
arrayList.add("https://captive.apple.com/hotspot-detect.html");
arrayList.add("https://www.gstatic.com/generate_204");
arrayList.add("https://connectivitycheck.gstatic.com/generate_204");
Collections.shuffle(arrayList);
if (arrayList.size() > 6) {
List<String> subList = arrayList.subList(0, 6);
Collections.shuffle(subList, new Random());
return subList;
}
return arrayList;
}
public static String k() {
try {
TelephonyManager telephonyManager = (TelephonyManager) m.b().getSystemService("phone");
if (telephonyManager != null) {
String simCountryIso = telephonyManager.getSimCountryIso();
if (TextUtils.isEmpty(simCountryIso) || simCountryIso.length() != 2) {
return null;
}
return simCountryIso.toUpperCase(Locale.ENGLISH);
}
return null;
} catch (Exception e10) {
e10.printStackTrace();
return null;
}
}
public static String l() {
try {
TelephonyManager telephonyManager = (TelephonyManager) m.b().getSystemService("phone");
if (telephonyManager != null) {
if (telephonyManager.getPhoneType() != 2) {
String networkCountryIso = telephonyManager.getNetworkCountryIso();
if (!TextUtils.isEmpty(networkCountryIso) && networkCountryIso.length() == 2) {
return networkCountryIso.toUpperCase(Locale.ENGLISH);
}
}
String simCountryIso = telephonyManager.getSimCountryIso();
if (TextUtils.isEmpty(simCountryIso) || simCountryIso.length() != 2) {
return null;
}
return simCountryIso.toUpperCase(Locale.ENGLISH);
}
return null;
} catch (Exception e10) {
e10.printStackTrace();
return null;
}
}
public static String m() {
try {
TelephonyManager telephonyManager = (TelephonyManager) m.b().getSystemService("phone");
if (telephonyManager == null || telephonyManager.getPhoneType() == 2) {
return null;
}
String networkCountryIso = telephonyManager.getNetworkCountryIso();
if (TextUtils.isEmpty(networkCountryIso) || networkCountryIso.length() != 2) {
return null;
}
return networkCountryIso.toUpperCase(Locale.ENGLISH);
} catch (Exception e10) {
e10.printStackTrace();
return null;
}
}
public static ArrayList n() {
ArrayList arrayList = new ArrayList();
try {
String e10 = o7.a.e("key_smart_app_list_2319");
if (!TextUtils.isEmpty(e10)) {
String[] split = e10.split(StringUtils.COMMA);
if (split.length > 0) {
arrayList.addAll(Arrays.asList(split));
}
}
} catch (Exception e11) {
e11.printStackTrace();
}
return arrayList;
}
public static String o() {
String e10 = o7.a.e("key_user_country_test");
if (TextUtils.isEmpty(e10)) {
TelephonyManager telephonyManager = (TelephonyManager) m.b().getSystemService("phone");
e10 = telephonyManager.getSimState() == 5 ? telephonyManager.getNetworkCountryIso().toUpperCase() : ("fa".equalsIgnoreCase(h()) || TimeZone.getDefault().getID().equalsIgnoreCase("Asia/Tehran")) ? "IR" : null;
}
if (TextUtils.isEmpty(e10)) {
e10 = m();
}
if (TextUtils.isEmpty(e10)) {
e10 = g();
}
if (TextUtils.isEmpty(e10)) {
e10 = k();
}
if (TextUtils.isEmpty(e10)) {
e10 = "ru".equalsIgnoreCase(h()) ? "RU" : null;
}
return TextUtils.isEmpty(e10) ? Locale.getDefault().getCountry() : e10;
}
public static String p() {
IPBean r10 = r();
if (r10 == null || TextUtils.isEmpty(r10.getIp())) {
IPApiBean q10 = q();
if (q10 == null || TextUtils.isEmpty(q10.getQuery())) {
return null;
}
return q10.getQuery();
}
return r10.getIp();
}
public static IPApiBean q() {
try {
String e10 = o7.a.e("pref_last_ip_api_key_2319");
if (TextUtils.isEmpty(e10)) {
return null;
}
return g0.k0(e10);
} catch (Exception e11) {
e11.printStackTrace();
return null;
}
}
public static IPBean r() {
try {
String e10 = o7.a.e("pref_last_ip_info_key_2319");
if (TextUtils.isEmpty(e10)) {
return null;
}
return z.j0(e10);
} catch (Exception e11) {
e11.printStackTrace();
return null;
}
}
public static String s() {
String e10 = o7.a.e("key_isp_test");
if (TextUtils.isEmpty(e10)) {
IPBean r10 = r();
if (r10 == null || TextUtils.isEmpty(r10.getOrg())) {
IPApiBean q10 = q();
if (q10 == null || TextUtils.isEmpty(q10.getAsn())) {
return null;
}
return q10.getAsn();
}
return r10.getOrg();
}
return e10;
}
public static boolean t() {
return TextUtils.equals("IR", o());
}
public static boolean u() {
try {
TelephonyManager telephonyManager = (TelephonyManager) m.b().getSystemService("phone");
if (telephonyManager != null) {
return telephonyManager.getPhoneType() == 2;
}
} catch (Exception e10) {
e10.printStackTrace();
}
return false;
}
public static boolean v() {
return o7.a.a("key_test_proxy_self") || o7.a.a("key_ps");
}
public static boolean w() {
return TextUtils.equals("RU", o());
}
public static boolean x() {
return TextUtils.equals("UA", o());
}
public static void y(ArrayList arrayList) {
if (arrayList.isEmpty()) {
return;
}
StringBuilder sb2 = new StringBuilder();
Iterator it = arrayList.iterator();
while (it.hasNext()) {
sb2.append((String) it.next());
sb2.append(StringUtils.COMMA);
}
String sb3 = sb2.toString();
g0.A("allow app save list = " + sb3);
o7.a.j("key_allow_app_list_2319", sb3);
}
public static void z(ArrayList arrayList) {
if (arrayList.isEmpty()) {
return;
}
StringBuilder sb2 = new StringBuilder();
Iterator it = arrayList.iterator();
while (it.hasNext()) {
sb2.append((String) it.next());
sb2.append(StringUtils.COMMA);
}
o7.a.j("key_smart_app_list_2319", sb2.toString());
}
}