OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 TransproxyService.java 源代码,内容仅作参考
package com.github.shadowsocks.bg;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import com.excelliance.kxqp.ui.detail.category.CategoryListActivity;
import com.github.shadowsocks.Core;
import com.github.shadowsocks.bg.BaseService;
import com.github.shadowsocks.bg.LocalDnsService;
import com.github.shadowsocks.preference.DataStore;
import java.io.File;
import java.net.InetAddress;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import kotlin.Metadata;
import kotlin.collections.m;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.k;
import kotlin.u;
import kotlinx.coroutines.CoroutineScope;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0006\u0018\u00002\u00020\u00012\u00020\u0002B\u0005¢\u0006\u0002\u0010\u0003J\u0010\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\tH\u0016J\u0012\u0010\u000f\u001a\u0004\u0018\u00010\u00102\u0006\u0010\u0011\u001a\u00020\u0012H\u0016J\b\u0010\u0013\u001a\u00020\u0014H\u0016J\"\u0010\u0015\u001a\u00020\u00162\b\u0010\u0011\u001a\u0004\u0018\u00010\u00122\u0006\u0010\u0017\u001a\u00020\u00162\u0006\u0010\u0018\u001a\u00020\u0016H\u0016J\u0011\u0010\u0019\u001a\u00020\u0014H\u0096@ø\u0001\u0000¢\u0006\u0002\u0010\u001aJ\b\u0010\u001b\u001a\u00020\u0014H\u0002R\u0014\u0010\u0004\u001a\u00020\u0005X\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007R\u0014\u0010\b\u001a\u00020\t8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\n\u0010\u000b\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u001c"}, d2 = {"Lcom/github/shadowsocks/bg/TransproxyService;", "Landroid/app/Service;", "Lcom/github/shadowsocks/bg/LocalDnsService$Interface;", "()V", "data", "Lcom/github/shadowsocks/bg/BaseService$Data;", "getData", "()Lcom/github/shadowsocks/bg/BaseService$Data;", CategoryListActivity.TAG_NAME, "", "getTag", "()Ljava/lang/String;", "createNotification", "Lcom/github/shadowsocks/bg/ServiceNotification;", "profileName", "onBind", "Landroid/os/IBinder;", "intent", "Landroid/content/Intent;", "onDestroy", "", "onStartCommand", "", "flags", "startId", "startProcesses", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "startRedsocksDaemon", "core_release"}, k = 1, mv = {1, 1, 13})
public final class TransproxyService extends Service implements LocalDnsService.a {
@NotNull
private final BaseService.a f15832a = new BaseService.a(this);
@Override
@NotNull
public String b() {
return "ShadowsocksTransproxyService";
}
@Override
@Nullable
public Object a(@NotNull String str, @NotNull Continuation<? super InetAddress[]> continuation) {
return LocalDnsService.a.C0634a.a(this, str, continuation);
}
@Override
@Nullable
public Object a(@NotNull URL url, @NotNull Continuation<? super URLConnection> continuation) {
return LocalDnsService.a.C0634a.a(this, url, continuation);
}
@Override
@NotNull
public ArrayList<String> a(@NotNull ArrayList<String> arrayList) {
k.b(arrayList, "cmd");
return LocalDnsService.a.C0634a.a(this, arrayList);
}
@Override
public void a(@NotNull CoroutineScope coroutineScope) {
k.b(coroutineScope, "scope");
LocalDnsService.a.C0634a.a(this, coroutineScope);
}
@Override
public void a(boolean z, @Nullable String str) {
LocalDnsService.a.C0634a.a(this, z, str);
}
@Override
@Nullable
public Object b(@NotNull Continuation<? super u> continuation) {
return LocalDnsService.a.C0634a.b(this, continuation);
}
@Override
public void c() {
LocalDnsService.a.C0634a.a(this);
}
@Override
public void d() {
LocalDnsService.a.C0634a.b(this);
}
@Override
@NotNull
public BaseService.a getF15834b() {
return this.f15832a;
}
@Override
@NotNull
public ServiceNotification a(@NotNull String str) {
k.b(str, "profileName");
return new ServiceNotification(this, str, "service-transproxy", true);
}
@Override
@Nullable
public IBinder onBind(@NotNull Intent intent) {
k.b(intent, "intent");
return LocalDnsService.a.C0634a.a(this, intent);
}
@Override
public int onStartCommand(@Nullable Intent intent, int flags, int startId) {
return LocalDnsService.a.C0634a.a(this, intent, flags, startId);
}
private final void e() {
kotlin.io.i.a(new File(Core.d.d().getNoBackupFilesDir(), "redsocks.conf"), "base {\n log_debug = off;\n log_info = off;\n log = stderr;\n daemon = off;\n redirector = iptables;\n}\nredsocks {\n local_ip = " + DataStore.f16084b.i() + ";\n local_port = " + DataStore.f16084b.m() + ";\n ip = 127.0.0.1;\n port = " + DataStore.f16084b.j() + ";\n type = socks5;\n}\n", null, 2, null);
GuardedProcessPool f15813b = getF15834b().getF15813b();
if (f15813b == null) {
k.a();
}
GuardedProcessPool.a(f15813b, m.b((Object[]) new String[]{new File(getApplicationInfo().nativeLibraryDir, "libredsocks.so").getAbsolutePath(), "-c", "redsocks.conf"}), null, 2, null);
}
@Override
@Nullable
public Object a(@NotNull Continuation<? super u> continuation) {
e();
return LocalDnsService.a.C0634a.a(this, continuation);
}
@Override
public void onDestroy() {
super.onDestroy();
getF15834b().getH().close();
}
}