Commit 9c7db5a6 authored by Administrator's avatar Administrator

装配远程命令模块

parent 4988b454
......@@ -10,12 +10,14 @@ import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.os.Build;
import android.os.IBinder;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import com.virjar.echo.adr.repo.EchoConfig;
import com.virjar.echo.adr.ui.MainActivity;
import com.virjar.echo.nat.client.EchoClient;
import com.virjar.echo.nat.cmd.ShellCmdHandler;
import com.virjar.echo.nat.log.EchoLogger;
import java.util.concurrent.atomic.AtomicBoolean;
......@@ -87,9 +89,14 @@ public class HttpProxyService extends Service {
EchoLogger.getLogger().info("start EchoProxy front service");
echoClient = new EchoClient(
EchoConfig.getEchoServer(), EchoConfig.getEchoServerPort(),
EchoConfig.getClientId());
echoClient = new EchoClient(EchoConfig.getEchoServer(),
EchoConfig.getEchoServerPort(),
EchoConfig.getClientId())
.registerCmdHandler(new ShellCmdHandler());
String username = EchoConfig.getUsername();
if (!TextUtils.isEmpty(username)) {
echoClient.setAdminAccount(username);
}
new Thread() {
@Override
public void run() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment