Commit e4a64e1d authored by Administrator's avatar Administrator

adr startup

parent 1e4d7189
......@@ -16,3 +16,4 @@ LittleProxy.pro
/bin
*.jks
performance/site/
build/
\ No newline at end of file
......@@ -9,6 +9,9 @@ dependencies {
api 'io.netty:netty-codec:4.0.44.Final'
api 'io.netty:netty-handler:4.0.44.Final'
compileOnly 'org.projectlombok:lombok:1.18.2'
annotationProcessor 'org.projectlombok:lombok:1.18.2'
compileOnly 'org.slf4j:slf4j-api:1.7.25'
compileOnly 'com.google.android:android:4.1.1.4'
compileOnly 'com.android.support:support-annotations:28.0.0'
......
......@@ -5,10 +5,19 @@ import com.virjar.echo.nat.protocol.EchoPacket;
import com.virjar.echo.nat.protocol.EchoPacketDecoder;
import com.virjar.echo.nat.protocol.EchoPacketEncoder;
import com.virjar.echo.nat.protocol.PacketCommon;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import io.netty.bootstrap.Bootstrap;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.*;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
......@@ -16,10 +25,6 @@ import io.netty.util.concurrent.DefaultThreadFactory;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.GenericFutureListener;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
public class EchoClient {
private String natServerHost;
......@@ -196,7 +201,7 @@ public class EchoClient {
return;
}
isConnecting = true;
EchoLogger.getLogger().info("connect to nat server...");
EchoLogger.getLogger().info("connect to nat server... -> " + natServerHost + ":" + natServerPort);
echoClientBootstrap
.connect(natServerHost, natServerPort)
.addListener(new ChannelFutureListener() {
......
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