导航菜单

页面标题

页面副标题

Credmex v3.12.2 - ServerApiConfig.java 源代码

正在查看: Credmex v3.12.2 应用的 ServerApiConfig.java JAVA 源代码文件

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


package com.credmex;

import android.util.Log;
import androidx.annotation.Nullable;
import com.veda.android.bananalibrary.infrastructure.IServerConfig;
import com.veda.android.bananalibrary.infrastructure.Logger;
import com.veda.android.bananalibrary.infrastructure.ServerType;
import java.net.MalformedURLException;
import java.net.URL;

public class ServerApiConfig implements IServerConfig {

    private String f2780a;

    private String f2781b;

    private ServerType f2782c;

    private String f2783d = "https://event-tracking-api-test.yangqianguan.com/";

    private String f2784e = "https://event-tracking-api.mxcred.com/";

    static class AnonymousClass1 {

        static final int[] f2785a;

        static {
            int[] iArr = new int[ServerType.values().length];
            f2785a = iArr;
            try {
                iArr[ServerType.a.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                f2785a[ServerType.c.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                f2785a[ServerType.b.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                f2785a[ServerType.d.ordinal()] = 4;
            } catch (NoSuchFieldError unused4) {
            }
        }
    }

    private static class InstanceHolder {

        static ServerApiConfig f2786a = new ServerApiConfig();

        private InstanceHolder() {
        }
    }

    public static ServerApiConfig e() {
        return InstanceHolder.f2786a;
    }

    @Nullable
    private URL f(String str) {
        try {
            return new URL(str);
        } catch (MalformedURLException e2) {
            Logger.c().b(Log.getStackTraceString(e2));
            return null;
        }
    }

    public URL a() {
        return f(this.f2781b);
    }

    public URL b() {
        return f(this.f2780a);
    }

    public String c() {
        return this.f2780a;
    }

    public String d() {
        return this.f2784e;
    }

    public String g() {
        return this.f2781b;
    }

    public void h(ServerType serverType) {
        this.f2782c = serverType;
        int i = AnonymousClass1.f2785a[serverType.ordinal()];
        if (i == 1) {
            this.f2780a = "https://test-mex-ec-api.fintopia.tech/";
            this.f2781b = "https://test-mex-credmex-new.fintopia.tech/";
        } else if (i == 2) {
            this.f2780a = "https://apifeat.geteasycash.asia/";
            this.f2781b = "https://cm-feat.fintopia.tech/";
        } else {
            if (i != 3) {
                return;
            }
            this.f2780a = "https://api.mxcred.com/";
            this.f2781b = "https://appweb.mxcred.com/";
        }
    }
}