Commit e4a64e1d authored by Administrator's avatar Administrator

adr startup

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